From 4bb4ed95516e8f8e31af774120fb434a6bf07855 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 13 Nov 2016 15:52:33 +0100 Subject: [PATCH 01/87] Initial checking. --- Cargo.lock | 1 + ethcore/Cargo.toml | 1 + ethcore/src/client/client.rs | 62 +++++++++++++++++++++++++++++++++++- ethcore/src/lib.rs | 1 + util/src/misc.rs | 5 +++ 5 files changed, 69 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c3fa096b3f1..b53b2842661 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -282,6 +282,7 @@ dependencies = [ "clippy 0.0.96 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethash 1.4.0", "ethcore-bloom-journal 0.1.0", "ethcore-devtools 1.4.0", diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 667b40ace7f..43926379427 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -41,6 +41,7 @@ ethcore-ipc-nano = { path = "../ipc/nano" } rlp = { path = "../util/rlp" } lru-cache = "0.1.0" ethcore-bloom-journal = { path = "../util/bloom" } +ethabi = "0.2.2" [dependencies.hyper] git = "https://github.com/ethcore/hyper" diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index ec59e01cf4d..400d53ed110 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -27,6 +27,7 @@ use util::{journaldb, TrieFactory, Trie}; use util::trie::TrieSpec; use util::{U256, H256, Address, H2048, Uint, FixedHash}; use util::kvdb::*; +use util::misc::code_hash; // other use io::*; @@ -42,7 +43,7 @@ use env_info::LastHashes; use verification; use verification::{PreverifiedBlock, Verifier}; use block::*; -use transaction::{LocalizedTransaction, SignedTransaction, Action}; +use transaction::{LocalizedTransaction, SignedTransaction, Transaction, Action}; use blockchain::extras::TransactionAddress; use types::filter::Filter; use types::mode::Mode as IpcMode; @@ -68,6 +69,7 @@ use factory::Factories; use rlp::{decode, View, UntrustedRlp}; use state_db::StateDB; use rand::OsRng; +use ethabi::{Interface, Contract, Token}; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -634,10 +636,18 @@ impl Client { /// Tick the client. // TODO: manage by real events. pub fn tick(&self) { + self.check_garbage(); + self.check_snooze(); + self.check_updates(); + } + + fn check_garbage(&self) { self.chain.read().collect_garbage(); self.block_queue.collect_garbage(); self.tracedb.read().collect_garbage(); + } + fn check_snooze(&self) { let mode = self.mode.lock().clone(); match mode { Mode::Dark(timeout) => { @@ -671,6 +681,56 @@ impl Client { } } + fn call_contract(&self, address: Address, data: Bytes) -> Result { + let from = Address::default(); + let transaction = Transaction { + nonce: self.latest_nonce(&from), + action: Action::Call(address), + gas: U256::from(50_000_000), + gas_price: U256::default(), + value: U256::default(), + data: data, + }.fake_sign(from); + + self.call(&transaction, BlockID::Latest, Default::default()) + .map_err(|e| format!("{:?}", e)) + .map(|executed| { + executed.output + }) + } + + fn check_updates(&self) { + let operations_json = Interface::load(include_bytes!("../../res/Operations.json")).expect("Operations.json is valid ABI"); + let operations = Contract::new(operations_json); + + fn as_string(e: T) -> String { + format!("{:?}", e) + } + + let res = || { + let is_latest = try!(operations.function("isLatest".into()).map_err(as_string)); + let params = try!(is_latest.encode_call( + vec![Token::String("par".into()), Token::Address(code_hash().0)] + ).map_err(as_string)); + let output = try!(self.call_contract("0x4c1783B4FfB1A99eFC4cda632aA990F5138b26f1".into(), params)); + let result = try!(is_latest.decode_output(output).map_err(as_string)); + + match result.get(0) { + Some(&Token::Bool(answer)) => Ok(answer), + e => Err(format!("Invalid result: {:?}", e)), + } + }; + + match res() { + Ok(res) => { + info!("isLatest returned {}", res); + }, + Err(e) => { + warn!(target: "dapps", "Error while calling Operations.isLatest: {:?}", e); + } + } + } + /// Look up the block number for the given block ID. pub fn block_number(&self, id: BlockID) -> Option { match id { diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index bf3e591718d..59e45f381db 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -117,6 +117,7 @@ extern crate lru_cache; #[cfg(feature = "jit" )] extern crate evmjit; +extern crate ethabi; pub extern crate ethstore; diff --git a/util/src/misc.rs b/util/src/misc.rs index b0452e85e74..d9eab1af08a 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -32,6 +32,11 @@ pub enum Filth { Dirty, } +/// Get the (SHA1?) 160-bit hash of this build's code base. +pub fn code_hash() -> H160 { + sha().into() +} + /// Get the standard version string for this software. pub fn version() -> String { let sha3 = short_sha(); From 2fa2f8342ac5ecaa7793efda07dd910b569937e1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 14 Nov 2016 11:49:56 +0100 Subject: [PATCH 02/87] isLatest works. --- ethcore/res/Operations.json | 1 + ethcore/src/client/client.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 ethcore/res/Operations.json diff --git a/ethcore/res/Operations.json b/ethcore/res/Operations.json new file mode 100644 index 00000000000..573a45169ad --- /dev/null +++ b/ethcore/res/Operations.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"owners","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"findChecksum","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"forks","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"}],"name":"addRelease","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"clients","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"txid","type":"bytes32"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"gas","type":"uint256"}],"name":"TransactionProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"txid","type":"bytes32"}],"name":"TransactionConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"txid","type":"bytes32"}],"name":"TransactionRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"txid","type":"bytes32"},{"indexed":false,"name":"success","type":"bool"}],"name":"TransactionRelayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"number","type":"uint32"},{"indexed":true,"name":"name","type":"bytes32"},{"indexed":false,"name":"spec","type":"bytes32"}],"name":"ForkProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"number","type":"uint32"}],"name":"ForkAcceptedBy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"number","type":"uint32"}],"name":"ForkRejectedBy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"forkNumber","type":"uint32"}],"name":"ForkRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"forkNumber","type":"uint32"}],"name":"ForkRatified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"forkBlock","type":"uint32"},{"indexed":true,"name":"release","type":"bytes32"},{"indexed":false,"name":"track","type":"uint8"},{"indexed":false,"name":"semver","type":"uint24"}],"name":"ReleaseAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"release","type":"bytes32"},{"indexed":true,"name":"platform","type":"bytes32"},{"indexed":false,"name":"checksum","type":"bytes32"}],"name":"ChecksumAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"ClientAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"}],"name":"ClientRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"now","type":"address"}],"name":"ClientOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":false,"name":"now","type":"bool"}],"name":"ClientRequiredChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"old","type":"address"},{"indexed":false,"name":"now","type":"address"}],"name":"OwnerChanged","type":"event"}] \ No newline at end of file diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 400d53ed110..83f1f3709d0 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -22,7 +22,7 @@ use std::time::{Instant}; use time::precise_time_ns; // util -use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock}; +use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock, ToPretty}; use util::{journaldb, TrieFactory, Trie}; use util::trie::TrieSpec; use util::{U256, H256, Address, H2048, Uint, FixedHash}; @@ -710,8 +710,9 @@ impl Client { let res = || { let is_latest = try!(operations.function("isLatest".into()).map_err(as_string)); let params = try!(is_latest.encode_call( - vec![Token::String("par".into()), Token::Address(code_hash().0)] + vec![Token::FixedBytes(b"par"[..].to_owned()), Token::Address(code_hash().0)] ).map_err(as_string)); + println!("params: {}", params.pretty()); let output = try!(self.call_contract("0x4c1783B4FfB1A99eFC4cda632aA990F5138b26f1".into(), params)); let result = try!(is_latest.decode_output(output).map_err(as_string)); From 401a4a37c1e8f4bba921135e28a4c5281a362519 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 18 Nov 2016 19:14:52 +0800 Subject: [PATCH 03/87] Initial structure for auto-updater. - Add auto-gen'ed Operations and Registry ABIs. - Add Updater for managing updates. - Add fields in Client to enable update checking and registry. --- ethcore/src/client/client.rs | 73 +++---- ethcore/src/client/error.rs | 16 ++ ethcore/src/client/mod.rs | 3 + ethcore/src/client/operations.rs | 336 +++++++++++++++++++++++++++++++ ethcore/src/client/registry.rs | 264 ++++++++++++++++++++++++ ethcore/src/client/updater.rs | 45 +++++ 6 files changed, 696 insertions(+), 41 deletions(-) create mode 100644 ethcore/src/client/operations.rs create mode 100644 ethcore/src/client/registry.rs create mode 100644 ethcore/src/client/updater.rs diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 14558f6c646..b8111d77cf1 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -13,7 +13,9 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . + use std::collections::{HashSet, HashMap, BTreeMap, VecDeque}; +use std::str::FromStr; use std::sync::{Arc, Weak}; use std::path::{Path}; use std::fmt; @@ -22,12 +24,11 @@ use std::time::{Instant}; use time::precise_time_ns; // util -use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock, ToPretty}; +use util::{Bytes, PerfTimer, Itertools, Mutex, RwLock, MutexGuard, Hashable}; use util::{journaldb, TrieFactory, Trie}; use util::trie::TrieSpec; use util::{U256, H256, Address, H2048, Uint, FixedHash}; use util::kvdb::*; -use util::misc::code_hash; // other use io::*; @@ -69,7 +70,8 @@ use factory::Factories; use rlp::{decode, View, UntrustedRlp}; use state_db::StateDB; use rand::OsRng; -use ethabi::{Interface, Contract, Token}; +use client::updater::Updater; +use client::registry::Registry; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -140,6 +142,7 @@ pub struct Client { panic_handler: Arc, verifier: Box, miner: Arc, + updater: Mutex>, sleep_state: Mutex, liveness: AtomicBool, io_channel: Mutex>, @@ -150,6 +153,7 @@ pub struct Client { history: u64, rng: Mutex, on_mode_change: Mutex>>, + registrar: Mutex>, } impl Client { @@ -222,7 +226,7 @@ impl Client { accountdb: Default::default(), }; - let client = Client { + let client = Arc::new(Client { sleep_state: Mutex::new(SleepState::new(awake)), liveness: AtomicBool::new(awake), mode: Mutex::new(config.mode.clone()), @@ -239,6 +243,7 @@ impl Client { import_lock: Mutex::new(()), panic_handler: panic_handler, miner: miner, + updater: Mutex::new(None), io_channel: Mutex::new(message_channel), notify: RwLock::new(Vec::new()), queue_transactions: AtomicUsize::new(0), @@ -247,8 +252,19 @@ impl Client { history: history, rng: Mutex::new(try!(OsRng::new().map_err(::util::UtilError::StdIo))), on_mode_change: Mutex::new(None), - }; - Ok(Arc::new(client)) + registrar: Mutex::new(None), + }); + if let Some(reg_addr) = client.additional_params().get("registrar").and_then(|s| Address::from_str(s).ok()) { + let weak = Arc::downgrade(&client); + let registrar = Registry::new(reg_addr, move |a, d| weak.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))); + if let Ok(operations) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { + if !operations.is_zero() { + *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), operations)); + } + } + *client.registrar.lock() = Some(registrar); + } + Ok(client) } /// Adds an actor to be notified on certain events @@ -264,6 +280,11 @@ impl Client { } } + /// Get the Registry object - useful for looking up names. + pub fn registrar(&self) -> MutexGuard> { + self.registrar.lock() + } + /// Register an action to be done if a mode change happens. pub fn on_mode_change(&self, f: F) where F: 'static + FnMut(&Mode) + Send { *self.on_mode_change.lock() = Some(Box::new(f)); @@ -644,7 +665,9 @@ impl Client { pub fn tick(&self) { self.check_garbage(); self.check_snooze(); - self.check_updates(); + if let Some(ref mut updater) = *self.updater.lock() { + updater.tick(); + } } fn check_garbage(&self) { @@ -687,7 +710,8 @@ impl Client { } } - fn call_contract(&self, address: Address, data: Bytes) -> Result { + /// Like `call`, but with various defaults. Designed to be used for calling contracts. + pub fn call_contract(&self, address: Address, data: Bytes) -> Result { let from = Address::default(); let transaction = Transaction { nonce: self.latest_nonce(&from), @@ -705,39 +729,6 @@ impl Client { }) } - fn check_updates(&self) { - let operations_json = Interface::load(include_bytes!("../../res/Operations.json")).expect("Operations.json is valid ABI"); - let operations = Contract::new(operations_json); - - fn as_string(e: T) -> String { - format!("{:?}", e) - } - - let res = || { - let is_latest = try!(operations.function("isLatest".into()).map_err(as_string)); - let params = try!(is_latest.encode_call( - vec![Token::FixedBytes(b"par"[..].to_owned()), Token::Address(code_hash().0)] - ).map_err(as_string)); - println!("params: {}", params.pretty()); - let output = try!(self.call_contract("0x4c1783B4FfB1A99eFC4cda632aA990F5138b26f1".into(), params)); - let result = try!(is_latest.decode_output(output).map_err(as_string)); - - match result.get(0) { - Some(&Token::Bool(answer)) => Ok(answer), - e => Err(format!("Invalid result: {:?}", e)), - } - }; - - match res() { - Ok(res) => { - info!("isLatest returned {}", res); - }, - Err(e) => { - warn!(target: "dapps", "Error while calling Operations.isLatest: {:?}", e); - } - } - } - /// Look up the block number for the given block ID. pub fn block_number(&self, id: BlockID) -> Option { match id { diff --git a/ethcore/src/client/error.rs b/ethcore/src/client/error.rs index 8dcc2b7738a..86297a26c1d 100644 --- a/ethcore/src/client/error.rs +++ b/ethcore/src/client/error.rs @@ -1,3 +1,19 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + use trace::Error as TraceError; use util::UtilError; use std::fmt::{Display, Formatter, Error as FmtError}; diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 3898ab6cda5..b49301bbd17 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -16,11 +16,14 @@ //! Blockchain database client. +mod operations; +mod registry; mod config; mod error; mod test_client; mod trace; mod client; +mod updater; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; diff --git a/ethcore/src/client/operations.rs b/ethcore/src/client/operations.rs new file mode 100644 index 00000000000..bdc142b594b --- /dev/null +++ b/ethcore/src/client/operations.rs @@ -0,0 +1,336 @@ +// Autogenerated from JSON contract definition using Rust contract convertor. + +use std::string::String; +use std::result::Result; +use std::fmt; +use {util, ethabi}; +use util::FixedHash; +use util::Uint; + +pub struct Operations { + contract: ethabi::Contract, + address: util::Address, + do_call: Box) -> Result, String> + Send + 'static>, +} +impl Operations { + pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + 'static { + Operations { + contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"owners\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"findChecksum\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"forks\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"}],\"name\":\"addRelease\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"clients\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Received\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"TransactionProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"TransactionRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"spec\",\"type\":\"bytes32\"}],\"name\":\"ForkProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkAcceptedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkRejectedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRatified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"forkBlock\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"track\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"semver\",\"type\":\"uint24\"}],\"name\":\"ReleaseAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"platform\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"checksum\",\"type\":\"bytes32\"}],\"name\":\"ChecksumAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ClientAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"}],\"name\":\"ClientRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"ClientOwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"bool\"}],\"name\":\"ClientRequiredChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"}]").expect("JSON is autogenerated; qed")), + address: address, + do_call: Box::new(do_call), + } + } + fn as_string(e: T) -> String { format!("{:?}", e) } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"owners","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` + #[allow(dead_code)] + pub fn owners(&self, _1: &util::Address) -> Result { + let call = self.contract.function("owners".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_1.clone().0)] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn reset_client_owner(&self, _client: &util::H256, _new_owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("resetClientOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Address(_new_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"type":"function"}` + #[allow(dead_code)] + pub fn is_latest(&self, _client: &str, _release: &util::H256) -> Result { + let call = self.contract.function("isLatest".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn reject_transaction(&self, _txid: &util::H256) -> Result<(), String> { + let call = self.contract.function("rejectTransaction".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn set_owner(&self, _new_owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("setOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_new_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn remove_client(&self, _client: &util::H256) -> Result<(), String> { + let call = self.contract.function("removeClient".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn reject_fork(&self) -> Result<(), String> { + let call = self.contract.function("rejectFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"findChecksum","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"type":"function"}` + #[allow(dead_code)] + pub fn find_checksum(&self, _client: &util::H256, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { + let call = self.contract.function("findChecksum".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn propose_fork(&self, _number: u32, _name: &util::H256, _spec: &util::H256) -> Result<(), String> { + let call = self.contract.function("proposeFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn set_client_owner(&self, _new_owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("setClientOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_new_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn add_checksum(&self, _release: &util::H256, _platform: &util::H256, _checksum: &util::H256) -> Result<(), String> { + let call = self.contract.function("addChecksum".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_ref().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"}` + #[allow(dead_code)] + pub fn confirm_transaction(&self, _txid: &util::H256) -> Result { + let call = self.contract.function("confirmTransaction".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"type":"function"}` + #[allow(dead_code)] + pub fn proxy(&self, _1: &util::H256) -> Result<(util::U256, util::Address, Vec, util::U256, util::U256), String> { + let call = self.contract.function("proxy".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bytes().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn add_client(&self, _client: &util::H256, _owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("addClient".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Address(_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"forks","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"type":"function"}` + #[allow(dead_code)] + pub fn forks(&self, _1: u32) -> Result<(util::H256, util::H256, bool, util::U256), String> { + let call = self.contract.function("forks".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_1 as u64).to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"}` + #[allow(dead_code)] + pub fn owner(&self) -> Result { + let call = self.contract.function("owner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"}` + #[allow(dead_code)] + pub fn propose_transaction(&self, _txid: &util::H256, _to: &util::Address, _data: &[u8], _value: util::U256, _gas: util::U256) -> Result { + let call = self.contract.function("proposeTransaction".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned()), ethabi::Token::Address(_to.clone().0), ethabi::Token::Bytes(_data.to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; _value.to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; _gas.to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn accept_fork(&self) -> Result<(), String> { + let call = self.contract.function("acceptFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"type":"function"}` + #[allow(dead_code)] + pub fn clients_required(&self) -> Result { + let call = self.contract.function("clientsRequired".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u32 })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"type":"function"}` + #[allow(dead_code)] + pub fn track(&self, _client: &util::H256, _release: &util::H256) -> Result { + let call = self.contract.function("track".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u8 })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn set_client_required(&self, _client: &util::H256, _r: bool) -> Result<(), String> { + let call = self.contract.function("setClientRequired".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Bool(_r)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"}],"name":"addRelease","outputs":[],"type":"function"}` + #[allow(dead_code)] + pub fn add_release(&self, _release: &util::H256, _fork_block: u32, _track: u8, _semver: u32) -> Result<(), String> { + let call = self.contract.function("addRelease".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_semver as u64).to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"type":"function"}` + #[allow(dead_code)] + pub fn latest_fork(&self) -> Result { + let call = self.contract.function("latestFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u32 })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` + #[allow(dead_code)] + pub fn latest_in_track(&self, _client: &util::H256, _track: u8) -> Result { + let call = self.contract.function("latestInTrack".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_track as u64).to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"clients","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"type":"function"}` + #[allow(dead_code)] + pub fn clients(&self, _1: &util::H256) -> Result<(util::Address, bool), String> { + let call = self.contract.function("clients".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"type":"function"}` + #[allow(dead_code)] + pub fn proposed_fork(&self) -> Result { + let call = self.contract.function("proposedFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u32 })) + } +} \ No newline at end of file diff --git a/ethcore/src/client/registry.rs b/ethcore/src/client/registry.rs new file mode 100644 index 00000000000..f65661d8890 --- /dev/null +++ b/ethcore/src/client/registry.rs @@ -0,0 +1,264 @@ +// Autogenerated from JSON contract definition using Rust contract convertor. + +use std::string::String; +use std::result::Result; +use std::fmt; +use {util, ethabi}; +use util::FixedHash; +use util::Uint; + +pub struct Registry { + contract: ethabi::Contract, + address: util::Address, + do_call: Box) -> Result, String> + Send + 'static>, +} +impl Registry { + pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + 'static { + Registry { + contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":false,\"inputs\":[{\"name\":\"_new\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"confirmReverse\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"}],\"name\":\"reserve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_key\",\"type\":\"string\"},{\"name\":\"_value\",\"type\":\"bytes32\"}],\"name\":\"set\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"}],\"name\":\"drop\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_key\",\"type\":\"string\"}],\"name\":\"getAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"setFee\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"}],\"name\":\"reserved\",\"outputs\":[{\"name\":\"reserved\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"drain\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"string\"},{\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"proposeReverse\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_key\",\"type\":\"string\"}],\"name\":\"getUint\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_key\",\"type\":\"string\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"}],\"name\":\"getOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"reverse\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_key\",\"type\":\"string\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"setUint\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"removeReverse\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_key\",\"type\":\"string\"},{\"name\":\"_value\",\"type\":\"address\"}],\"name\":\"setAddress\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Drained\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Reserved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"Transferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Dropped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"plainKey\",\"type\":\"string\"}],\"name\":\"DataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"name\":\"reverse\",\"type\":\"address\"}],\"name\":\"ReverseProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"name\":\"reverse\",\"type\":\"address\"}],\"name\":\"ReverseConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"name\":\"reverse\",\"type\":\"address\"}],\"name\":\"ReverseRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"current\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"}]").expect("JSON is autogenerated; qed")), + address: address, + do_call: Box::new(do_call), + } + } + fn as_string(e: T) -> String { format!("{:?}", e) } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_owner(&self, _new: &util::Address) -> Result<(), String> { + let call = self.contract.function("setOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_new.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"confirmReverse","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn confirm_reverse(&self, _name: &str) -> Result { + let call = self.contract.function("confirmReverse".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::String(_name.to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn reserve(&self, _name: &util::H256) -> Result { + let call = self.contract.function("reserve".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"bytes32"}],"name":"set","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set(&self, _name: &util::H256, _key: &str, _value: &util::H256) -> Result { + let call = self.contract.function("set".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::String(_key.to_owned()), ethabi::Token::FixedBytes(_value.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"drop","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn drop(&self, _name: &util::H256) -> Result { + let call = self.contract.function("drop".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn get_address(&self, _name: &util::H256, _key: &str) -> Result { + let call = self.contract.function("getAddress".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::String(_key.to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"setFee","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_fee(&self, _amount: util::U256) -> Result<(), String> { + let call = self.contract.function("setFee".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; _amount.to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_to","type":"address"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn transfer(&self, _name: &util::H256, _to: &util::Address) -> Result { + let call = self.contract.function("transfer".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::Address(_to.clone().0)] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn owner(&self) -> Result { + let call = self.contract.function("owner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserved","outputs":[{"name":"reserved","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn reserved(&self, _name: &util::H256) -> Result { + let call = self.contract.function("reserved".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"drain","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn drain(&self) -> Result<(), String> { + let call = self.contract.function("drain".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_who","type":"address"}],"name":"proposeReverse","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn propose_reverse(&self, _name: &str, _who: &util::Address) -> Result { + let call = self.contract.function("proposeReverse".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::String(_name.to_owned()), ethabi::Token::Address(_who.clone().0)] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getUint","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn get_uint(&self, _name: &util::H256, _key: &str) -> Result { + let call = self.contract.function("getUint".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::String(_key.to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"get","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn get(&self, _name: &util::H256, _key: &str) -> Result { + let call = self.contract.function("get".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::String(_key.to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn fee(&self) -> Result { + let call = self.contract.function("fee".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn get_owner(&self, _name: &util::H256) -> Result { + let call = self.contract.function("getOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"reverse","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn reverse(&self, _1: &util::Address) -> Result { + let call = self.contract.function("reverse".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_1.clone().0)] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_string().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"uint256"}],"name":"setUint","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_uint(&self, _name: &util::H256, _key: &str, _value: util::U256) -> Result { + let call = self.contract.function("setUint".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::String(_key.to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; _value.to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"removeReverse","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn remove_reverse(&self) -> Result<(), String> { + let call = self.contract.function("removeReverse".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"address"}],"name":"setAddress","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_address(&self, _name: &util::H256, _key: &str, _value: &util::Address) -> Result { + let call = self.contract.function("setAddress".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::String(_key.to_owned()), ethabi::Token::Address(_value.clone().0)] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } +} \ No newline at end of file diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs new file mode 100644 index 00000000000..aaa6526be12 --- /dev/null +++ b/ethcore/src/client/updater.rs @@ -0,0 +1,45 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//use util::{U256, H256, Address, H2048, Uint, FixedHash}; +use std::sync::Weak; +use util::misc::code_hash; +use util::Address; +use client::operations::Operations; +use client::client::Client; + +pub struct Updater { + operations: Operations, +} + +impl Updater { + pub fn new(client: Weak, operations: Address) -> Self { + Updater { + operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), + } + } + + pub fn tick(&mut self) { + match self.operations.is_latest("par", &code_hash().into()) { + Ok(res) => { + info!("isLatest returned {}", res); + }, + Err(e) => { + warn!(target: "dapps", "Error while calling Operations.isLatest: {:?}", e); + } + } + } +} From cd770490fffc1e6f0f5d46830d84b0417f28d1cb Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 18 Nov 2016 19:22:47 +0800 Subject: [PATCH 04/87] Remove unneeded file. --- ethcore/res/Operations.json | 1 - ethcore/src/client/updater.rs | 1 - 2 files changed, 2 deletions(-) delete mode 100644 ethcore/res/Operations.json diff --git a/ethcore/res/Operations.json b/ethcore/res/Operations.json deleted file mode 100644 index 573a45169ad..00000000000 --- a/ethcore/res/Operations.json +++ /dev/null @@ -1 +0,0 @@ -[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"owners","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"findChecksum","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"forks","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"}],"name":"addRelease","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"type":"function"},{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"clients","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"txid","type":"bytes32"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"gas","type":"uint256"}],"name":"TransactionProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"txid","type":"bytes32"}],"name":"TransactionConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"txid","type":"bytes32"}],"name":"TransactionRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"txid","type":"bytes32"},{"indexed":false,"name":"success","type":"bool"}],"name":"TransactionRelayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"number","type":"uint32"},{"indexed":true,"name":"name","type":"bytes32"},{"indexed":false,"name":"spec","type":"bytes32"}],"name":"ForkProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"number","type":"uint32"}],"name":"ForkAcceptedBy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"number","type":"uint32"}],"name":"ForkRejectedBy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"forkNumber","type":"uint32"}],"name":"ForkRejected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"forkNumber","type":"uint32"}],"name":"ForkRatified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"forkBlock","type":"uint32"},{"indexed":true,"name":"release","type":"bytes32"},{"indexed":false,"name":"track","type":"uint8"},{"indexed":false,"name":"semver","type":"uint24"}],"name":"ReleaseAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"release","type":"bytes32"},{"indexed":true,"name":"platform","type":"bytes32"},{"indexed":false,"name":"checksum","type":"bytes32"}],"name":"ChecksumAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"ClientAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"}],"name":"ClientRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"now","type":"address"}],"name":"ClientOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"bytes32"},{"indexed":false,"name":"now","type":"bool"}],"name":"ClientRequiredChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"old","type":"address"},{"indexed":false,"name":"now","type":"address"}],"name":"OwnerChanged","type":"event"}] \ No newline at end of file diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index aaa6526be12..d3b483ee6aa 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -//use util::{U256, H256, Address, H2048, Uint, FixedHash}; use std::sync::Weak; use util::misc::code_hash; use util::Address; From 4fd575b5ecdd2513c34949aa28668633ef7bad2b Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 18 Nov 2016 19:52:11 +0800 Subject: [PATCH 05/87] Add traces. --- ethcore/src/client/client.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index b8111d77cf1..3676f0a0a20 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -255,11 +255,13 @@ impl Client { registrar: Mutex::new(None), }); if let Some(reg_addr) = client.additional_params().get("registrar").and_then(|s| Address::from_str(s).ok()) { + trace!(target: "client", "Found registrar at {}", reg_addr); let weak = Arc::downgrade(&client); let registrar = Registry::new(reg_addr, move |a, d| weak.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))); - if let Ok(operations) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { - if !operations.is_zero() { - *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), operations)); + if let Ok(ops_addr) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { + if !ops_addr.is_zero() { + trace!(target: "client", "Found operations at {}", ops_addr); + *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), ops_addr)); } } *client.registrar.lock() = Some(registrar); From 27a8608624f906be606a9c79fad9580aeada55b6 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 20 Nov 2016 13:18:56 +0100 Subject: [PATCH 06/87] More information in the updater. --- ethcore/src/client/operations.rs | 80 +++++++++++++++++++++----------- ethcore/src/client/updater.rs | 33 +++++++++---- 2 files changed, 76 insertions(+), 37 deletions(-) diff --git a/ethcore/src/client/operations.rs b/ethcore/src/client/operations.rs index bdc142b594b..3141f1c250e 100644 --- a/ethcore/src/client/operations.rs +++ b/ethcore/src/client/operations.rs @@ -4,8 +4,7 @@ use std::string::String; use std::result::Result; use std::fmt; use {util, ethabi}; -use util::FixedHash; -use util::Uint; +use util::{FixedHash, Uint}; pub struct Operations { contract: ethabi::Contract, @@ -15,7 +14,7 @@ pub struct Operations { impl Operations { pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + 'static { Operations { - contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"owners\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"findChecksum\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"forks\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"}],\"name\":\"addRelease\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"clients\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Received\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"TransactionProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"TransactionRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"spec\",\"type\":\"bytes32\"}],\"name\":\"ForkProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkAcceptedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkRejectedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRatified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"forkBlock\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"track\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"semver\",\"type\":\"uint24\"}],\"name\":\"ReleaseAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"platform\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"checksum\",\"type\":\"bytes32\"}],\"name\":\"ChecksumAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ClientAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"}],\"name\":\"ClientRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"ClientOwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"bool\"}],\"name\":\"ClientRequiredChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"}]").expect("JSON is autogenerated; qed")), + contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"owners\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"findRelease\",\"outputs\":[{\"name\":\"o_forkBlock\",\"type\":\"uint32\"},{\"name\":\"o_track\",\"type\":\"uint8\"},{\"name\":\"o_semver\",\"type\":\"uint24\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"findBuild\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"forks\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"}],\"name\":\"findChecksum\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"}],\"name\":\"addRelease\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"clients\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Received\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"TransactionProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"TransactionRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"spec\",\"type\":\"bytes32\"}],\"name\":\"ForkProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkAcceptedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkRejectedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRatified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"forkBlock\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"track\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"semver\",\"type\":\"uint24\"}],\"name\":\"ReleaseAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"platform\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"checksum\",\"type\":\"bytes32\"}],\"name\":\"ChecksumAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ClientAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"}],\"name\":\"ClientRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"ClientOwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"bool\"}],\"name\":\"ClientRequiredChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"}]").expect("JSON is autogenerated; qed")), address: address, do_call: Box::new(do_call), } @@ -36,10 +35,10 @@ impl Operations { /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"type":"function"}` #[allow(dead_code)] - pub fn reset_client_owner(&self, _client: &util::H256, _new_owner: &util::Address) -> Result<(), String> { + pub fn reset_client_owner(&self, _client: &str, _new_owner: &util::Address) -> Result<(), String> { let call = self.contract.function("resetClientOwner".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Address(_new_owner.clone().0)] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Address(_new_owner.clone().0)] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -58,6 +57,19 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) } + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"findRelease","outputs":[{"name":"o_forkBlock","type":"uint32"},{"name":"o_track","type":"uint8"},{"name":"o_semver","type":"uint24"}],"type":"function"}` + #[allow(dead_code)] + pub fn find_release(&self, _client: &str, _release: &util::H256) -> Result<(u32, u8, u32), String> { + let call = self.contract.function("findRelease".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = (self.do_call)(self.address.clone(), data)?; + let returned = call.decode_output(output).map_err(Self::as_string)?; + let mut result = returned.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) + } + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"type":"function"}` #[allow(dead_code)] pub fn reject_transaction(&self, _txid: &util::H256) -> Result<(), String> { @@ -84,10 +96,10 @@ impl Operations { /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"type":"function"}` #[allow(dead_code)] - pub fn remove_client(&self, _client: &util::H256) -> Result<(), String> { + pub fn remove_client(&self, _client: &str) -> Result<(), String> { let call = self.contract.function("removeClient".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned())] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned())] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -106,12 +118,12 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"findChecksum","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"findBuild","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"type":"function"}` #[allow(dead_code)] - pub fn find_checksum(&self, _client: &util::H256, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { - let call = self.contract.function("findChecksum".into()).map_err(Self::as_string)?; + pub fn find_build(&self, _client: &str, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { + let call = self.contract.function("findBuild".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); @@ -123,7 +135,7 @@ impl Operations { pub fn propose_fork(&self, _number: u32, _name: &util::H256, _spec: &util::H256) -> Result<(), String> { let call = self.contract.function("proposeFork".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -144,10 +156,10 @@ impl Operations { /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"type":"function"}` #[allow(dead_code)] - pub fn add_checksum(&self, _release: &util::H256, _platform: &util::H256, _checksum: &util::H256) -> Result<(), String> { + pub fn add_checksum(&self, _release: &util::H256, _platform: &str, _checksum: &util::H256) -> Result<(), String> { let call = self.contract.function("addChecksum".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_ref().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -180,10 +192,10 @@ impl Operations { /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"type":"function"}` #[allow(dead_code)] - pub fn add_client(&self, _client: &util::H256, _owner: &util::Address) -> Result<(), String> { + pub fn add_client(&self, _client: &str, _owner: &util::Address) -> Result<(), String> { let call = self.contract.function("addClient".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Address(_owner.clone().0)] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Address(_owner.clone().0)] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -195,7 +207,7 @@ impl Operations { pub fn forks(&self, _1: u32) -> Result<(util::H256, util::H256, bool, util::U256), String> { let call = self.contract.function("forks".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_1 as u64).to_big_endian(&mut r); r })] + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_1 as u64).to_big_endian(&mut r); r })] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); @@ -238,6 +250,18 @@ impl Operations { Ok(()) } + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"}],"name":"findChecksum","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` + #[allow(dead_code)] + pub fn find_checksum(&self, _client: &str, _release: &util::H256, _platform: &str) -> Result { + let call = self.contract.function("findChecksum".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"type":"function"}` #[allow(dead_code)] pub fn clients_required(&self) -> Result { @@ -247,27 +271,27 @@ impl Operations { ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u32 })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) } /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"type":"function"}` #[allow(dead_code)] - pub fn track(&self, _client: &util::H256, _release: &util::H256) -> Result { + pub fn track(&self, _client: &str, _release: &util::H256) -> Result { let call = self.contract.function("track".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u8 })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 })) } /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"type":"function"}` #[allow(dead_code)] - pub fn set_client_required(&self, _client: &util::H256, _r: bool) -> Result<(), String> { + pub fn set_client_required(&self, _client: &str, _r: bool) -> Result<(), String> { let call = self.contract.function("setClientRequired".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Bool(_r)] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Bool(_r)] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -279,7 +303,7 @@ impl Operations { pub fn add_release(&self, _release: &util::H256, _fork_block: u32, _track: u8, _semver: u32) -> Result<(), String> { let call = self.contract.function("addRelease".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_semver as u64).to_big_endian(&mut r); r })] + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_semver as u64).to_big_endian(&mut r); r })] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; @@ -295,15 +319,15 @@ impl Operations { ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u32 })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) } /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` #[allow(dead_code)] - pub fn latest_in_track(&self, _client: &util::H256, _track: u8) -> Result { + pub fn latest_in_track(&self, _client: &str, _track: u8) -> Result { let call = self.contract.function("latestInTrack".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U128::from(_track as u64).to_big_endian(&mut r); r })] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r })] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); @@ -331,6 +355,6 @@ impl Operations { ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U128::from(r.as_ref()).as_u64() as u32 })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) } } \ No newline at end of file diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index d3b483ee6aa..4fb210ca635 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -16,7 +16,7 @@ use std::sync::Weak; use util::misc::code_hash; -use util::Address; +use util::{Address, H160}; use client::operations::Operations; use client::client::Client; @@ -24,6 +24,10 @@ pub struct Updater { operations: Operations, } +fn platform() -> &'static str { + "linux_x64" +} + impl Updater { pub fn new(client: Weak, operations: Address) -> Self { Updater { @@ -32,13 +36,24 @@ impl Updater { } pub fn tick(&mut self) { - match self.operations.is_latest("par", &code_hash().into()) { - Ok(res) => { - info!("isLatest returned {}", res); - }, - Err(e) => { - warn!(target: "dapps", "Error while calling Operations.isLatest: {:?}", e); - } - } + (|| -> Result<(), String> { + let code_hash = H160::from("0x080ec8043f41e25ee8aa4ee6112906ac6d82ea74").into();//code_hash().into(); + let client = "parity"; + + let (fork, track, semver) = self.operations.find_release(client, &code_hash)?; + let track_name = match track { 1 => "stable", 2 => "beta", 3 => "nightly", _ => "unknown" }; + info!(target: "updater", "Current release ({}) is {}.{}.{}-{} and latest fork it supports is at block #{}", H160::from(code_hash), semver >> 16, (semver >> 8) & 0xff, semver & 0xff, track_name, fork); + + let latest_fork = self.operations.latest_fork()?; + info!(target: "updater", "Latest fork is at block #{}", latest_fork); + + let latest = self.operations.latest_in_track(client, track)?; + let (fork, _, semver) = self.operations.find_release(client, &latest)?; + info!(target: "updater", "Latest release in our track is {}.{}.{}-{} ({:?}); supports fork at block #{}", semver >> 16, (semver >> 8) & 0xff, semver & 0xff, track_name, H160::from(latest), fork); + + let exe_hash = self.operations.find_checksum(client, &latest, platform())?; + info!(target: "updater", "Latest release's binary on {} is {}", platform(), exe_hash); + Ok(()) + })().unwrap_or_else(|e| warn!("{}", e)); } } From 45dead9d49b02d8d9a948bde4fc994e2d96d6b12 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 22 Nov 2016 10:24:22 +0100 Subject: [PATCH 07/87] Naming consistency and make Updater improvements. - ID -> Id (consistency with rust libs) --- Cargo.lock | 20 +++ ethcore/light/src/client.rs | 6 +- ethcore/src/client/client.rs | 119 ++++++++-------- ethcore/src/client/operations.rs | 197 +++++++++++++------------- ethcore/src/client/test_client.rs | 86 +++++------ ethcore/src/client/traits.rs | 70 ++++----- ethcore/src/client/updater.rs | 86 +++++++---- ethcore/src/miner/miner.rs | 6 +- ethcore/src/snapshot/error.rs | 4 +- ethcore/src/snapshot/mod.rs | 4 +- ethcore/src/snapshot/service.rs | 4 +- ethcore/src/snapshot/tests/service.rs | 6 +- ethcore/src/snapshot/watcher.rs | 4 +- ethcore/src/tests/client.rs | 20 +-- ethcore/src/tests/rpc.rs | 4 +- ethcore/src/types/filter.rs | 28 ++-- ethcore/src/types/ids.rs | 12 +- ethcore/src/types/trace_filter.rs | 4 +- ethstore/src/dir/disk.rs | 4 +- ethstore/src/ethstore.rs | 4 +- ethstore/src/json/error.rs | 4 +- ethstore/src/json/id.rs | 48 +++---- ethstore/src/json/key_file.rs | 8 +- ethstore/src/json/mod.rs.in | 2 +- ethstore/src/secret_store.rs | 4 +- parity/blockchain.rs | 8 +- parity/cli/usage.txt | 8 ++ parity/configuration.rs | 10 +- parity/dapps.rs | 4 +- parity/helpers.rs | 22 +-- parity/informant.rs | 4 +- parity/snapshot.rs | 4 +- rpc/src/v1/impls/eth.rs | 28 ++-- rpc/src/v1/impls/eth_filter.rs | 10 +- rpc/src/v1/impls/parity.rs | 4 +- rpc/src/v1/impls/traces.rs | 8 +- rpc/src/v1/tests/eth.rs | 4 +- rpc/src/v1/tests/mocked/eth.rs | 4 +- rpc/src/v1/types/block_number.rs | 24 ++-- rpc/src/v1/types/filter.rs | 12 +- rpc/src/v1/types/trace_filter.rs | 6 +- sync/src/block_sync.rs | 6 +- sync/src/blocks.rs | 10 +- sync/src/chain.rs | 34 ++--- sync/src/tests/chain.rs | 12 +- util/Cargo.toml | 1 + util/src/lib.rs | 1 + util/src/misc.rs | 122 ++++++++++++++-- 48 files changed, 634 insertions(+), 466 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 300929e6eeb..d5e7fab1e12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -581,6 +581,7 @@ dependencies = [ "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (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.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.1.0", "table 0.1.0", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1574,6 +1575,23 @@ dependencies = [ "nom 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "semver" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.6.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)", + "regex 0.1.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "serde" version = "0.8.4" @@ -2112,6 +2130,8 @@ dependencies = [ "checksum rustls 0.1.2 (git+https://github.com/ctz/rustls)" = "" "checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2d5b7638a1f03815d94e88cb3b3c08e87f0db4d683ef499d1836aaf70a45623f" +"checksum semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae2ff60ecdb19c255841c066cbfa5f8c2a4ada1eb3ae47c77ab6667128da71f5" +"checksum semver-parser 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e88e43a5a74dd2a11707f9c21dfd4a423c66bd871df813227bb0a3e78f3a1ae9" "checksum serde 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b1dfda9ebb31d29fa8b94d7eb3031a86a8dcec065f0fe268a30f98867bf45775" "checksum serde_codegen 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e422ae53d7933f59c6ff57e7b5870b5c9094b1f473f78ec33d89f8a692c3ec02" "checksum serde_codegen_internals 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f877e2781ed0a323295d1c9f0e26556117b5a11489fc47b1848dfb98b3173d21" diff --git a/ethcore/light/src/client.rs b/ethcore/light/src/client.rs index e3b5745b2f7..3a7706bef6a 100644 --- a/ethcore/light/src/client.rs +++ b/ethcore/light/src/client.rs @@ -20,7 +20,7 @@ use std::sync::Arc; use ethcore::engines::Engine; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use ethcore::service::ClientIoMessage; use ethcore::block_import_error::BlockImportError; use ethcore::block_status::BlockStatus; @@ -51,7 +51,7 @@ impl Client { } /// Whether the block is already known (but not necessarily part of the canonical chain) - pub fn is_known(&self, _id: BlockID) -> bool { + pub fn is_known(&self, _id: BlockId) -> bool { false } @@ -61,7 +61,7 @@ impl Client { } /// Inquire about the status of a given block. - pub fn status(&self, _id: BlockID) -> BlockStatus { + pub fn status(&self, _id: BlockId) -> BlockStatus { BlockStatus::Unknown } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 66fad24d29d..a4fa5aa57c5 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -52,7 +52,7 @@ use log_entry::LocalizedLogEntry; use verification::queue::BlockQueue; use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute}; use client::{ - BlockID, TransactionID, UncleID, TraceId, ClientConfig, BlockChainClient, + BlockId, TransactionId, UncleId, TraceId, ClientConfig, BlockChainClient, MiningBlockChainClient, TraceFilter, CallAnalytics, BlockImportError, Mode, ChainNotify, }; @@ -594,13 +594,13 @@ impl Client { /// Attempt to get a copy of a specific block's final state. /// - /// This will not fail if given BlockID::Latest. + /// This will not fail if given BlockId::Latest. /// Otherwise, this can fail (but may not) if the DB prunes state. - pub fn state_at(&self, id: BlockID) -> Option { + pub fn state_at(&self, id: BlockId) -> Option { // fast path for latest state. match id.clone() { - BlockID::Pending => return self.miner.pending_state().or_else(|| Some(self.state())), - BlockID::Latest => return Some(self.state()), + BlockId::Pending => return self.miner.pending_state().or_else(|| Some(self.state())), + BlockId::Latest => return Some(self.state()), _ => {}, } @@ -625,15 +625,15 @@ impl Client { /// Attempt to get a copy of a specific block's beginning state. /// - /// This will not fail if given BlockID::Latest. + /// This will not fail if given BlockId::Latest. /// Otherwise, this can fail (but may not) if the DB prunes state. - pub fn state_at_beginning(&self, id: BlockID) -> Option { + pub fn state_at_beginning(&self, id: BlockId) -> Option { // fast path for latest state. match id { - BlockID::Pending => self.state_at(BlockID::Latest), + BlockId::Pending => self.state_at(BlockId::Latest), id => match self.block_number(id) { None | Some(0) => None, - Some(n) => self.state_at(BlockID::Number(n - 1)), + Some(n) => self.state_at(BlockId::Number(n - 1)), } } } @@ -724,30 +724,31 @@ impl Client { data: data, }.fake_sign(from); - self.call(&transaction, BlockID::Latest, Default::default()) + self.call(&transaction, BlockId::Latest, Default::default()) .map_err(|e| format!("{:?}", e)) .map(|executed| { executed.output }) } + /// Get the updater object. pub fn updater(&self) -> MutexGuard> { self.updater.lock() } - /// Look up the block number for the given block ID. - pub fn block_number(&self, id: BlockID) -> Option { + /// Look up the block number for the given block Id. + pub fn block_number(&self, id: BlockId) -> Option { match id { - BlockID::Number(number) => Some(number), - BlockID::Hash(ref hash) => self.chain.read().block_number(hash), - BlockID::Earliest => Some(0), - BlockID::Latest | BlockID::Pending => Some(self.chain.read().best_block_number()), + BlockId::Number(number) => Some(number), + BlockId::Hash(ref hash) => self.chain.read().block_number(hash), + BlockId::Earliest => Some(0), + BlockId::Latest | BlockId::Pending => Some(self.chain.read().best_block_number()), } } /// Take a snapshot at the given block. - /// If the ID given is "latest", this will default to 1000 blocks behind. - pub fn take_snapshot(&self, writer: W, at: BlockID, p: &snapshot::Progress) -> Result<(), EthcoreError> { + /// If the Id given is "latest", this will default to 1000 blocks behind. + pub fn take_snapshot(&self, writer: W, at: BlockId, p: &snapshot::Progress) -> Result<(), EthcoreError> { let db = self.state_db.lock().journal_db().boxed_clone(); let best_block_number = self.chain_info().best_block_number; let block_number = try!(self.block_number(at).ok_or(snapshot::Error::InvalidStartingBlock(at))); @@ -759,13 +760,13 @@ impl Client { let history = ::std::cmp::min(self.history, 1000); let start_hash = match at { - BlockID::Latest => { + BlockId::Latest => { let start_num = match db.earliest_era() { Some(era) => ::std::cmp::max(era, best_block_number - history), None => best_block_number - history, }; - match self.block_hash(BlockID::Number(start_num)) { + match self.block_hash(BlockId::Number(start_num)) { Some(h) => h, None => return Err(snapshot::Error::InvalidStartingBlock(at).into()), } @@ -786,19 +787,19 @@ impl Client { self.history } - fn block_hash(chain: &BlockChain, id: BlockID) -> Option { + fn block_hash(chain: &BlockChain, id: BlockId) -> Option { match id { - BlockID::Hash(hash) => Some(hash), - BlockID::Number(number) => chain.block_hash(number), - BlockID::Earliest => chain.block_hash(0), - BlockID::Latest | BlockID::Pending => Some(chain.best_block_hash()), + BlockId::Hash(hash) => Some(hash), + BlockId::Number(number) => chain.block_hash(number), + BlockId::Earliest => chain.block_hash(0), + BlockId::Latest | BlockId::Pending => Some(chain.best_block_hash()), } } - fn transaction_address(&self, id: TransactionID) -> Option { + fn transaction_address(&self, id: TransactionId) -> Option { match id { - TransactionID::Hash(ref hash) => self.chain.read().transaction_address(hash), - TransactionID::Location(id, index) => Self::block_hash(&self.chain.read(), id).map(|hash| TransactionAddress { + TransactionId::Hash(ref hash) => self.chain.read().transaction_address(hash), + TransactionId::Location(id, index) => Self::block_hash(&self.chain.read(), id).map(|hash| TransactionAddress { block_hash: hash, index: index, }) @@ -852,7 +853,7 @@ impl snapshot::DatabaseRestore for Client { impl BlockChainClient for Client { - fn call(&self, t: &SignedTransaction, block: BlockID, analytics: CallAnalytics) -> Result { + fn call(&self, t: &SignedTransaction, block: BlockId, analytics: CallAnalytics) -> Result { let header = try!(self.block_header(block).ok_or(CallError::StatePruned)); let view = HeaderView::new(&header); let last_hashes = self.build_last_hashes(view.parent_hash()); @@ -888,11 +889,11 @@ impl BlockChainClient for Client { Ok(ret) } - fn replay(&self, id: TransactionID, analytics: CallAnalytics) -> Result { + fn replay(&self, id: TransactionId, analytics: CallAnalytics) -> Result { let address = try!(self.transaction_address(id).ok_or(CallError::TransactionNotFound)); - let header_data = try!(self.block_header(BlockID::Hash(address.block_hash)).ok_or(CallError::StatePruned)); - let body_data = try!(self.block_body(BlockID::Hash(address.block_hash)).ok_or(CallError::StatePruned)); - let mut state = try!(self.state_at_beginning(BlockID::Hash(address.block_hash)).ok_or(CallError::StatePruned)); + let header_data = try!(self.block_header(BlockId::Hash(address.block_hash)).ok_or(CallError::StatePruned)); + let body_data = try!(self.block_body(BlockId::Hash(address.block_hash)).ok_or(CallError::StatePruned)); + let mut state = try!(self.state_at_beginning(BlockId::Hash(address.block_hash)).ok_or(CallError::StatePruned)); let txs = BodyView::new(&body_data).transactions(); if address.index >= txs.len() { @@ -965,18 +966,18 @@ impl BlockChainClient for Client { self.chain.read().best_block_header() } - fn block_header(&self, id: BlockID) -> Option { + fn block_header(&self, id: BlockId) -> Option { let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_header_data(&hash)) } - fn block_body(&self, id: BlockID) -> Option { + fn block_body(&self, id: BlockId) -> Option { let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_body(&hash)) } - fn block(&self, id: BlockID) -> Option { - if let BlockID::Pending = id { + fn block(&self, id: BlockId) -> Option { + if let BlockId::Pending = id { if let Some(block) = self.miner.pending_block() { return Some(block.rlp_bytes(Seal::Without)); } @@ -987,7 +988,7 @@ impl BlockChainClient for Client { }) } - fn block_status(&self, id: BlockID) -> BlockStatus { + fn block_status(&self, id: BlockId) -> BlockStatus { let chain = self.chain.read(); match Self::block_hash(&chain, id) { Some(ref hash) if chain.is_known(hash) => BlockStatus::InChain, @@ -996,38 +997,38 @@ impl BlockChainClient for Client { } } - fn block_total_difficulty(&self, id: BlockID) -> Option { - if let BlockID::Pending = id { + fn block_total_difficulty(&self, id: BlockId) -> Option { + if let BlockId::Pending = id { if let Some(block) = self.miner.pending_block() { - return Some(*block.header.difficulty() + self.block_total_difficulty(BlockID::Latest).expect("blocks in chain have details; qed")); + return Some(*block.header.difficulty() + self.block_total_difficulty(BlockId::Latest).expect("blocks in chain have details; qed")); } } let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_details(&hash)).map(|d| d.total_difficulty) } - fn nonce(&self, address: &Address, id: BlockID) -> Option { + fn nonce(&self, address: &Address, id: BlockId) -> Option { self.state_at(id).map(|s| s.nonce(address)) } - fn block_hash(&self, id: BlockID) -> Option { + fn block_hash(&self, id: BlockId) -> Option { let chain = self.chain.read(); Self::block_hash(&chain, id) } - fn code(&self, address: &Address, id: BlockID) -> Option> { + fn code(&self, address: &Address, id: BlockId) -> Option> { self.state_at(id).map(|s| s.code(address).map(|c| (*c).clone())) } - fn balance(&self, address: &Address, id: BlockID) -> Option { + fn balance(&self, address: &Address, id: BlockId) -> Option { self.state_at(id).map(|s| s.balance(address)) } - fn storage_at(&self, address: &Address, position: &H256, id: BlockID) -> Option { + fn storage_at(&self, address: &Address, position: &H256, id: BlockId) -> Option { self.state_at(id).map(|s| s.storage_at(address, position)) } - fn list_accounts(&self, id: BlockID) -> Option> { + fn list_accounts(&self, id: BlockId) -> Option> { if !self.factories.trie.is_fat() { trace!(target: "fatdb", "list_accounts: Not a fat DB"); return None; @@ -1059,16 +1060,16 @@ impl BlockChainClient for Client { Some(accounts) } - fn transaction(&self, id: TransactionID) -> Option { + fn transaction(&self, id: TransactionId) -> Option { self.transaction_address(id).and_then(|address| self.chain.read().transaction(&address)) } - fn uncle(&self, id: UncleID) -> Option { + fn uncle(&self, id: UncleId) -> Option { let index = id.position; self.block_body(id.block).and_then(|body| BodyView::new(&body).uncle_rlp_at(index)) } - fn transaction_receipt(&self, id: TransactionID) -> Option { + fn transaction_receipt(&self, id: TransactionId) -> Option { let chain = self.chain.read(); self.transaction_address(id) .and_then(|address| chain.block_number(&address.block_hash).and_then(|block_number| { @@ -1152,7 +1153,7 @@ impl BlockChainClient for Client { if self.chain.read().is_known(&unverified.hash()) { return Err(BlockImportError::Import(ImportError::AlreadyInChain)); } - if self.block_status(BlockID::Hash(unverified.parent_hash())) == BlockStatus::Unknown { + if self.block_status(BlockId::Hash(unverified.parent_hash())) == BlockStatus::Unknown { return Err(BlockImportError::Block(BlockError::UnknownParent(unverified.parent_hash()))); } } @@ -1166,7 +1167,7 @@ impl BlockChainClient for Client { if self.chain.read().is_known(&header.hash()) { return Err(BlockImportError::Import(ImportError::AlreadyInChain)); } - if self.block_status(BlockID::Hash(header.parent_hash())) == BlockStatus::Unknown { + if self.block_status(BlockId::Hash(header.parent_hash())) == BlockStatus::Unknown { return Err(BlockImportError::Block(BlockError::UnknownParent(header.parent_hash()))); } } @@ -1189,7 +1190,7 @@ impl BlockChainClient for Client { self.engine.additional_params().into_iter().collect() } - fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockID, to_block: BlockID) -> Option> { + fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockId, to_block: BlockId) -> Option> { match (self.block_number(from_block), self.block_number(to_block)) { (Some(from), Some(to)) => Some(self.chain.read().blocks_with_bloom(bloom, from, to)), _ => None @@ -1231,20 +1232,20 @@ impl BlockChainClient for Client { let trace_address = trace.address; self.transaction_address(trace.transaction) .and_then(|tx_address| { - self.block_number(BlockID::Hash(tx_address.block_hash)) + self.block_number(BlockId::Hash(tx_address.block_hash)) .and_then(|number| self.tracedb.read().trace(number, tx_address.index, trace_address)) }) } - fn transaction_traces(&self, transaction: TransactionID) -> Option> { + fn transaction_traces(&self, transaction: TransactionId) -> Option> { self.transaction_address(transaction) .and_then(|tx_address| { - self.block_number(BlockID::Hash(tx_address.block_hash)) + self.block_number(BlockId::Hash(tx_address.block_hash)) .and_then(|number| self.tracedb.read().transaction_traces(number, tx_address.index)) }) } - fn block_traces(&self, block: BlockID) -> Option> { + fn block_traces(&self, block: BlockId) -> Option> { self.block_number(block) .and_then(|number| self.tracedb.read().block_traces(number)) } @@ -1279,13 +1280,13 @@ impl BlockChainClient for Client { self.engine.signing_network_id(&self.latest_env_info()) } - fn block_extra_info(&self, id: BlockID) -> Option> { + fn block_extra_info(&self, id: BlockId) -> Option> { self.block_header(id) .map(|block| decode(&block)) .map(|header| self.engine.extra_info(&header)) } - fn uncle_extra_info(&self, id: UncleID) -> Option> { + fn uncle_extra_info(&self, id: UncleId) -> Option> { self.uncle(id) .map(|header| self.engine.extra_info(&decode(&header))) } diff --git a/ethcore/src/client/operations.rs b/ethcore/src/client/operations.rs index 3141f1c250e..e0408cdb06e 100644 --- a/ethcore/src/client/operations.rs +++ b/ethcore/src/client/operations.rs @@ -14,26 +14,14 @@ pub struct Operations { impl Operations { pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + 'static { Operations { - contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"owners\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"findRelease\",\"outputs\":[{\"name\":\"o_forkBlock\",\"type\":\"uint32\"},{\"name\":\"o_track\",\"type\":\"uint8\"},{\"name\":\"o_semver\",\"type\":\"uint24\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"findBuild\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"forks\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"}],\"name\":\"findChecksum\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"}],\"name\":\"addRelease\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"clients\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"type\":\"function\"},{\"inputs\":[],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Received\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"TransactionProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"}],\"name\":\"TransactionRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"txid\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"TransactionRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"spec\",\"type\":\"bytes32\"}],\"name\":\"ForkProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkAcceptedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"number\",\"type\":\"uint32\"}],\"name\":\"ForkRejectedBy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"forkNumber\",\"type\":\"uint32\"}],\"name\":\"ForkRatified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"forkBlock\",\"type\":\"uint32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"track\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"semver\",\"type\":\"uint24\"}],\"name\":\"ReleaseAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"release\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"platform\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"checksum\",\"type\":\"bytes32\"}],\"name\":\"ChecksumAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ClientAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"}],\"name\":\"ClientRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"ClientOwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"client\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"bool\"}],\"name\":\"ClientRequiredChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"old\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"now\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"}]").expect("JSON is autogenerated; qed")), + contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_hard\",\"type\":\"bool\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"release\",\"outputs\":[{\"name\":\"o_forkBlock\",\"type\":\"uint32\"},{\"name\":\"o_track\",\"type\":\"uint8\"},{\"name\":\"o_semver\",\"type\":\"uint24\"},{\"name\":\"o_critical\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"build\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"client\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"fork\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"hard\",\"type\":\"bool\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"clientOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"grandOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"},{\"name\":\"_critical\",\"type\":\"bool\"}],\"name\":\"addRelease\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"}],\"name\":\"checksum\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"}]").expect("JSON is autogenerated; qed")), address: address, do_call: Box::new(do_call), } } fn as_string(e: T) -> String { format!("{:?}", e) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"owners","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` - #[allow(dead_code)] - pub fn owners(&self, _1: &util::Address) -> Result { - let call = self.contract.function("owners".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::Address(_1.clone().0)] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn reset_client_owner(&self, _client: &str, _new_owner: &util::Address) -> Result<(), String> { let call = self.contract.function("resetClientOwner".into()).map_err(Self::as_string)?; @@ -45,7 +33,7 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn is_latest(&self, _client: &str, _release: &util::H256) -> Result { let call = self.contract.function("isLatest".into()).map_err(Self::as_string)?; @@ -57,20 +45,7 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"findRelease","outputs":[{"name":"o_forkBlock","type":"uint32"},{"name":"o_track","type":"uint8"},{"name":"o_semver","type":"uint24"}],"type":"function"}` - #[allow(dead_code)] - pub fn find_release(&self, _client: &str, _release: &util::H256) -> Result<(u32, u8, u32), String> { - let call = self.contract.function("findRelease".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = (self.do_call)(self.address.clone(), data)?; - let returned = call.decode_output(output).map_err(Self::as_string)?; - let mut result = returned.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn reject_transaction(&self, _txid: &util::H256) -> Result<(), String> { let call = self.contract.function("rejectTransaction".into()).map_err(Self::as_string)?; @@ -82,7 +57,7 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn set_owner(&self, _new_owner: &util::Address) -> Result<(), String> { let call = self.contract.function("setOwner".into()).map_err(Self::as_string)?; @@ -94,34 +69,46 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_hard","type":"bool"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn remove_client(&self, _client: &str) -> Result<(), String> { - let call = self.contract.function("removeClient".into()).map_err(Self::as_string)?; + pub fn propose_fork(&self, _number: u32, _name: &util::H256, _hard: bool, _spec: &util::H256) -> Result<(), String> { + let call = self.contract.function("proposeFork".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned())] + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::Bool(_hard), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn reject_fork(&self) -> Result<(), String> { - let call = self.contract.function("rejectFork".into()).map_err(Self::as_string)?; + pub fn remove_client(&self, _client: &str) -> Result<(), String> { + let call = self.contract.function("removeClient".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned())] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; Ok(()) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"findBuild","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"release","outputs":[{"name":"o_forkBlock","type":"uint32"},{"name":"o_track","type":"uint8"},{"name":"o_semver","type":"uint24"},{"name":"o_critical","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn release(&self, _client: &str, _release: &util::H256) -> Result<(u32, u8, u32, bool), String> { + let call = self.contract.function("release".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"build","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn find_build(&self, _client: &str, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { - let call = self.contract.function("findBuild".into()).map_err(Self::as_string)?; + pub fn build(&self, _client: &str, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { + let call = self.contract.function("build".into()).map_err(Self::as_string)?; let data = call.encode_call( vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] ).map_err(Self::as_string)?; @@ -130,19 +117,31 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn propose_fork(&self, _number: u32, _name: &util::H256, _spec: &util::H256) -> Result<(), String> { - let call = self.contract.function("proposeFork".into()).map_err(Self::as_string)?; + pub fn reject_fork(&self) -> Result<(), String> { + let call = self.contract.function("rejectFork".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] + vec![] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"client","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn client(&self, _1: &util::H256) -> Result<(util::Address, bool), String> { + let call = self.contract.function("client".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn set_client_owner(&self, _new_owner: &util::Address) -> Result<(), String> { let call = self.contract.function("setClientOwner".into()).map_err(Self::as_string)?; @@ -154,7 +153,19 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"fork","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"hard","type":"bool"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn fork(&self, _1: u32) -> Result<(util::H256, util::H256, bool, bool, util::U256), String> { + let call = self.contract.function("fork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_1 as u64).to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn add_checksum(&self, _release: &util::H256, _platform: &str, _checksum: &util::H256) -> Result<(), String> { let call = self.contract.function("addChecksum".into()).map_err(Self::as_string)?; @@ -166,7 +177,7 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn confirm_transaction(&self, _txid: &util::H256) -> Result { let call = self.contract.function("confirmTransaction".into()).map_err(Self::as_string)?; @@ -178,7 +189,7 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn proxy(&self, _1: &util::H256) -> Result<(util::U256, util::Address, Vec, util::U256, util::U256), String> { let call = self.contract.function("proxy".into()).map_err(Self::as_string)?; @@ -190,7 +201,7 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bytes().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn add_client(&self, _client: &str, _owner: &util::Address) -> Result<(), String> { let call = self.contract.function("addClient".into()).map_err(Self::as_string)?; @@ -202,67 +213,67 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"forks","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"clientOwner","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn forks(&self, _1: u32) -> Result<(util::H256, util::H256, bool, util::U256), String> { - let call = self.contract.function("forks".into()).map_err(Self::as_string)?; + pub fn client_owner(&self, _1: &util::Address) -> Result { + let call = self.contract.function("clientOwner".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_1 as u64).to_big_endian(&mut r); r })] + vec![ethabi::Token::Address(_1.clone().0)] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) } - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn owner(&self) -> Result { - let call = self.contract.function("owner".into()).map_err(Self::as_string)?; + pub fn propose_transaction(&self, _txid: &util::H256, _to: &util::Address, _data: &[u8], _value: util::U256, _gas: util::U256) -> Result { + let call = self.contract.function("proposeTransaction".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![] + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned()), ethabi::Token::Address(_to.clone().0), ethabi::Token::Bytes(_data.to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; _value.to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; _gas.to_big_endian(&mut r); r })] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"grandOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn propose_transaction(&self, _txid: &util::H256, _to: &util::Address, _data: &[u8], _value: util::U256, _gas: util::U256) -> Result { - let call = self.contract.function("proposeTransaction".into()).map_err(Self::as_string)?; + pub fn grand_owner(&self) -> Result { + let call = self.contract.function("grandOwner".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned()), ethabi::Token::Address(_to.clone().0), ethabi::Token::Bytes(_data.to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; _value.to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; _gas.to_big_endian(&mut r); r })] + vec![] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) } - /// Auto-generated from: `{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"},{"name":"_critical","type":"bool"}],"name":"addRelease","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn accept_fork(&self) -> Result<(), String> { - let call = self.contract.function("acceptFork".into()).map_err(Self::as_string)?; + pub fn add_release(&self, _release: &util::H256, _fork_block: u32, _track: u8, _semver: u32, _critical: bool) -> Result<(), String> { + let call = self.contract.function("addRelease".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![] + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_semver as u64).to_big_endian(&mut r); r }), ethabi::Token::Bool(_critical)] ).map_err(Self::as_string)?; call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; Ok(()) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"}],"name":"findChecksum","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn find_checksum(&self, _client: &str, _release: &util::H256, _platform: &str) -> Result { - let call = self.contract.function("findChecksum".into()).map_err(Self::as_string)?; + pub fn accept_fork(&self) -> Result<(), String> { + let call = self.contract.function("acceptFork".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned())] + vec![] ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) } - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn clients_required(&self) -> Result { let call = self.contract.function("clientsRequired".into()).map_err(Self::as_string)?; @@ -274,7 +285,7 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn track(&self, _client: &str, _release: &util::H256) -> Result { let call = self.contract.function("track".into()).map_err(Self::as_string)?; @@ -286,7 +297,7 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 })) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"type":"function"}` + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn set_client_required(&self, _client: &str, _r: bool) -> Result<(), String> { let call = self.contract.function("setClientRequired".into()).map_err(Self::as_string)?; @@ -298,19 +309,7 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"}],"name":"addRelease","outputs":[],"type":"function"}` - #[allow(dead_code)] - pub fn add_release(&self, _release: &util::H256, _fork_block: u32, _track: u8, _semver: u32) -> Result<(), String> { - let call = self.contract.function("addRelease".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_semver as u64).to_big_endian(&mut r); r })] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn latest_fork(&self) -> Result { let call = self.contract.function("latestFork".into()).map_err(Self::as_string)?; @@ -322,7 +321,7 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn latest_in_track(&self, _client: &str, _track: u8) -> Result { let call = self.contract.function("latestInTrack".into()).map_err(Self::as_string)?; @@ -334,19 +333,19 @@ impl Operations { Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) } - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"clients","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"}],"name":"checksum","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` #[allow(dead_code)] - pub fn clients(&self, _1: &util::H256) -> Result<(util::Address, bool), String> { - let call = self.contract.function("clients".into()).map_err(Self::as_string)?; + pub fn checksum(&self, _client: &str, _release: &util::H256, _platform: &str) -> Result { + let call = self.contract.function("checksum".into()).map_err(Self::as_string)?; let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned())] ).map_err(Self::as_string)?; let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) } - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"type":"function"}` + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` #[allow(dead_code)] pub fn proposed_fork(&self) -> Result { let call = self.contract.function("proposedFork".into()).map_err(Self::as_string)?; diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 84ed25b371a..f7f57291459 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -24,8 +24,8 @@ use devtools::*; use transaction::{Transaction, LocalizedTransaction, SignedTransaction, Action}; use blockchain::TreeRoute; use client::{ - BlockChainClient, MiningBlockChainClient, BlockChainInfo, BlockStatus, BlockID, - TransactionID, UncleID, TraceId, TraceFilter, LastHashes, CallAnalytics, BlockImportError, + BlockChainClient, MiningBlockChainClient, BlockChainInfo, BlockStatus, BlockId, + TransactionId, UncleId, TraceId, TraceFilter, LastHashes, CallAnalytics, BlockImportError, }; use db::{NUM_COLUMNS, COL_STATE}; use header::{Header as BlockHeader, BlockNumber}; @@ -72,7 +72,7 @@ pub struct TestBlockChainClient { /// Execution result. pub execution_result: RwLock>>, /// Transaction receipts. - pub receipts: RwLock>, + pub receipts: RwLock>, /// Logs pub logs: RwLock>, /// Block queue size. @@ -157,7 +157,7 @@ impl TestBlockChainClient { } /// Set the transaction receipt result - pub fn set_transaction_receipt(&self, id: TransactionID, receipt: LocalizedReceipt) { + pub fn set_transaction_receipt(&self, id: TransactionId, receipt: LocalizedReceipt) { self.receipts.write().insert(id, receipt); } @@ -255,8 +255,8 @@ impl TestBlockChainClient { /// Make a bad block by setting invalid extra data. pub fn corrupt_block(&mut self, n: BlockNumber) { - let hash = self.block_hash(BlockID::Number(n)).unwrap(); - let mut header: BlockHeader = decode(&self.block_header(BlockID::Number(n)).unwrap()); + let hash = self.block_hash(BlockId::Number(n)).unwrap(); + let mut header: BlockHeader = decode(&self.block_header(BlockId::Number(n)).unwrap()); header.set_extra_data(b"This extra data is way too long to be considered valid".to_vec()); let mut rlp = RlpStream::new_list(3); rlp.append(&header); @@ -267,8 +267,8 @@ impl TestBlockChainClient { /// Make a bad block by setting invalid parent hash. pub fn corrupt_block_parent(&mut self, n: BlockNumber) { - let hash = self.block_hash(BlockID::Number(n)).unwrap(); - let mut header: BlockHeader = decode(&self.block_header(BlockID::Number(n)).unwrap()); + let hash = self.block_hash(BlockId::Number(n)).unwrap(); + let mut header: BlockHeader = decode(&self.block_header(BlockId::Number(n)).unwrap()); header.set_parent_hash(H256::from(42)); let mut rlp = RlpStream::new_list(3); rlp.append(&header); @@ -284,12 +284,12 @@ impl TestBlockChainClient { blocks_read[&index].clone() } - fn block_hash(&self, id: BlockID) -> Option { + fn block_hash(&self, id: BlockId) -> Option { match id { - BlockID::Hash(hash) => Some(hash), - BlockID::Number(n) => self.numbers.read().get(&(n as usize)).cloned(), - BlockID::Earliest => self.numbers.read().get(&0).cloned(), - BlockID::Latest | BlockID::Pending => self.numbers.read().get(&(self.numbers.read().len() - 1)).cloned() + BlockId::Hash(hash) => Some(hash), + BlockId::Number(n) => self.numbers.read().get(&(n as usize)).cloned(), + BlockId::Earliest => self.numbers.read().get(&0).cloned(), + BlockId::Latest | BlockId::Pending => self.numbers.read().get(&(self.numbers.read().len() - 1)).cloned() } } @@ -362,42 +362,42 @@ impl MiningBlockChainClient for TestBlockChainClient { } impl BlockChainClient for TestBlockChainClient { - fn call(&self, _t: &SignedTransaction, _block: BlockID, _analytics: CallAnalytics) -> Result { + fn call(&self, _t: &SignedTransaction, _block: BlockId, _analytics: CallAnalytics) -> Result { self.execution_result.read().clone().unwrap() } - fn replay(&self, _id: TransactionID, _analytics: CallAnalytics) -> Result { + fn replay(&self, _id: TransactionId, _analytics: CallAnalytics) -> Result { self.execution_result.read().clone().unwrap() } - fn block_total_difficulty(&self, _id: BlockID) -> Option { + fn block_total_difficulty(&self, _id: BlockId) -> Option { Some(U256::zero()) } - fn block_hash(&self, id: BlockID) -> Option { + fn block_hash(&self, id: BlockId) -> Option { Self::block_hash(self, id) } - fn nonce(&self, address: &Address, id: BlockID) -> Option { + fn nonce(&self, address: &Address, id: BlockId) -> Option { match id { - BlockID::Latest => Some(self.nonces.read().get(address).cloned().unwrap_or(self.spec.params.account_start_nonce)), + BlockId::Latest => Some(self.nonces.read().get(address).cloned().unwrap_or(self.spec.params.account_start_nonce)), _ => None, } } fn latest_nonce(&self, address: &Address) -> U256 { - self.nonce(address, BlockID::Latest).unwrap() + self.nonce(address, BlockId::Latest).unwrap() } - fn code(&self, address: &Address, id: BlockID) -> Option> { + fn code(&self, address: &Address, id: BlockId) -> Option> { match id { - BlockID::Latest => Some(self.code.read().get(address).cloned()), + BlockId::Latest => Some(self.code.read().get(address).cloned()), _ => None, } } - fn balance(&self, address: &Address, id: BlockID) -> Option { - if let BlockID::Latest = id { + fn balance(&self, address: &Address, id: BlockId) -> Option { + if let BlockId::Latest = id { Some(self.balances.read().get(address).cloned().unwrap_or_else(U256::zero)) } else { None @@ -405,38 +405,38 @@ impl BlockChainClient for TestBlockChainClient { } fn latest_balance(&self, address: &Address) -> U256 { - self.balance(address, BlockID::Latest).unwrap() + self.balance(address, BlockId::Latest).unwrap() } - fn storage_at(&self, address: &Address, position: &H256, id: BlockID) -> Option { - if let BlockID::Latest = id { + fn storage_at(&self, address: &Address, position: &H256, id: BlockId) -> Option { + if let BlockId::Latest = id { Some(self.storage.read().get(&(address.clone(), position.clone())).cloned().unwrap_or_else(H256::new)) } else { None } } - fn list_accounts(&self, _id: BlockID) -> Option> { + fn list_accounts(&self, _id: BlockId) -> Option> { None } - fn transaction(&self, _id: TransactionID) -> Option { + fn transaction(&self, _id: TransactionId) -> Option { None // Simple default. } - fn uncle(&self, _id: UncleID) -> Option { + fn uncle(&self, _id: UncleId) -> Option { None // Simple default. } - fn uncle_extra_info(&self, _id: UncleID) -> Option> { + fn uncle_extra_info(&self, _id: UncleId) -> Option> { None } - fn transaction_receipt(&self, id: TransactionID) -> Option { + fn transaction_receipt(&self, id: TransactionId) -> Option { self.receipts.read().get(&id).cloned() } - fn blocks_with_bloom(&self, _bloom: &H2048, _from_block: BlockID, _to_block: BlockID) -> Option> { + fn blocks_with_bloom(&self, _bloom: &H2048, _from_block: BlockId, _to_block: BlockId) -> Option> { unimplemented!(); } @@ -454,14 +454,14 @@ impl BlockChainClient for TestBlockChainClient { } fn best_block_header(&self) -> Bytes { - self.block_header(BlockID::Hash(self.chain_info().best_block_hash)).expect("Best block always have header.") + self.block_header(BlockId::Hash(self.chain_info().best_block_hash)).expect("Best block always have header.") } - fn block_header(&self, id: BlockID) -> Option { + fn block_header(&self, id: BlockId) -> Option { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).map(|r| Rlp::new(r).at(0).as_raw().to_vec())) } - fn block_body(&self, id: BlockID) -> Option { + fn block_body(&self, id: BlockId) -> Option { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).map(|r| { let mut stream = RlpStream::new_list(2); stream.append_raw(Rlp::new(r).at(1).as_raw(), 1); @@ -470,21 +470,21 @@ impl BlockChainClient for TestBlockChainClient { })) } - fn block(&self, id: BlockID) -> Option { + fn block(&self, id: BlockId) -> Option { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).cloned()) } - fn block_extra_info(&self, id: BlockID) -> Option> { + fn block_extra_info(&self, id: BlockId) -> Option> { self.block(id) .map(|block| BlockView::new(&block).header()) .map(|header| self.spec.engine.extra_info(&header)) } - fn block_status(&self, id: BlockID) -> BlockStatus { + fn block_status(&self, id: BlockId) -> BlockStatus { match id { - BlockID::Number(number) if (number as usize) < self.blocks.read().len() => BlockStatus::InChain, - BlockID::Hash(ref hash) if self.blocks.read().get(hash).is_some() => BlockStatus::InChain, + BlockId::Number(number) if (number as usize) < self.blocks.read().len() => BlockStatus::InChain, + BlockId::Hash(ref hash) if self.blocks.read().get(hash).is_some() => BlockStatus::InChain, _ => BlockStatus::Unknown } } @@ -637,11 +637,11 @@ impl BlockChainClient for TestBlockChainClient { unimplemented!(); } - fn transaction_traces(&self, _trace: TransactionID) -> Option> { + fn transaction_traces(&self, _trace: TransactionId) -> Option> { unimplemented!(); } - fn block_traces(&self, _trace: BlockID) -> Option> { + fn block_traces(&self, _trace: BlockId) -> Option> { unimplemented!(); } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 67092e98688..a6605c43488 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -49,81 +49,81 @@ pub trait BlockChainClient : Sync + Send { fn keep_alive(&self) {} /// Get raw block header data by block id. - fn block_header(&self, id: BlockID) -> Option; + fn block_header(&self, id: BlockId) -> Option; /// Get raw block body data by block id. /// Block body is an RLP list of two items: uncles and transactions. - fn block_body(&self, id: BlockID) -> Option; + fn block_body(&self, id: BlockId) -> Option; /// Get raw block data by block header hash. - fn block(&self, id: BlockID) -> Option; + fn block(&self, id: BlockId) -> Option; /// Get block status by block header hash. - fn block_status(&self, id: BlockID) -> BlockStatus; + fn block_status(&self, id: BlockId) -> BlockStatus; /// Get block total difficulty. - fn block_total_difficulty(&self, id: BlockID) -> Option; + fn block_total_difficulty(&self, id: BlockId) -> Option; /// Attempt to get address nonce at given block. - /// May not fail on BlockID::Latest. - fn nonce(&self, address: &Address, id: BlockID) -> Option; + /// May not fail on BlockId::Latest. + fn nonce(&self, address: &Address, id: BlockId) -> Option; /// Get address nonce at the latest block's state. fn latest_nonce(&self, address: &Address) -> U256 { - self.nonce(address, BlockID::Latest) - .expect("nonce will return Some when given BlockID::Latest. nonce was given BlockID::Latest. \ + self.nonce(address, BlockId::Latest) + .expect("nonce will return Some when given BlockId::Latest. nonce was given BlockId::Latest. \ Therefore nonce has returned Some; qed") } /// Get block hash. - fn block_hash(&self, id: BlockID) -> Option; + fn block_hash(&self, id: BlockId) -> Option; /// Get address code at given block's state. - fn code(&self, address: &Address, id: BlockID) -> Option>; + fn code(&self, address: &Address, id: BlockId) -> Option>; /// Get address code at the latest block's state. fn latest_code(&self, address: &Address) -> Option { - self.code(address, BlockID::Latest) - .expect("code will return Some if given BlockID::Latest; qed") + self.code(address, BlockId::Latest) + .expect("code will return Some if given BlockId::Latest; qed") } /// Get address balance at the given block's state. /// - /// May not return None if given BlockID::Latest. + /// May not return None if given BlockId::Latest. /// Returns None if and only if the block's root hash has been pruned from the DB. - fn balance(&self, address: &Address, id: BlockID) -> Option; + fn balance(&self, address: &Address, id: BlockId) -> Option; /// Get address balance at the latest block's state. fn latest_balance(&self, address: &Address) -> U256 { - self.balance(address, BlockID::Latest) - .expect("balance will return Some if given BlockID::Latest. balance was given BlockID::Latest \ + self.balance(address, BlockId::Latest) + .expect("balance will return Some if given BlockId::Latest. balance was given BlockId::Latest \ Therefore balance has returned Some; qed") } /// Get value of the storage at given position at the given block's state. /// - /// May not return None if given BlockID::Latest. + /// May not return None if given BlockId::Latest. /// Returns None if and only if the block's root hash has been pruned from the DB. - fn storage_at(&self, address: &Address, position: &H256, id: BlockID) -> Option; + fn storage_at(&self, address: &Address, position: &H256, id: BlockId) -> Option; /// Get value of the storage at given position at the latest block's state. fn latest_storage_at(&self, address: &Address, position: &H256) -> H256 { - self.storage_at(address, position, BlockID::Latest) - .expect("storage_at will return Some if given BlockID::Latest. storage_at was given BlockID::Latest. \ + self.storage_at(address, position, BlockId::Latest) + .expect("storage_at will return Some if given BlockId::Latest. storage_at was given BlockId::Latest. \ Therefore storage_at has returned Some; qed") } /// Get a list of all accounts in the block `id`, if fat DB is in operation, otherwise `None`. - fn list_accounts(&self, id: BlockID) -> Option>; + fn list_accounts(&self, id: BlockId) -> Option>; /// Get transaction with given hash. - fn transaction(&self, id: TransactionID) -> Option; + fn transaction(&self, id: TransactionId) -> Option; /// Get uncle with given id. - fn uncle(&self, id: UncleID) -> Option; + fn uncle(&self, id: UncleId) -> Option; /// Get transaction receipt with given hash. - fn transaction_receipt(&self, id: TransactionID) -> Option; + fn transaction_receipt(&self, id: TransactionId) -> Option; /// Get a tree route between `from` and `to`. /// See `BlockChain::tree_route`. @@ -160,16 +160,16 @@ pub trait BlockChainClient : Sync + Send { fn best_block_header(&self) -> Bytes; /// Returns numbers of blocks containing given bloom. - fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockID, to_block: BlockID) -> Option>; + fn blocks_with_bloom(&self, bloom: &H2048, from_block: BlockId, to_block: BlockId) -> Option>; /// Returns logs matching given filter. fn logs(&self, filter: Filter) -> Vec; /// Makes a non-persistent transaction call. - fn call(&self, t: &SignedTransaction, block: BlockID, analytics: CallAnalytics) -> Result; + fn call(&self, t: &SignedTransaction, block: BlockId, analytics: CallAnalytics) -> Result; /// Replays a given transaction for inspection. - fn replay(&self, t: TransactionID, analytics: CallAnalytics) -> Result; + fn replay(&self, t: TransactionId, analytics: CallAnalytics) -> Result; /// Returns traces matching given filter. fn filter_traces(&self, filter: TraceFilter) -> Option>; @@ -178,10 +178,10 @@ pub trait BlockChainClient : Sync + Send { fn trace(&self, trace: TraceId) -> Option; /// Returns traces created by transaction. - fn transaction_traces(&self, trace: TransactionID) -> Option>; + fn transaction_traces(&self, trace: TransactionId) -> Option>; /// Returns traces created by transaction from block. - fn block_traces(&self, trace: BlockID) -> Option>; + fn block_traces(&self, trace: BlockId) -> Option>; /// Get last hashes starting from best block. fn last_hashes(&self) -> LastHashes; @@ -198,7 +198,7 @@ pub trait BlockChainClient : Sync + Send { let mut corpus = Vec::new(); while corpus.is_empty() { for _ in 0..sample_size { - let block_bytes = self.block(BlockID::Hash(h)).expect("h is either the best_block_hash or an ancestor; qed"); + let block_bytes = self.block(BlockId::Hash(h)).expect("h is either the best_block_hash or an ancestor; qed"); let block = BlockView::new(&block_bytes); let header = block.header_view(); if header.number() == 0 { @@ -236,11 +236,11 @@ pub trait BlockChainClient : Sync + Send { /// Set the mode. fn set_mode(&self, mode: Mode); - /// Returns engine-related extra info for `BlockID`. - fn block_extra_info(&self, id: BlockID) -> Option>; + /// Returns engine-related extra info for `BlockId`. + fn block_extra_info(&self, id: BlockId) -> Option>; - /// Returns engine-related extra info for `UncleID`. - fn uncle_extra_info(&self, id: UncleID) -> Option>; + /// Returns engine-related extra info for `UncleId`. + fn uncle_extra_info(&self, id: UncleId) -> Option>; } /// Extended client interface used for mining diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index 4fb210ca635..211fdeb1fb3 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -15,45 +15,81 @@ // along with Parity. If not, see . use std::sync::Weak; -use util::misc::code_hash; -use util::{Address, H160}; +use util::misc::{VersionInfo, ReleaseTrack, platform}; +use util::{Address, H160, H256, FixedHash}; use client::operations::Operations; use client::client::Client; +use client::BlockId; + +pub struct ReleaseInfo { + fork_supported: usize, + latest_known_fork: usize, + + latest: VersionInfo, + latest_fork: usize, + latest_binary: Option, +} pub struct Updater { + client: Weak, operations: Operations, -} -fn platform() -> &'static str { - "linux_x64" + pub this: VersionInfo, + pub release_info: Option, + } impl Updater { pub fn new(client: Weak, operations: Address) -> Self { - Updater { + let mut u = Updater { + client: client.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), - } + this: VersionInfo::this(), + release_info: None, + }; + u.release_info = u.get_release_info().ok(); + if u.this.track == ReleaseTrack::Unknown { + u.this.track = ReleaseTrack::Nightly; + } + u } - pub fn tick(&mut self) { - (|| -> Result<(), String> { - let code_hash = H160::from("0x080ec8043f41e25ee8aa4ee6112906ac6d82ea74").into();//code_hash().into(); - let client = "parity"; - - let (fork, track, semver) = self.operations.find_release(client, &code_hash)?; - let track_name = match track { 1 => "stable", 2 => "beta", 3 => "nightly", _ => "unknown" }; - info!(target: "updater", "Current release ({}) is {}.{}.{}-{} and latest fork it supports is at block #{}", H160::from(code_hash), semver >> 16, (semver >> 8) & 0xff, semver & 0xff, track_name, fork); - - let latest_fork = self.operations.latest_fork()?; - info!(target: "updater", "Latest fork is at block #{}", latest_fork); + fn get_release_info(&mut self) -> Result { + //601e0fb0fd7e9e1cec18f8872e8713117cab4e84 + if self.this.track == ReleaseTrack::Unknown { + return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); + } - let latest = self.operations.latest_in_track(client, track)?; - let (fork, _, semver) = self.operations.find_release(client, &latest)?; - info!(target: "updater", "Latest release in our track is {}.{}.{}-{} ({:?}); supports fork at block #{}", semver >> 16, (semver >> 8) & 0xff, semver & 0xff, track_name, H160::from(latest), fork); + let client_id = "parity"; + let latest_known_fork = self.operations.latest_fork()?; + let our_fork = self.operations.release(client_id, &self.this.hash.into())?.0; + let latest_release = self.operations.latest_in_track(client_id, self.this.track.into())?; + let (fork, track, semver, _critical) = self.operations.release(client_id, &latest_release)?; + let maybe_latest_binary = self.operations.checksum(client_id, &latest_release, &platform())?; + Ok(ReleaseInfo { + fork_supported: our_fork as usize, + latest_known_fork: latest_known_fork as usize, + latest: VersionInfo::from_raw(semver, track, latest_release.into()), + latest_fork: fork as usize, + latest_binary: if maybe_latest_binary.is_zero() { None } else { Some(maybe_latest_binary) }, + }) + } - let exe_hash = self.operations.find_checksum(client, &latest, platform())?; - info!(target: "updater", "Latest release's binary on {} is {}", platform(), exe_hash); - Ok(()) - })().unwrap_or_else(|e| warn!("{}", e)); + pub fn tick(&mut self) { + self.release_info = self.get_release_info().ok(); + let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); + info!(target: "updater", "Current release is {}", self.this); + if let Some(ref relinfo) = self.release_info { + info!(target: "updater", "Latest release in our track is {} ({} binary is {})", + relinfo.latest, + platform(), + if let Some(ref b) = relinfo.latest_binary { + format!("{}", b) + } else { + "unreleased".into() + } + ); + info!(target: "updater", "Fork: this/current/latest/latest-known: #{}/#{}/#{}/#{}", relinfo.fork_supported, current_number, relinfo.latest_fork, relinfo.latest_known_fork); + } } } diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 7ad18ebfc05..29f28265fe7 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -23,7 +23,7 @@ use account_provider::AccountProvider; use views::{BlockView, HeaderView}; use header::Header; use state::{State, CleanupMode}; -use client::{MiningBlockChainClient, Executive, Executed, EnvInfo, TransactOptions, BlockID, CallAnalytics}; +use client::{MiningBlockChainClient, Executive, Executed, EnvInfo, TransactOptions, BlockId, CallAnalytics}; use client::TransactionImportResult; use executive::contract_address; use block::{ClosedBlock, SealedBlock, IsBlock, Block}; @@ -693,7 +693,7 @@ impl MinerService for Miner { Ok(ret) }, None => { - chain.call(t, BlockID::Latest, analytics) + chain.call(t, BlockId::Latest, analytics) } } } @@ -1073,7 +1073,7 @@ impl MinerService for Miner { fn fetch_transactions(chain: &MiningBlockChainClient, hash: &H256) -> Vec { let block = chain - .block(BlockID::Hash(*hash)) + .block(BlockId::Hash(*hash)) // Client should send message after commit to db and inserting to chain. .expect("Expected in-chain blocks."); let block = BlockView::new(&block); diff --git a/ethcore/src/snapshot/error.rs b/ethcore/src/snapshot/error.rs index d417695f054..cc84d8e489e 100644 --- a/ethcore/src/snapshot/error.rs +++ b/ethcore/src/snapshot/error.rs @@ -18,7 +18,7 @@ use std::fmt; -use ids::BlockID; +use ids::BlockId; use util::H256; use util::trie::TrieError; @@ -28,7 +28,7 @@ use rlp::DecoderError; #[derive(Debug)] pub enum Error { /// Invalid starting block for snapshot. - InvalidStartingBlock(BlockID), + InvalidStartingBlock(BlockId), /// Block not found. BlockNotFound(H256), /// Incomplete chain. diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 3f63ac208ae..76695fbf221 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -27,7 +27,7 @@ use account_db::{AccountDB, AccountDBMut}; use blockchain::{BlockChain, BlockProvider}; use engines::Engine; use header::Header; -use ids::BlockID; +use ids::BlockId; use views::BlockView; use util::{Bytes, Hashable, HashDB, DBValue, snappy, U256, Uint}; @@ -129,7 +129,7 @@ pub fn take_snapshot( p: &Progress ) -> Result<(), Error> { let start_header = try!(chain.block_header(&block_at) - .ok_or(Error::InvalidStartingBlock(BlockID::Hash(block_at)))); + .ok_or(Error::InvalidStartingBlock(BlockId::Hash(block_at)))); let state_root = start_header.state_root(); let number = start_header.number(); diff --git a/ethcore/src/snapshot/service.rs b/ethcore/src/snapshot/service.rs index c0d34a6a9db..21725bc0657 100644 --- a/ethcore/src/snapshot/service.rs +++ b/ethcore/src/snapshot/service.rs @@ -30,7 +30,7 @@ use blockchain::BlockChain; use client::{BlockChainClient, Client}; use engines::Engine; use error::Error; -use ids::BlockID; +use ids::BlockId; use service::ClientIoMessage; use io::IoChannel; @@ -353,7 +353,7 @@ impl Service { let writer = try!(LooseWriter::new(temp_dir.clone())); let guard = Guard::new(temp_dir.clone()); - let res = client.take_snapshot(writer, BlockID::Number(num), &self.progress); + let res = client.take_snapshot(writer, BlockId::Number(num), &self.progress); self.taking_snapshot.store(false, Ordering::SeqCst); if let Err(e) = res { diff --git a/ethcore/src/snapshot/tests/service.rs b/ethcore/src/snapshot/tests/service.rs index e136985c6b5..efdb12323d8 100644 --- a/ethcore/src/snapshot/tests/service.rs +++ b/ethcore/src/snapshot/tests/service.rs @@ -19,7 +19,7 @@ use std::sync::Arc; use client::{BlockChainClient, Client}; -use ids::BlockID; +use ids::BlockId; use snapshot::service::{Service, ServiceParams}; use snapshot::{self, ManifestData, SnapshotService}; use spec::Spec; @@ -96,8 +96,8 @@ fn restored_is_equivalent() { assert_eq!(service.status(), ::snapshot::RestorationStatus::Inactive); for x in 0..NUM_BLOCKS { - let block1 = client.block(BlockID::Number(x as u64)).unwrap(); - let block2 = client2.block(BlockID::Number(x as u64)).unwrap(); + let block1 = client.block(BlockId::Number(x as u64)).unwrap(); + let block2 = client2.block(BlockId::Number(x as u64)).unwrap(); assert_eq!(block1, block2); } diff --git a/ethcore/src/snapshot/watcher.rs b/ethcore/src/snapshot/watcher.rs index 43439e437cf..ab4dde13433 100644 --- a/ethcore/src/snapshot/watcher.rs +++ b/ethcore/src/snapshot/watcher.rs @@ -18,7 +18,7 @@ use util::Mutex; use client::{BlockChainClient, Client, ChainNotify}; -use ids::BlockID; +use ids::BlockId; use service::ClientIoMessage; use views::HeaderView; @@ -43,7 +43,7 @@ impl Oracle for StandardOracle where F: Send + Sync + Fn() -> bool { fn to_number(&self, hash: H256) -> Option { - self.client.block_header(BlockID::Hash(hash)).map(|h| HeaderView::new(&h).number()) + self.client.block_header(BlockId::Hash(hash)).map(|h| HeaderView::new(&h).number()) } fn is_major_importing(&self) -> bool { diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 99b251d6647..b96de22df1d 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see . use io::IoChannel; -use client::{BlockChainClient, MiningBlockChainClient, Client, ClientConfig, BlockID}; +use client::{BlockChainClient, MiningBlockChainClient, Client, ClientConfig, BlockId}; use state::CleanupMode; use ethereum; use block::IsBlock; @@ -99,7 +99,7 @@ fn imports_good_block() { client.flush_queue(); client.import_verified_blocks(); - let block = client.block_header(BlockID::Number(1)).unwrap(); + let block = client.block_header(BlockId::Number(1)).unwrap(); assert!(!block.is_empty()); } @@ -117,7 +117,7 @@ fn query_none_block() { IoChannel::disconnected(), &db_config ).unwrap(); - let non_existant = client.block_header(BlockID::Number(188)); + let non_existant = client.block_header(BlockId::Number(188)); assert!(non_existant.is_none()); } @@ -125,7 +125,7 @@ fn query_none_block() { fn query_bad_block() { let client_result = get_test_client_with_blocks(vec![get_bad_state_dummy_block()]); let client = client_result.reference(); - let bad_block:Option = client.block_header(BlockID::Number(1)); + let bad_block:Option = client.block_header(BlockId::Number(1)); assert!(bad_block.is_none()); } @@ -146,8 +146,8 @@ fn returns_logs() { let client_result = get_test_client_with_blocks(vec![dummy_block.clone()]); let client = client_result.reference(); let logs = client.logs(Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: None, topics: vec![], limit: None, @@ -161,8 +161,8 @@ fn returns_logs_with_limit() { let client_result = get_test_client_with_blocks(vec![dummy_block.clone()]); let client = client_result.reference(); let logs = client.logs(Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: None, topics: vec![], limit: Some(2), @@ -176,7 +176,7 @@ fn returns_block_body() { let client_result = get_test_client_with_blocks(vec![dummy_block.clone()]); let client = client_result.reference(); let block = BlockView::new(&dummy_block); - let body = client.block_body(BlockID::Hash(block.header().hash())).unwrap(); + let body = client.block_body(BlockId::Hash(block.header().hash())).unwrap(); let body = Rlp::new(&body); assert_eq!(body.item_count(), 2); assert_eq!(body.at(0).as_raw()[..], block.rlp().at(1).as_raw()[..]); @@ -187,7 +187,7 @@ fn returns_block_body() { fn imports_block_sequence() { let client_result = generate_dummy_client(6); let client = client_result.reference(); - let block = client.block_header(BlockID::Number(5)).unwrap(); + let block = client.block_header(BlockId::Number(5)).unwrap(); assert!(!block.is_empty()); } diff --git a/ethcore/src/tests/rpc.rs b/ethcore/src/tests/rpc.rs index b021e750d24..2da94b3d0bb 100644 --- a/ethcore/src/tests/rpc.rs +++ b/ethcore/src/tests/rpc.rs @@ -19,7 +19,7 @@ use nanoipc; use std::sync::Arc; use std::sync::atomic::{Ordering, AtomicBool}; -use client::{Client, BlockChainClient, ClientConfig, BlockID}; +use client::{Client, BlockChainClient, ClientConfig, BlockId}; use client::remote::RemoteClient; use tests::helpers::*; use devtools::*; @@ -71,7 +71,7 @@ fn can_query_block() { run_test_worker(scope, stop_guard.share(), socket_path); let remote_client = nanoipc::generic_client::>(socket_path).unwrap(); - let non_existant_block = remote_client.block_header(BlockID::Number(999)); + let non_existant_block = remote_client.block_header(BlockId::Number(999)); assert!(non_existant_block.is_none()); }) diff --git a/ethcore/src/types/filter.rs b/ethcore/src/types/filter.rs index e3487e5f60f..ecc997f7155 100644 --- a/ethcore/src/types/filter.rs +++ b/ethcore/src/types/filter.rs @@ -18,17 +18,17 @@ use util::{Address, H256, Hashable, H2048}; use util::bloom::Bloomable; -use client::BlockID; +use client::BlockId; use log_entry::LogEntry; /// Blockchain Filter. #[derive(Binary, Debug, PartialEq)] pub struct Filter { /// Blockchain will be searched from this block. - pub from_block: BlockID, + pub from_block: BlockId, /// Till this block. - pub to_block: BlockID, + pub to_block: BlockId, /// Search addresses. /// @@ -114,14 +114,14 @@ impl Filter { mod tests { use util::FixedHash; use filter::Filter; - use client::BlockID; + use client::BlockId; use log_entry::LogEntry; #[test] fn test_bloom_possibilities_none() { let none_filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: None, topics: vec![None, None, None, None], limit: None, @@ -136,8 +136,8 @@ mod tests { #[test] fn test_bloom_possibilities_single_address_and_topic() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec!["b372018f3be9e171df0581136b59d2faf73a7d5d".into()]), topics: vec![ Some(vec!["ff74e91598aed6ae5d2fdcf8b24cd2c7be49a0808112a305069355b7160f23f9".into()]), @@ -155,8 +155,8 @@ mod tests { #[test] fn test_bloom_possibilities_single_address_and_many_topics() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec!["b372018f3be9e171df0581136b59d2faf73a7d5d".into()]), topics: vec![ Some(vec!["ff74e91598aed6ae5d2fdcf8b24cd2c7be49a0808112a305069355b7160f23f9".into()]), @@ -174,8 +174,8 @@ mod tests { #[test] fn test_bloom_possibilites_multiple_addresses_and_topics() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec![ "b372018f3be9e171df0581136b59d2faf73a7d5d".into(), "b372018f3be9e171df0581136b59d2faf73a7d5d".into(), @@ -204,8 +204,8 @@ mod tests { #[test] fn test_filter_matches() { let filter = Filter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec!["b372018f3be9e171df0581136b59d2faf73a7d5d".into()]), topics: vec![ Some(vec!["ff74e91598aed6ae5d2fdcf8b24cd2c7be49a0808112a305069355b7160f23f9".into()]), diff --git a/ethcore/src/types/ids.rs b/ethcore/src/types/ids.rs index 1fe81f39202..2c3c777b4da 100644 --- a/ethcore/src/types/ids.rs +++ b/ethcore/src/types/ids.rs @@ -21,7 +21,7 @@ use header::BlockNumber; /// Uniquely identifies block. #[derive(Debug, PartialEq, Copy, Clone, Hash, Eq, Binary)] -pub enum BlockID { +pub enum BlockId { /// Block's sha3. /// Querying by hash is always faster. Hash(H256), @@ -37,28 +37,28 @@ pub enum BlockID { /// Uniquely identifies transaction. #[derive(Debug, PartialEq, Clone, Hash, Eq, Binary)] -pub enum TransactionID { +pub enum TransactionId { /// Transaction's sha3. Hash(H256), /// Block id and transaction index within this block. /// Querying by block position is always faster. - Location(BlockID, usize) + Location(BlockId, usize) } /// Uniquely identifies Trace. #[derive(Binary)] pub struct TraceId { /// Transaction - pub transaction: TransactionID, + pub transaction: TransactionId, /// Trace address within transaction. pub address: Vec, } /// Uniquely identifies Uncle. #[derive(Debug, PartialEq, Eq, Copy, Clone, Binary)] -pub struct UncleID { +pub struct UncleId { /// Block id. - pub block: BlockID, + pub block: BlockId, /// Position in block. pub position: usize } diff --git a/ethcore/src/types/trace_filter.rs b/ethcore/src/types/trace_filter.rs index c17cc9e8543..af9d7c3eefd 100644 --- a/ethcore/src/types/trace_filter.rs +++ b/ethcore/src/types/trace_filter.rs @@ -18,13 +18,13 @@ use std::ops::Range; use util::{Address}; -use types::ids::BlockID; +use types::ids::BlockId; /// Easy to use trace filter. #[derive(Binary)] pub struct Filter { /// Range of filtering. - pub range: Range, + pub range: Range, /// From address. pub from_address: Vec
, /// To address. diff --git a/ethstore/src/dir/disk.rs b/ethstore/src/dir/disk.rs index 56b2c1ccb85..c86123d1a48 100644 --- a/ethstore/src/dir/disk.rs +++ b/ethstore/src/dir/disk.rs @@ -20,7 +20,7 @@ use std::collections::HashMap; use time; use ethkey::Address; use {json, SafeAccount, Error}; -use json::UUID; +use json::Uuid; use super::KeyDirectory; const IGNORED_FILES: &'static [&'static str] = &["thumbs.db", "address_book.json"]; @@ -113,7 +113,7 @@ impl KeyDirectory for DiskDirectory { // build file path let filename = account.filename.as_ref().cloned().unwrap_or_else(|| { let timestamp = time::strftime("%Y-%m-%dT%H-%M-%S", &time::now_utc()).expect("Time-format string is valid."); - format!("UTC--{}Z--{}", timestamp, UUID::from(account.id)) + format!("UTC--{}Z--{}", timestamp, Uuid::from(account.id)) }); // update account filename diff --git a/ethstore/src/ethstore.rs b/ethstore/src/ethstore.rs index 4991c471477..3747431fbfc 100644 --- a/ethstore/src/ethstore.rs +++ b/ethstore/src/ethstore.rs @@ -24,7 +24,7 @@ use dir::KeyDirectory; use account::SafeAccount; use {Error, SecretStore}; use json; -use json::UUID; +use json::Uuid; use parking_lot::RwLock; use presale::PresaleWallet; use import; @@ -154,7 +154,7 @@ impl SecretStore for EthStore { account.public(password) } - fn uuid(&self, address: &Address) -> Result { + fn uuid(&self, address: &Address) -> Result { let account = try!(self.get(address)); Ok(account.id.into()) } diff --git a/ethstore/src/json/error.rs b/ethstore/src/json/error.rs index 5e077cfad87..a3ea4d326fa 100644 --- a/ethstore/src/json/error.rs +++ b/ethstore/src/json/error.rs @@ -21,7 +21,7 @@ pub enum Error { UnsupportedCipher, InvalidCipherParams, UnsupportedKdf, - InvalidUUID, + InvalidUuid, UnsupportedVersion, InvalidCiphertext, InvalidH256, @@ -31,7 +31,7 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { match *self { - Error::InvalidUUID => write!(f, "Invalid UUID"), + Error::InvalidUuid => write!(f, "Invalid Uuid"), Error::UnsupportedVersion => write!(f, "Unsupported version"), Error::UnsupportedKdf => write!(f, "Unsupported kdf"), Error::InvalidCiphertext => write!(f, "Invalid ciphertext"), diff --git a/ethstore/src/json/id.rs b/ethstore/src/json/id.rs index ff282a9f87f..664716d95a2 100644 --- a/ethstore/src/json/id.rs +++ b/ethstore/src/json/id.rs @@ -23,15 +23,15 @@ use super::Error; /// Universaly unique identifier. #[derive(Debug, PartialEq)] -pub struct UUID([u8; 16]); +pub struct Uuid([u8; 16]); -impl From<[u8; 16]> for UUID { +impl From<[u8; 16]> for Uuid { fn from(uuid: [u8; 16]) -> Self { - UUID(uuid) + Uuid(uuid) } } -impl<'a> Into for &'a UUID { +impl<'a> Into for &'a Uuid { fn into(self) -> String { let d1 = &self.0[0..4]; let d2 = &self.0[4..6]; @@ -42,44 +42,44 @@ impl<'a> Into for &'a UUID { } } -impl Into for UUID { +impl Into for Uuid { fn into(self) -> String { Into::into(&self) } } -impl Into<[u8; 16]> for UUID { +impl Into<[u8; 16]> for Uuid { fn into(self) -> [u8; 16] { self.0 } } -impl fmt::Display for UUID { +impl fmt::Display for Uuid { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - let s: String = (self as &UUID).into(); + let s: String = (self as &Uuid).into(); write!(f, "{}", s) } } fn copy_into(from: &str, into: &mut [u8]) -> Result<(), Error> { - let from = try!(from.from_hex().map_err(|_| Error::InvalidUUID)); + let from = try!(from.from_hex().map_err(|_| Error::InvalidUuid)); if from.len() != into.len() { - return Err(Error::InvalidUUID); + return Err(Error::InvalidUuid); } into.copy_from_slice(&from); Ok(()) } -impl str::FromStr for UUID { +impl str::FromStr for Uuid { type Err = Error; fn from_str(s: &str) -> Result { let parts: Vec<&str> = s.split("-").collect(); if parts.len() != 5 { - return Err(Error::InvalidUUID); + return Err(Error::InvalidUuid); } let mut uuid = [0u8; 16]; @@ -90,17 +90,17 @@ impl str::FromStr for UUID { try!(copy_into(parts[3], &mut uuid[8..10])); try!(copy_into(parts[4], &mut uuid[10..16])); - Ok(UUID(uuid)) + Ok(Uuid(uuid)) } } -impl From<&'static str> for UUID { +impl From<&'static str> for Uuid { fn from(s: &'static str) -> Self { s.parse().expect(&format!("invalid string literal for {}: '{}'", stringify!(Self), s)) } } -impl Serialize for UUID { +impl Serialize for Uuid { fn serialize(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer { let s: String = self.into(); @@ -108,17 +108,17 @@ impl Serialize for UUID { } } -impl Deserialize for UUID { +impl Deserialize for Uuid { fn deserialize(deserializer: &mut D) -> Result where D: Deserializer { - deserializer.deserialize(UUIDVisitor) + deserializer.deserialize(UuidVisitor) } } -struct UUIDVisitor; +struct UuidVisitor; -impl Visitor for UUIDVisitor { - type Value = UUID; +impl Visitor for UuidVisitor { + type Value = Uuid; fn visit_str(&mut self, value: &str) -> Result where E: SerdeError { value.parse().map_err(SerdeError::custom) @@ -131,18 +131,18 @@ impl Visitor for UUIDVisitor { #[cfg(test)] mod tests { - use super::UUID; + use super::Uuid; #[test] fn uuid_from_str() { - let uuid: UUID = "3198bc9c-6672-5ab3-d995-4942343ae5b6".into(); - assert_eq!(uuid, UUID::from([0x31, 0x98, 0xbc, 0x9c, 0x66, 0x72, 0x5a, 0xb3, 0xd9, 0x95, 0x49, 0x42, 0x34, 0x3a, 0xe5, 0xb6])); + let uuid: Uuid = "3198bc9c-6672-5ab3-d995-4942343ae5b6".into(); + assert_eq!(uuid, Uuid::from([0x31, 0x98, 0xbc, 0x9c, 0x66, 0x72, 0x5a, 0xb3, 0xd9, 0x95, 0x49, 0x42, 0x34, 0x3a, 0xe5, 0xb6])); } #[test] fn uuid_from_and_to_str() { let from = "3198bc9c-6672-5ab3-d995-4942343ae5b6"; - let uuid: UUID = from.into(); + let uuid: Uuid = from.into(); let to: String = uuid.into(); assert_eq!(from, &to); } diff --git a/ethstore/src/json/key_file.rs b/ethstore/src/json/key_file.rs index 6e37c7c8970..5bc5a4e1c4e 100644 --- a/ethstore/src/json/key_file.rs +++ b/ethstore/src/json/key_file.rs @@ -18,11 +18,11 @@ use std::io::{Read, Write}; use serde::{Deserialize, Deserializer, Error}; use serde::de::{Visitor, MapVisitor}; use serde_json; -use super::{UUID, Version, Crypto, H160}; +use super::{Uuid, Version, Crypto, H160}; #[derive(Debug, PartialEq, Serialize)] pub struct KeyFile { - pub id: UUID, + pub id: Uuid, pub version: Version, pub crypto: Crypto, pub address: H160, @@ -153,7 +153,7 @@ impl KeyFile { mod tests { use std::str::FromStr; use serde_json; - use json::{KeyFile, UUID, Version, Crypto, Cipher, Aes128Ctr, Kdf, Scrypt}; + use json::{KeyFile, Uuid, Version, Crypto, Cipher, Aes128Ctr, Kdf, Scrypt}; #[test] fn basic_keyfile() { @@ -183,7 +183,7 @@ mod tests { }"#; let expected = KeyFile { - id: UUID::from_str("8777d9f6-7860-4b9b-88b7-0b57ee6b3a73").unwrap(), + id: Uuid::from_str("8777d9f6-7860-4b9b-88b7-0b57ee6b3a73").unwrap(), version: Version::V3, address: "6edddfc6349aff20bc6467ccf276c5b52487f7a8".into(), crypto: Crypto { diff --git a/ethstore/src/json/mod.rs.in b/ethstore/src/json/mod.rs.in index 133d9821eeb..8ad48b9941e 100644 --- a/ethstore/src/json/mod.rs.in +++ b/ethstore/src/json/mod.rs.in @@ -14,7 +14,7 @@ pub use self::cipher::{Cipher, CipherSer, CipherSerParams, Aes128Ctr}; pub use self::crypto::{Crypto, CipherText}; pub use self::error::Error; pub use self::hash::{H128, H160, H256}; -pub use self::id::UUID; +pub use self::id::Uuid; pub use self::kdf::{Kdf, KdfSer, Prf, Pbkdf2, Scrypt, KdfSerParams}; pub use self::key_file::KeyFile; pub use self::presale::{PresaleWallet, Encseed}; diff --git a/ethstore/src/secret_store.rs b/ethstore/src/secret_store.rs index 06f38922b3d..bf0a4ec4465 100644 --- a/ethstore/src/secret_store.rs +++ b/ethstore/src/secret_store.rs @@ -16,7 +16,7 @@ use ethkey::{Address, Message, Signature, Secret, Public}; use Error; -use json::UUID; +use json::Uuid; pub trait SecretStore: Send + Sync { fn insert_account(&self, secret: Secret, password: &str) -> Result; @@ -30,7 +30,7 @@ pub trait SecretStore: Send + Sync { fn public(&self, account: &Address, password: &str) -> Result; fn accounts(&self) -> Result, Error>; - fn uuid(&self, account: &Address) -> Result; + fn uuid(&self, account: &Address) -> Result; fn name(&self, account: &Address) -> Result; fn meta(&self, account: &Address) -> Result; diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 0baeb135451..7696d1b3870 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -25,7 +25,7 @@ use io::{PanicHandler, ForwardPanic}; use util::{ToPretty, Uint}; use rlp::PayloadInfo; use ethcore::service::ClientService; -use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockImportError, BlockChainClient, BlockID}; +use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockImportError, BlockChainClient, BlockId}; use ethcore::error::ImportError; use ethcore::miner::Miner; use cache::CacheConfig; @@ -98,8 +98,8 @@ pub struct ExportBlockchain { pub wal: bool, pub fat_db: Switch, pub tracing: Switch, - pub from_block: BlockID, - pub to_block: BlockID, + pub from_block: BlockId, + pub to_block: BlockId, pub check_seal: bool, } @@ -329,7 +329,7 @@ fn execute_export(cmd: ExportBlockchain) -> Result { let to = try!(client.block_number(cmd.to_block).ok_or("To block could not be found")); for i in from..(to + 1) { - let b = try!(client.block(BlockID::Number(i)).ok_or("Error exporting incomplete chain")); + let b = try!(client.block(BlockId::Number(i)).ok_or("Error exporting incomplete chain")); match format { DataFormat::Binary => { out.write(&b).expect("Couldn't write to stream."); } DataFormat::Hex => { out.write_fmt(format_args!("{}", b.pretty())).expect("Couldn't write to stream."); } diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index 89603d311e4..807de7977fd 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -24,6 +24,14 @@ Operating Options: wakes regularly to resync. dark - Parity syncs only when the RPC is active. offline - Parity doesn't sync. (default: {flag_mode}). + --updates POLICY Set the client updating policy. POLICY specifies + which updates Parity will auto-install: + track - All updates in the current release track. + patch - All updates of the current minor version. + critical - Only consensus/security updates. + none - No updates. Not recommended. + --no-consensus Force the binary to run even if there are known + issues regarding consensus. Not recommended. --mode-timeout SECS Specify the number of seconds before inactivity timeout occurs when mode is dark or passive (default: {flag_mode_timeout}). diff --git a/parity/configuration.rs b/parity/configuration.rs index 61063aa18d8..e3f11685e33 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -684,7 +684,7 @@ mod tests { use super::*; use cli::Args; use ethcore_rpc::NetworkSettings; - use ethcore::client::{VMType, BlockID}; + use ethcore::client::{VMType, BlockId}; use ethcore::miner::{MinerOptions, PrioritizationStrategy}; use helpers::{replace_home, default_network_config}; use run::RunCmd; @@ -792,8 +792,8 @@ mod tests { wal: true, tracing: Default::default(), fat_db: Default::default(), - from_block: BlockID::Number(1), - to_block: BlockID::Latest, + from_block: BlockId::Number(1), + to_block: BlockId::Latest, check_seal: true, }))); } @@ -814,8 +814,8 @@ mod tests { wal: true, tracing: Default::default(), fat_db: Default::default(), - from_block: BlockID::Number(1), - to_block: BlockID::Latest, + from_block: BlockId::Number(1), + to_block: BlockId::Latest, check_seal: true, }))); } diff --git a/parity/dapps.rs b/parity/dapps.rs index 16ae4dd98f5..ec6fd884634 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -106,7 +106,7 @@ mod server { use util::{Bytes, Address, U256}; use ethcore::transaction::{Transaction, Action}; - use ethcore::client::{Client, BlockChainClient, BlockID}; + use ethcore::client::{Client, BlockChainClient, BlockId}; use rpc_apis; use ethcore_rpc::is_major_importing; @@ -182,7 +182,7 @@ mod server { data: data, }.fake_sign(from); - self.client.call(&transaction, BlockID::Latest, Default::default()) + self.client.call(&transaction, BlockId::Latest, Default::default()) .map_err(|e| format!("{:?}", e)) .map(|executed| { executed.output diff --git a/parity/helpers.rs b/parity/helpers.rs index ab0dafdddff..fe5303ec87a 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -20,7 +20,7 @@ use std::time::Duration; use std::fs::File; use util::{clean_0x, U256, Uint, Address, path, CompactionProfile}; use util::journaldb::Algorithm; -use ethcore::client::{Mode, BlockID, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; +use ethcore::client::{Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; use ethcore::miner::{PendingSet, GasLimit, PrioritizationStrategy}; use cache::CacheConfig; use dir::DatabaseDirectories; @@ -62,13 +62,13 @@ pub fn to_mode(s: &str, timeout: u64, alarm: u64) -> Result { } } -pub fn to_block_id(s: &str) -> Result { +pub fn to_block_id(s: &str) -> Result { if s == "latest" { - Ok(BlockID::Latest) + Ok(BlockId::Latest) } else if let Ok(num) = s.parse() { - Ok(BlockID::Number(num)) + Ok(BlockId::Number(num)) } else if let Ok(hash) = s.parse() { - Ok(BlockID::Hash(hash)) + Ok(BlockId::Hash(hash)) } else { Err("Invalid block.".into()) } @@ -327,7 +327,7 @@ mod tests { use std::io::Write; use devtools::RandomTempPath; use util::{U256}; - use ethcore::client::{Mode, BlockID}; + use ethcore::client::{Mode, BlockId}; use ethcore::miner::PendingSet; use super::{to_duration, to_mode, to_block_id, to_u256, to_pending_set, to_address, to_addresses, to_price, geth_ipc_path, to_bootnodes, password_from_file}; @@ -361,13 +361,13 @@ mod tests { #[test] fn test_to_block_id() { - assert_eq!(to_block_id("latest").unwrap(), BlockID::Latest); - assert_eq!(to_block_id("0").unwrap(), BlockID::Number(0)); - assert_eq!(to_block_id("2").unwrap(), BlockID::Number(2)); - assert_eq!(to_block_id("15").unwrap(), BlockID::Number(15)); + assert_eq!(to_block_id("latest").unwrap(), BlockId::Latest); + assert_eq!(to_block_id("0").unwrap(), BlockId::Number(0)); + assert_eq!(to_block_id("2").unwrap(), BlockId::Number(2)); + assert_eq!(to_block_id("15").unwrap(), BlockId::Number(15)); assert_eq!( to_block_id("9fc84d84f6a785dc1bd5abacfcf9cbdd3b6afb80c0f799bfb2fd42c44a0c224e").unwrap(), - BlockID::Hash("9fc84d84f6a785dc1bd5abacfcf9cbdd3b6afb80c0f799bfb2fd42c44a0c224e".parse().unwrap()) + BlockId::Hash("9fc84d84f6a785dc1bd5abacfcf9cbdd3b6afb80c0f799bfb2fd42c44a0c224e".parse().unwrap()) ); } diff --git a/parity/informant.rs b/parity/informant.rs index d3e3c8a2015..1caeb1b7c77 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -184,12 +184,12 @@ impl ChainNotify for Informant { let ripe = Instant::now() > *last_import + Duration::from_secs(1) && !importing; let txs_imported = imported.iter() .take(imported.len() - if ripe {1} else {0}) - .filter_map(|h| self.client.block(BlockID::Hash(*h))) + .filter_map(|h| self.client.block(BlockId::Hash(*h))) .map(|b| BlockView::new(&b).transactions_count()) .sum(); if ripe { - if let Some(block) = imported.last().and_then(|h| self.client.block(BlockID::Hash(*h))) { + if let Some(block) = imported.last().and_then(|h| self.client.block(BlockId::Hash(*h))) { let view = BlockView::new(&block); let header = view.header(); let tx_count = view.transactions_count(); diff --git a/parity/snapshot.rs b/parity/snapshot.rs index d8323084d33..804047596a0 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -26,7 +26,7 @@ use ethcore::snapshot::service::Service as SnapshotService; use ethcore::service::ClientService; use ethcore::client::{Mode, DatabaseCompactionProfile, VMType}; use ethcore::miner::Miner; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use cache::CacheConfig; use params::{SpecType, Pruning, Switch, tracing_switch_to_bool, fatdb_switch_to_bool}; @@ -60,7 +60,7 @@ pub struct SnapshotCommand { pub file_path: Option, pub wal: bool, pub kind: Kind, - pub block_at: BlockID, + pub block_at: BlockId, } // helper for reading chunks from arbitrary reader and feeding them into the diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index 5f1449e079c..36cdc3f993b 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -33,7 +33,7 @@ use util::sha3::*; use util::{FromHex, Mutex}; use rlp::{self, UntrustedRlp, View}; use ethcore::account_provider::AccountProvider; -use ethcore::client::{MiningBlockChainClient, BlockID, TransactionID, UncleID}; +use ethcore::client::{MiningBlockChainClient, BlockId, TransactionId, UncleId}; use ethcore::header::{Header as BlockHeader, BlockNumber as EthBlockNumber}; use ethcore::block::IsBlock; use ethcore::views::*; @@ -120,7 +120,7 @@ impl EthClient where } } - fn block(&self, id: BlockID, include_txs: bool) -> Result, Error> { + fn block(&self, id: BlockId, include_txs: bool) -> Result, Error> { let client = take_weak!(self.client); match (client.block(id.clone()), client.block_total_difficulty(id)) { (Some(bytes), Some(total_difficulty)) => { @@ -160,20 +160,20 @@ impl EthClient where } } - fn transaction(&self, id: TransactionID) -> Result, Error> { + fn transaction(&self, id: TransactionId) -> Result, Error> { match take_weak!(self.client).transaction(id) { Some(t) => Ok(Some(Transaction::from(t))), None => Ok(None), } } - fn uncle(&self, id: UncleID) -> Result, Error> { + fn uncle(&self, id: UncleId) -> Result, Error> { let client = take_weak!(self.client); let uncle: BlockHeader = match client.uncle(id) { Some(rlp) => rlp::decode(&rlp), None => { return Ok(None); } }; - let parent_difficulty = match client.block_total_difficulty(BlockID::Hash(uncle.parent_hash().clone())) { + let parent_difficulty = match client.block_total_difficulty(BlockId::Hash(uncle.parent_hash().clone())) { Some(difficulty) => difficulty, None => { return Ok(None); } }; @@ -394,7 +394,7 @@ impl Eth for EthClient where fn block_transaction_count_by_hash(&self, hash: RpcH256) -> Result, Error> { try!(self.active()); Ok( - take_weak!(self.client).block(BlockID::Hash(hash.into())) + take_weak!(self.client).block(BlockId::Hash(hash.into())) .map(|bytes| BlockView::new(&bytes).transactions_count().into()) ) } @@ -417,7 +417,7 @@ impl Eth for EthClient where try!(self.active()); Ok( - take_weak!(self.client).block(BlockID::Hash(hash.into())) + take_weak!(self.client).block(BlockId::Hash(hash.into())) .map(|bytes| BlockView::new(&bytes).uncles_count().into()) ) } @@ -450,7 +450,7 @@ impl Eth for EthClient where fn block_by_hash(&self, hash: RpcH256, include_txs: bool) -> Result, Error> { try!(self.active()); - self.block(BlockID::Hash(hash.into()), include_txs) + self.block(BlockId::Hash(hash.into()), include_txs) } fn block_by_number(&self, num: BlockNumber, include_txs: bool) -> Result, Error> { @@ -464,19 +464,19 @@ impl Eth for EthClient where let hash: H256 = hash.into(); let miner = take_weak!(self.miner); let client = take_weak!(self.client); - Ok(try!(self.transaction(TransactionID::Hash(hash))).or_else(|| miner.transaction(client.chain_info().best_block_number, &hash).map(Into::into))) + Ok(try!(self.transaction(TransactionId::Hash(hash))).or_else(|| miner.transaction(client.chain_info().best_block_number, &hash).map(Into::into))) } fn transaction_by_block_hash_and_index(&self, hash: RpcH256, index: Index) -> Result, Error> { try!(self.active()); - self.transaction(TransactionID::Location(BlockID::Hash(hash.into()), index.value())) + self.transaction(TransactionId::Location(BlockId::Hash(hash.into()), index.value())) } fn transaction_by_block_number_and_index(&self, num: BlockNumber, index: Index) -> Result, Error> { try!(self.active()); - self.transaction(TransactionID::Location(num.into(), index.value())) + self.transaction(TransactionId::Location(num.into(), index.value())) } fn transaction_receipt(&self, hash: RpcH256) -> Result, Error> { @@ -489,7 +489,7 @@ impl Eth for EthClient where (Some(receipt), true) => Ok(Some(receipt.into())), _ => { let client = take_weak!(self.client); - let receipt = client.transaction_receipt(TransactionID::Hash(hash)); + let receipt = client.transaction_receipt(TransactionId::Hash(hash)); Ok(receipt.map(Into::into)) } } @@ -498,13 +498,13 @@ impl Eth for EthClient where fn uncle_by_block_hash_and_index(&self, hash: RpcH256, index: Index) -> Result, Error> { try!(self.active()); - self.uncle(UncleID { block: BlockID::Hash(hash.into()), position: index.value() }) + self.uncle(UncleId { block: BlockId::Hash(hash.into()), position: index.value() }) } fn uncle_by_block_number_and_index(&self, num: BlockNumber, index: Index) -> Result, Error> { try!(self.active()); - self.uncle(UncleID { block: num.into(), position: index.value() }) + self.uncle(UncleId { block: num.into(), position: index.value() }) } fn compilers(&self) -> Result, Error> { diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index dd1c937ac43..695ff525159 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -21,7 +21,7 @@ use std::collections::HashSet; use jsonrpc_core::*; use ethcore::miner::MinerService; use ethcore::filter::Filter as EthcoreFilter; -use ethcore::client::{BlockChainClient, BlockID}; +use ethcore::client::{BlockChainClient, BlockId}; use util::Mutex; use v1::traits::EthFilter; use v1::types::{BlockNumber, Index, Filter, FilterChanges, Log, H256 as RpcH256, U256 as RpcU256}; @@ -98,7 +98,7 @@ impl EthFilter for EthFilterClient // + 1, cause we want to return hashes including current block hash. let current_number = client.chain_info().best_block_number + 1; let hashes = (*block_number..current_number).into_iter() - .map(BlockID::Number) + .map(BlockId::Number) .filter_map(|id| client.block_hash(id)) .map(Into::into) .collect::>(); @@ -140,10 +140,10 @@ impl EthFilter for EthFilterClient // build appropriate filter let mut filter: EthcoreFilter = filter.clone().into(); - filter.from_block = BlockID::Number(*block_number); - filter.to_block = BlockID::Latest; + filter.from_block = BlockId::Number(*block_number); + filter.to_block = BlockId::Latest; - // retrieve logs in range from_block..min(BlockID::Latest..to_block) + // retrieve logs in range from_block..min(BlockId::Latest..to_block) let mut logs = client.logs(filter.clone()) .into_iter() .map(From::from) diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index 1fdcbdef867..4a274627a43 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -28,7 +28,7 @@ use ethstore::random_phrase; use ethsync::{SyncProvider, ManageNetwork}; use ethcore::miner::MinerService; use ethcore::client::{MiningBlockChainClient}; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use ethcore::mode::Mode; use ethcore::account_provider::AccountProvider; @@ -238,7 +238,7 @@ impl Parity for ParityClient where try!(self.active()); Ok(take_weak!(self.client) - .list_accounts(BlockID::Latest) + .list_accounts(BlockId::Latest) .map(|a| a.into_iter().map(Into::into).collect())) } diff --git a/rpc/src/v1/impls/traces.rs b/rpc/src/v1/impls/traces.rs index e85d961a117..0b287ce2994 100644 --- a/rpc/src/v1/impls/traces.rs +++ b/rpc/src/v1/impls/traces.rs @@ -19,7 +19,7 @@ use std::sync::{Weak, Arc}; use jsonrpc_core::*; use rlp::{UntrustedRlp, View}; -use ethcore::client::{BlockChainClient, CallAnalytics, TransactionID, TraceId}; +use ethcore::client::{BlockChainClient, CallAnalytics, TransactionId, TraceId}; use ethcore::miner::MinerService; use ethcore::transaction::{Transaction as EthTransaction, SignedTransaction, Action}; use v1::traits::Traces; @@ -100,7 +100,7 @@ impl Traces for TracesClient where C: BlockChainClient + 'static, M: from_params::<(H256,)>(params) .and_then(|(transaction_hash,)| { let client = take_weak!(self.client); - let traces = client.transaction_traces(TransactionID::Hash(transaction_hash.into())); + let traces = client.transaction_traces(TransactionId::Hash(transaction_hash.into())); let traces = traces.map_or_else(Vec::new, |traces| traces.into_iter().map(LocalizedTrace::from).collect()); Ok(to_value(&traces)) }) @@ -112,7 +112,7 @@ impl Traces for TracesClient where C: BlockChainClient + 'static, M: .and_then(|(transaction_hash, address)| { let client = take_weak!(self.client); let id = TraceId { - transaction: TransactionID::Hash(transaction_hash.into()), + transaction: TransactionId::Hash(transaction_hash.into()), address: address.into_iter().map(|i| i.value()).collect() }; let trace = client.trace(id); @@ -153,7 +153,7 @@ impl Traces for TracesClient where C: BlockChainClient + 'static, M: try!(self.active()); from_params::<(H256, _)>(params) .and_then(|(transaction_hash, flags)| { - match take_weak!(self.client).replay(TransactionID::Hash(transaction_hash.into()), to_call_analytics(flags)) { + match take_weak!(self.client).replay(TransactionId::Hash(transaction_hash.into()), to_call_analytics(flags)) { Ok(e) => Ok(to_value(&TraceResults::from(e))), _ => Ok(Value::Null), } diff --git a/rpc/src/v1/tests/eth.rs b/rpc/src/v1/tests/eth.rs index 2f5131f3262..9a298dde49d 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -19,7 +19,7 @@ use std::sync::Arc; use std::time::Duration; use ethcore::client::{BlockChainClient, Client, ClientConfig}; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use ethcore::spec::{Genesis, Spec}; use ethcore::block::Block; use ethcore::views::BlockView; @@ -424,7 +424,7 @@ fn verify_transaction_counts(name: String, chain: BlockChain) { assert_eq!(tester.handler.handle_request_sync(&req), Some(res)); // uncles can share block numbers, so skip them. - if tester.client.block_hash(BlockID::Number(number)) == Some(hash) { + if tester.client.block_hash(BlockId::Number(number)) == Some(hash) { let (req, res) = by_number(number, count, &mut id); assert_eq!(tester.handler.handle_request_sync(&req), Some(res)); } diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index 861bb523464..f0b6eeac1e9 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -24,7 +24,7 @@ use rlp; use util::{Uint, U256, Address, H256, FixedHash, Mutex}; use ethcore::account_provider::AccountProvider; -use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionID}; +use ethcore::client::{TestBlockChainClient, EachBlockWith, Executed, TransactionId}; use ethcore::log_entry::{LocalizedLogEntry, LogEntry}; use ethcore::receipt::LocalizedReceipt; use ethcore::transaction::{Transaction, Action}; @@ -950,7 +950,7 @@ fn rpc_eth_transaction_receipt() { let hash = H256::from_str("b903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238").unwrap(); let tester = EthTester::default(); - tester.client.set_transaction_receipt(TransactionID::Hash(hash), receipt); + tester.client.set_transaction_receipt(TransactionId::Hash(hash), receipt); let request = r#"{ "jsonrpc": "2.0", diff --git a/rpc/src/v1/types/block_number.rs b/rpc/src/v1/types/block_number.rs index 01625f8edcb..0a2b2f30572 100644 --- a/rpc/src/v1/types/block_number.rs +++ b/rpc/src/v1/types/block_number.rs @@ -16,7 +16,7 @@ use serde::{Deserialize, Deserializer, Error}; use serde::de::Visitor; -use ethcore::client::BlockID; +use ethcore::client::BlockId; /// Represents rpc api block number param. #[derive(Debug, PartialEq, Clone)] @@ -64,20 +64,20 @@ impl Visitor for BlockNumberVisitor { } } -impl Into for BlockNumber { - fn into(self) -> BlockID { +impl Into for BlockNumber { + fn into(self) -> BlockId { match self { - BlockNumber::Num(n) => BlockID::Number(n), - BlockNumber::Earliest => BlockID::Earliest, - BlockNumber::Latest => BlockID::Latest, - BlockNumber::Pending => BlockID::Pending, + BlockNumber::Num(n) => BlockId::Number(n), + BlockNumber::Earliest => BlockId::Earliest, + BlockNumber::Latest => BlockId::Latest, + BlockNumber::Pending => BlockId::Pending, } } } #[cfg(test)] mod tests { - use ethcore::client::BlockID; + use ethcore::client::BlockId; use super::*; use serde_json; @@ -90,10 +90,10 @@ mod tests { #[test] fn block_number_into() { - assert_eq!(BlockID::Number(100), BlockNumber::Num(100).into()); - assert_eq!(BlockID::Earliest, BlockNumber::Earliest.into()); - assert_eq!(BlockID::Latest, BlockNumber::Latest.into()); - assert_eq!(BlockID::Pending, BlockNumber::Pending.into()); + assert_eq!(BlockId::Number(100), BlockNumber::Num(100).into()); + assert_eq!(BlockId::Earliest, BlockNumber::Earliest.into()); + assert_eq!(BlockId::Latest, BlockNumber::Latest.into()); + assert_eq!(BlockId::Pending, BlockNumber::Pending.into()); } } diff --git a/rpc/src/v1/types/filter.rs b/rpc/src/v1/types/filter.rs index fc163c54be8..bc07254e2aa 100644 --- a/rpc/src/v1/types/filter.rs +++ b/rpc/src/v1/types/filter.rs @@ -18,7 +18,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer, Error}; use serde_json::value; use jsonrpc_core::Value; use ethcore::filter::Filter as EthFilter; -use ethcore::client::BlockID; +use ethcore::client::BlockId; use v1::types::{BlockNumber, H160, H256, Log}; /// Variadic value @@ -73,8 +73,8 @@ pub struct Filter { impl Into for Filter { fn into(self) -> EthFilter { EthFilter { - from_block: self.from_block.map_or_else(|| BlockID::Latest, Into::into), - to_block: self.to_block.map_or_else(|| BlockID::Latest, Into::into), + from_block: self.from_block.map_or_else(|| BlockId::Latest, Into::into), + to_block: self.to_block.map_or_else(|| BlockId::Latest, Into::into), address: self.address.and_then(|address| match address { VariadicValue::Null => None, VariadicValue::Single(a) => Some(vec![a.into()]), @@ -128,7 +128,7 @@ mod tests { use super::*; use v1::types::BlockNumber; use ethcore::filter::Filter as EthFilter; - use ethcore::client::BlockID; + use ethcore::client::BlockId; #[test] fn topic_deserialization() { @@ -173,8 +173,8 @@ mod tests { let eth_filter: EthFilter = filter.into(); assert_eq!(eth_filter, EthFilter { - from_block: BlockID::Earliest, - to_block: BlockID::Latest, + from_block: BlockId::Earliest, + to_block: BlockId::Latest, address: Some(vec![]), topics: vec![ None, diff --git a/rpc/src/v1/types/trace_filter.rs b/rpc/src/v1/types/trace_filter.rs index 21e50e17580..83ec6b06e68 100644 --- a/rpc/src/v1/types/trace_filter.rs +++ b/rpc/src/v1/types/trace_filter.rs @@ -16,7 +16,7 @@ //! Trace filter deserialization. -use ethcore::client::BlockID; +use ethcore::client::BlockId; use ethcore::client; use v1::types::{BlockNumber, H160}; @@ -39,8 +39,8 @@ pub struct TraceFilter { impl Into for TraceFilter { fn into(self) -> client::TraceFilter { - let start = self.from_block.map_or(BlockID::Latest, Into::into); - let end = self.to_block.map_or(BlockID::Latest, Into::into); + let start = self.from_block.map_or(BlockId::Latest, Into::into); + let end = self.to_block.map_or(BlockId::Latest, Into::into); client::TraceFilter { range: start..end, from_address: self.from_address.map_or_else(Vec::new, |x| x.into_iter().map(Into::into).collect()), diff --git a/sync/src/block_sync.rs b/sync/src/block_sync.rs index ff541114023..0a5d8550be7 100644 --- a/sync/src/block_sync.rs +++ b/sync/src/block_sync.rs @@ -22,7 +22,7 @@ use util::*; use rlp::*; use ethcore::views::{BlockView}; use ethcore::header::{BlockNumber, Header as BlockHeader}; -use ethcore::client::{BlockStatus, BlockID, BlockImportError}; +use ethcore::client::{BlockStatus, BlockId, BlockImportError}; use ethcore::block::Block; use ethcore::error::{ImportError, BlockError}; use sync_io::SyncIo; @@ -225,7 +225,7 @@ impl BlockDownloader { trace!(target: "sync", "Error decoding block header RLP: {:?}", e); BlockDownloaderImportError::Invalid })); - match io.chain().block_status(BlockID::Hash(hash.clone())) { + match io.chain().block_status(BlockId::Hash(hash.clone())) { BlockStatus::InChain | BlockStatus::Queued => { match self.state { State::Blocks => trace!(target: "sync", "Header already in chain {} ({})", number, hash), @@ -347,7 +347,7 @@ impl BlockDownloader { debug!(target: "sync", "Could not revert to previous ancient block, last: {} ({})", self.last_imported_block, self.last_imported_hash); self.reset(); } else { - match io.chain().block_hash(BlockID::Number(self.last_imported_block - 1)) { + match io.chain().block_hash(BlockId::Number(self.last_imported_block - 1)) { Some(h) => { self.last_imported_block -= 1; self.last_imported_hash = h; diff --git a/sync/src/blocks.rs b/sync/src/blocks.rs index bf0c4b2447e..bcb9973dca8 100644 --- a/sync/src/blocks.rs +++ b/sync/src/blocks.rs @@ -475,7 +475,7 @@ impl BlockCollection { #[cfg(test)] mod test { use super::BlockCollection; - use ethcore::client::{TestBlockChainClient, EachBlockWith, BlockID, BlockChainClient}; + use ethcore::client::{TestBlockChainClient, EachBlockWith, BlockId, BlockChainClient}; use ethcore::views::HeaderView; use ethcore::header::BlockNumber; use util::*; @@ -497,7 +497,7 @@ mod test { assert!(is_empty(&bc)); let client = TestBlockChainClient::new(); client.add_blocks(100, EachBlockWith::Nothing); - let hashes = (0 .. 100).map(|i| (&client as &BlockChainClient).block_hash(BlockID::Number(i)).unwrap()).collect(); + let hashes = (0 .. 100).map(|i| (&client as &BlockChainClient).block_hash(BlockId::Number(i)).unwrap()).collect(); bc.reset_to(hashes); assert!(!is_empty(&bc)); bc.clear(); @@ -511,7 +511,7 @@ mod test { let client = TestBlockChainClient::new(); let nblocks = 200; client.add_blocks(nblocks, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); let heads: Vec<_> = hashes.iter().enumerate().filter_map(|(i, h)| if i % 20 == 0 { Some(h.clone()) } else { None }).collect(); @@ -564,7 +564,7 @@ mod test { let client = TestBlockChainClient::new(); let nblocks = 200; client.add_blocks(nblocks, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); let heads: Vec<_> = hashes.iter().enumerate().filter_map(|(i, h)| if i % 20 == 0 { Some(h.clone()) } else { None }).collect(); @@ -586,7 +586,7 @@ mod test { let client = TestBlockChainClient::new(); let nblocks = 200; client.add_blocks(nblocks, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. nblocks).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); let heads: Vec<_> = hashes.iter().enumerate().filter_map(|(i, h)| if i % 20 == 0 { Some(h.clone()) } else { None }).collect(); diff --git a/sync/src/chain.rs b/sync/src/chain.rs index d98b142cb97..fd3e82767dd 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -94,7 +94,7 @@ use rlp::*; use network::*; use ethcore::views::{HeaderView}; use ethcore::header::{BlockNumber, Header as BlockHeader}; -use ethcore::client::{BlockChainClient, BlockStatus, BlockID, BlockChainInfo, BlockImportError}; +use ethcore::client::{BlockChainClient, BlockStatus, BlockId, BlockChainInfo, BlockImportError}; use ethcore::error::*; use ethcore::snapshot::{ManifestData, RestorationStatus}; use sync_io::SyncIo; @@ -929,7 +929,7 @@ impl ChainSync { io.disable_peer(peer_id); continue; } - match io.chain().block_status(BlockID::Hash(hash.clone())) { + match io.chain().block_status(BlockId::Hash(hash.clone())) { BlockStatus::InChain => { trace!(target: "sync", "New block hash already in chain {:?}", hash); }, @@ -1150,7 +1150,7 @@ impl ChainSync { return; } - let have_latest = io.chain().block_status(BlockID::Hash(peer_latest)) != BlockStatus::Unknown; + let have_latest = io.chain().block_status(BlockId::Hash(peer_latest)) != BlockStatus::Unknown; if !have_latest && (higher_difficulty || force || self.state == SyncState::NewBlocks) { // check if got new blocks to download trace!(target: "sync", "Syncing with {}, force={}, td={:?}, our td={}, state={:?}", peer_id, force, peer_difficulty, syncing_difficulty, self.state); @@ -1442,11 +1442,11 @@ impl ChainSync { // id is a hash let hash: H256 = try!(r.val_at(0)); trace!(target: "sync", "{} -> GetBlockHeaders (hash: {}, max: {}, skip: {}, reverse:{})", peer_id, hash, max_headers, skip, reverse); - match io.chain().block_header(BlockID::Hash(hash)) { + match io.chain().block_header(BlockId::Hash(hash)) { Some(hdr) => { let number = From::from(HeaderView::new(&hdr).number()); debug_assert_eq!(HeaderView::new(&hdr).sha3(), hash); - if max_headers == 1 || io.chain().block_hash(BlockID::Number(number)) != Some(hash) { + if max_headers == 1 || io.chain().block_hash(BlockId::Number(number)) != Some(hash) { // Non canonical header or single header requested // TODO: handle single-step reverse hashchains of non-canon hashes trace!(target:"sync", "Returning single header: {:?}", hash); @@ -1479,7 +1479,7 @@ impl ChainSync { trace!(target: "sync", "{}: Returning cached fork header", peer_id); data.extend_from_slice(hdr); count += 1; - } else if let Some(mut hdr) = io.chain().block_header(BlockID::Number(number)) { + } else if let Some(mut hdr) = io.chain().block_header(BlockId::Number(number)) { data.append(&mut hdr); count += 1; } else { @@ -1513,7 +1513,7 @@ impl ChainSync { let mut added = 0usize; let mut data = Bytes::new(); for i in 0..count { - if let Some(mut hdr) = io.chain().block_body(BlockID::Hash(try!(r.val_at::(i)))) { + if let Some(mut hdr) = io.chain().block_body(BlockId::Hash(try!(r.val_at::(i)))) { data.append(&mut hdr); added += 1; } @@ -1770,7 +1770,7 @@ impl ChainSync { let mut rlp_stream = RlpStream::new_list(blocks.len()); for block_hash in blocks { let mut hash_rlp = RlpStream::new_list(2); - let number = HeaderView::new(&chain.block_header(BlockID::Hash(block_hash.clone())) + let number = HeaderView::new(&chain.block_header(BlockId::Hash(block_hash.clone())) .expect("chain.tree_route and chain.find_uncles only return hahses of blocks that are in the blockchain. qed.")).number(); hash_rlp.append(&block_hash); hash_rlp.append(&number); @@ -1787,7 +1787,7 @@ impl ChainSync { /// creates latest block rlp for the given client fn create_latest_block_rlp(chain: &BlockChainClient) -> Bytes { let mut rlp_stream = RlpStream::new_list(2); - rlp_stream.append_raw(&chain.block(BlockID::Hash(chain.chain_info().best_block_hash)).expect("Best block always exists"), 1); + rlp_stream.append_raw(&chain.block(BlockId::Hash(chain.chain_info().best_block_hash)).expect("Best block always exists"), 1); rlp_stream.append(&chain.chain_info().total_difficulty); rlp_stream.out() } @@ -1795,8 +1795,8 @@ impl ChainSync { /// creates latest block rlp for the given client fn create_new_block_rlp(chain: &BlockChainClient, hash: &H256) -> Bytes { let mut rlp_stream = RlpStream::new_list(2); - rlp_stream.append_raw(&chain.block(BlockID::Hash(hash.clone())).expect("Block has just been sealed; qed"), 1); - rlp_stream.append(&chain.block_total_difficulty(BlockID::Hash(hash.clone())).expect("Block has just been sealed; qed.")); + rlp_stream.append_raw(&chain.block(BlockId::Hash(hash.clone())).expect("Block has just been sealed; qed"), 1); + rlp_stream.append(&chain.block_total_difficulty(BlockId::Hash(hash.clone())).expect("Block has just been sealed; qed.")); rlp_stream.out() } @@ -1804,7 +1804,7 @@ impl ChainSync { fn get_lagging_peers(&mut self, chain_info: &BlockChainInfo, io: &SyncIo) -> Vec { let latest_hash = chain_info.best_block_hash; self.peers.iter_mut().filter_map(|(&id, ref mut peer_info)| - match io.chain().block_status(BlockID::Hash(peer_info.latest_hash.clone())) { + match io.chain().block_status(BlockId::Hash(peer_info.latest_hash.clone())) { BlockStatus::InChain => { if peer_info.latest_hash != latest_hash { Some(id) @@ -1855,7 +1855,7 @@ impl ChainSync { fn propagate_new_hashes(&mut self, chain_info: &BlockChainInfo, io: &mut SyncIo, peers: &[PeerId]) -> usize { trace!(target: "sync", "Sending NewHashes to {:?}", peers); let mut sent = 0; - let last_parent = HeaderView::new(&io.chain().block_header(BlockID::Hash(chain_info.best_block_hash.clone())) + let last_parent = HeaderView::new(&io.chain().block_header(BlockId::Hash(chain_info.best_block_hash.clone())) .expect("Best block always exists")).parent_hash(); for peer_id in peers { sent += match ChainSync::create_new_hashes_rlp(io.chain(), &last_parent, &chain_info.best_block_hash) { @@ -2113,7 +2113,7 @@ mod tests { let mut client = TestBlockChainClient::new(); client.add_blocks(100, EachBlockWith::Nothing); - let blocks: Vec<_> = (0 .. 100).map(|i| (&client as &BlockChainClient).block(BlockID::Number(i as BlockNumber)).unwrap()).collect(); + let blocks: Vec<_> = (0 .. 100).map(|i| (&client as &BlockChainClient).block(BlockId::Number(i as BlockNumber)).unwrap()).collect(); let headers: Vec<_> = blocks.iter().map(|b| Rlp::new(b).at(0).as_raw().to_vec()).collect(); let hashes: Vec<_> = headers.iter().map(|h| HeaderView::new(h).sha3()).collect(); @@ -2286,7 +2286,7 @@ mod tests { let mut client = TestBlockChainClient::new(); client.add_blocks(100, EachBlockWith::Uncle); let mut queue = VecDeque::new(); - let hash = client.block_hash(BlockID::Number(99)).unwrap(); + let hash = client.block_hash(BlockId::Number(99)).unwrap(); let mut sync = dummy_sync_with_peer(client.block_hash_delta_minus(5), &client); let chain_info = client.chain_info(); let ss = TestSnapshotService::new(); @@ -2544,7 +2544,7 @@ mod tests { // Add some balance to clients and reset nonces for h in &[good_blocks[0], retracted_blocks[0]] { - let block = client.block(BlockID::Hash(*h)).unwrap(); + let block = client.block(BlockId::Hash(*h)).unwrap(); let view = BlockView::new(&block); client.set_balance(view.transactions()[0].sender().unwrap(), U256::from(1_000_000_000)); client.set_nonce(view.transactions()[0].sender().unwrap(), U256::from(0)); @@ -2563,7 +2563,7 @@ mod tests { } // We need to update nonce status (because we say that the block has been imported) for h in &[good_blocks[0]] { - let block = client.block(BlockID::Hash(*h)).unwrap(); + let block = client.block(BlockId::Hash(*h)).unwrap(); let view = BlockView::new(&block); client.set_nonce(view.transactions()[0].sender().unwrap(), U256::from(1)); } diff --git a/sync/src/tests/chain.rs b/sync/src/tests/chain.rs index 5fe34428ebd..30ae131aa89 100644 --- a/sync/src/tests/chain.rs +++ b/sync/src/tests/chain.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see . use util::*; -use ethcore::client::{TestBlockChainClient, BlockChainClient, BlockID, EachBlockWith}; +use ethcore::client::{TestBlockChainClient, BlockChainClient, BlockId, EachBlockWith}; use chain::{SyncState}; use super::helpers::*; use SyncConfig; @@ -27,7 +27,7 @@ fn two_peers() { net.peer_mut(1).chain.add_blocks(1000, EachBlockWith::Uncle); net.peer_mut(2).chain.add_blocks(1000, EachBlockWith::Uncle); net.sync(); - assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some()); + assert!(net.peer(0).chain.block(BlockId::Number(1000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); } @@ -37,7 +37,7 @@ fn long_chain() { let mut net = TestNet::new(2); net.peer_mut(1).chain.add_blocks(50000, EachBlockWith::Nothing); net.sync(); - assert!(net.peer(0).chain.block(BlockID::Number(50000)).is_some()); + assert!(net.peer(0).chain.block(BlockId::Number(50000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); } @@ -71,7 +71,7 @@ fn empty_blocks() { net.peer_mut(2).chain.add_blocks(5, with); } net.sync(); - assert!(net.peer(0).chain.block(BlockID::Number(1000)).is_some()); + assert!(net.peer(0).chain.block(BlockId::Number(1000)).is_some()); assert_eq!(*net.peer(0).chain.blocks.read(), *net.peer(1).chain.blocks.read()); } @@ -123,13 +123,13 @@ fn net_hard_fork() { let ref_client = TestBlockChainClient::new(); ref_client.add_blocks(50, EachBlockWith::Uncle); { - let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockID::Number(50)).unwrap()))); + let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockId::Number(50)).unwrap()))); net.peer_mut(0).chain.add_blocks(100, EachBlockWith::Uncle); net.sync(); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 100); } { - let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockID::Number(50)).unwrap()))); + let mut net = TestNet::new_with_fork(2, Some((50, ref_client.block_hash(BlockId::Number(50)).unwrap()))); net.peer_mut(0).chain.add_blocks(100, EachBlockWith::Nothing); net.sync(); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 0); diff --git a/util/Cargo.toml b/util/Cargo.toml index cc342eecaae..2f8f5c6fb40 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -37,6 +37,7 @@ tiny-keccak= "1.0" ethcore-bloom-journal = { path = "bloom" } regex = "0.1" lru-cache = "0.1.0" +semver = "0.5" [features] default = [] diff --git a/util/src/lib.rs b/util/src/lib.rs index 2b4ac0fed0e..e62a47e4155 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -106,6 +106,7 @@ extern crate tiny_keccak; extern crate rlp; extern crate regex; extern crate lru_cache; +extern crate semver; #[macro_use] extern crate heapsize; diff --git a/util/src/misc.rs b/util/src/misc.rs index d9eab1af08a..62231da9a86 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -17,14 +17,15 @@ //! Diff misc. use common::*; +use semver::{Identifier, Version}; use rlp::{Stream, RlpStream}; use target_info::Target; include!(concat!(env!("OUT_DIR"), "/version.rs")); include!(concat!(env!("OUT_DIR"), "/rustc_version.rs")); -#[derive(PartialEq, Eq, Clone, Copy, Debug)] /// Boolean type for clean/dirty status. +#[derive(PartialEq, Eq, Clone, Copy, Debug)] pub enum Filth { /// Data has not been changed. Clean, @@ -32,9 +33,112 @@ pub enum Filth { Dirty, } -/// Get the (SHA1?) 160-bit hash of this build's code base. -pub fn code_hash() -> H160 { - sha().into() +/// A release's track. +#[derive(PartialEq, Eq, Clone, Copy, Debug)] +pub enum ReleaseTrack { + /// Stable track. + Stable, + /// Beta track. + Beta, + /// Nightly track. + Nightly, + /// No known track. + Unknown, +} + +impl fmt::Display for ReleaseTrack { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + write!(f, "{}", match *self { + ReleaseTrack::Stable => "stable", + ReleaseTrack::Beta => "beta", + ReleaseTrack::Nightly => "nightly", + ReleaseTrack::Unknown => "unknown", + }) + } +} + +impl<'a> From<&'a str> for ReleaseTrack { + fn from(s: &'a str) -> Self { + match s { + "stable" => ReleaseTrack::Stable, + "beta" => ReleaseTrack::Beta, + "nightly" => ReleaseTrack::Nightly, + _ => ReleaseTrack::Unknown, + } + } +} + +impl From for ReleaseTrack { + fn from(i: u8) -> Self { + match i { + 1 => ReleaseTrack::Stable, + 2 => ReleaseTrack::Beta, + 3 => ReleaseTrack::Nightly, + _ => ReleaseTrack::Unknown, + } + } +} + +impl Into for ReleaseTrack { + fn into(self) -> u8 { + match self { + ReleaseTrack::Stable => 1, + ReleaseTrack::Beta => 2, + ReleaseTrack::Nightly => 3, + ReleaseTrack::Unknown => 0, + } + } +} + +/// Version information of a particular release. +#[derive(Debug, PartialEq)] +pub struct VersionInfo { + /// The track on which it was released. + pub track: ReleaseTrack, + /// The version. + pub version: Version, + /// The (SHA1?) 160-bit hash of this build's code base. + pub hash: H160, +} + +impl fmt::Display for VersionInfo { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + write!(f, "{}-{}", self.version, self.hash) + } +} + +impl VersionInfo { + /// Get information for this (currently running) binary. + pub fn this() -> Self { + VersionInfo { + track: env!["CARGO_PKG_VERSION_PRE"].into(), + version: Version::parse(env!["CARGO_PKG_VERSION"]).expect("Environment variables are known to be valid; qed"), + hash: sha().into(), + } + } + + /// Compose the information from the provided raw fields. + pub fn from_raw(semver: u32, track: u8, hash: H160) -> Self { + let t = track.into(); + VersionInfo { + version: Version { + major: (semver >> 16) as u64, + minor: ((semver >> 8) & 0xff) as u64, + patch: (semver & 0xff) as u64, + build: vec![], + pre: vec![Identifier::AlphaNumeric(format!("{}", t))] + }, + track: t, + hash: hash, + } + } +} + +/// Get the platform identifier. +pub fn platform() -> String { + let env = Target::env(); + let env_dash = if env.is_empty() { "" } else { "-" }; + format!("{}-{}{}{}", Target::arch(), Target::os(), env_dash, env) } /// Get the standard version string for this software. @@ -43,18 +147,16 @@ pub fn version() -> String { let sha3_dash = if sha3.is_empty() { "" } else { "-" }; let commit_date = commit_date().replace("-", ""); let date_dash = if commit_date.is_empty() { "" } else { "-" }; - let env = Target::env(); - let env_dash = if env.is_empty() { "" } else { "-" }; - format!("Parity/v{}-unstable{}{}{}{}/{}-{}{}{}/rustc{}", env!("CARGO_PKG_VERSION"), sha3_dash, sha3, date_dash, commit_date, Target::arch(), Target::os(), env_dash, env, rustc_version()) + format!("Parity/v{}-unstable{}{}{}{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), sha3_dash, sha3, date_dash, commit_date, platform(), rustc_version()) } /// Get the standard version data for this software. pub fn version_data() -> Bytes { let mut s = RlpStream::new_list(4); let v = - (u32::from_str(env!("CARGO_PKG_VERSION_MAJOR")).unwrap() << 16) + - (u32::from_str(env!("CARGO_PKG_VERSION_MINOR")).unwrap() << 8) + - u32::from_str(env!("CARGO_PKG_VERSION_PATCH")).unwrap(); + (u32::from_str(env!("CARGO_PKG_VERSION_MAJOR")).expect("Environment variables are known to be valid; qed") << 16) + + (u32::from_str(env!("CARGO_PKG_VERSION_MINOR")).expect("Environment variables are known to be valid; qed") << 8) + + u32::from_str(env!("CARGO_PKG_VERSION_PATCH")).expect("Environment variables are known to be valid; qed"); s.append(&v); s.append(&"Parity"); s.append(&rustc_version()); From 9d3b2352cca5386de0da28b9a2433e32d448843e Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 23 Nov 2016 16:29:15 +0100 Subject: [PATCH 08/87] More work. --- ethcore/src/client/client.rs | 3 ++- ethcore/src/client/config.rs | 29 +++++++++++++++++++++++++++++ ethcore/src/client/mod.rs | 2 +- ethcore/src/client/updater.rs | 2 ++ parity/cli/mod.rs | 2 ++ parity/cli/usage.txt | 19 +++++++++++-------- parity/configuration.rs | 6 +++++- 7 files changed, 52 insertions(+), 11 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index a4fa5aa57c5..102c4aab631 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -54,7 +54,7 @@ use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute}; use client::{ BlockId, TransactionId, UncleId, TraceId, ClientConfig, BlockChainClient, MiningBlockChainClient, TraceFilter, CallAnalytics, BlockImportError, Mode, - ChainNotify, + ChainNotify, UpdatePolicy, }; use client::Error as ClientError; use env_info::EnvInfo; @@ -129,6 +129,7 @@ impl SleepState { /// Call `import_block()` to import a block asynchronously; `flush_queue()` flushes the queue. pub struct Client { mode: Mutex, + update_policy: UpdatePolicy, chain: RwLock>, tracedb: RwLock>, engine: Arc, diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 045b8ee05ca..bf06df46254 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -66,6 +66,35 @@ impl FromStr for DatabaseCompactionProfile { } } +#[derive(Debug, Eq, PartialEq, Clone)] +pub enum UpdateFilter { + All, + Patch, + Critical, + None, +} + +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct UpdatePolicy { + download_only: bool, + track: Track, +} + +/// Operating mode for the client. +#[derive(Debug, Eq, PartialEq, Clone)] +pub enum UpdatePolicy { + /// Always on. + Active, + /// Goes offline after RLP is inactive for some (given) time, but + /// comes back online after a while of inactivity. + Passive(Duration, Duration), + /// Goes offline after RLP is inactive for some (given) time and + /// stays inactive. + Dark(Duration), + /// Always off. + Off, +} + /// Operating mode for the client. #[derive(Debug, Eq, PartialEq, Clone)] pub enum Mode { diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index b49301bbd17..adeaaf64ac8 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -26,7 +26,7 @@ mod client; mod updater; pub use self::client::*; -pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; +pub use self::config::{Mode, ClientConfig, UpdatePolicy, Automation, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; pub use types::ids::*; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index 211fdeb1fb3..dc45a55ff83 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -34,6 +34,8 @@ pub struct Updater { client: Weak, operations: Operations, + + pub this: VersionInfo, pub release_info: Option, diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 3ad6259b806..33a48b3b0ef 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -77,6 +77,7 @@ usage! { flag_mode: String = "last", or |c: &Config| otry!(c.parity).mode.clone(), flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(), flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(), + flag_auto_update: String = "consensus", or |c: &Config| otry!(c.parity).auto_update.clone(), flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(), flag_db_path: String = "$HOME/.parity", or |c: &Config| otry!(c.parity).db_path.clone(), flag_keys_path: String = "$HOME/.parity/keys", or |c: &Config| otry!(c.parity).keys_path.clone(), @@ -501,6 +502,7 @@ mod tests { flag_mode: "last".into(), flag_mode_timeout: 300u64, flag_mode_alarm: 3600u64, + flag_auto_update: "consensus".into(), flag_chain: "xyz".into(), flag_db_path: "$HOME/.parity".into(), flag_keys_path: "$HOME/.parity/keys".into(), diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index e12a2566e7c..0ac59da0ecc 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -24,20 +24,23 @@ Operating Options: wakes regularly to resync. dark - Parity syncs only when the RPC is active. offline - Parity doesn't sync. (default: {flag_mode}). - --updates POLICY Set the client updating policy. POLICY specifies - which updates Parity will auto-install: - track - All updates in the current release track. - patch - All updates of the current minor version. - critical - Only consensus/security updates. - none - No updates. Not recommended. - --no-consensus Force the binary to run even if there are known - issues regarding consensus. Not recommended. --mode-timeout SECS Specify the number of seconds before inactivity timeout occurs when mode is dark or passive (default: {flag_mode_timeout}). --mode-alarm SECS Specify the number of seconds before auto sleep reawake timeout occurs when mode is passive (default: {flag_mode_alarm}). + --auto-update TRACK Set a release track to automatically update and + install. + all - All updates in the current release track. + patch - All updates of the current minor version. + critical - Only consensus/security updates. + none - No updates will be auto-installed. + (default: {flag_auto_update}). + --no-download Normally new releases will be downloaded ready for + updating. This disables it. Not recommended. + --no-consensus Force the binary to run even if there are known + issues regarding consensus. Not recommended. --chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, diff --git a/parity/configuration.rs b/parity/configuration.rs index a51d1227340..e08c853bd01 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -23,7 +23,7 @@ use cli::{Args, ArgsError}; use util::{Hashable, U256, Uint, Bytes, version_data, Secret, Address}; use util::log::Colour; use ethsync::{NetworkConfiguration, is_valid_node_url, AllowIP}; -use ethcore::client::VMType; +use ethcore::client::{VMType, UpdatePolicy}; use ethcore::miner::{MinerOptions, Banning}; use rpc::{IpcConfiguration, HttpConfiguration}; @@ -585,6 +585,10 @@ impl Configuration { } } + fn update_policy(&self) -> UpdatePolicy { + + } + fn directories(&self) -> Directories { use util::path; From 03ef95ba5027f899d1aecd29de9b81f06023f997 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 23 Nov 2016 20:35:21 +0100 Subject: [PATCH 09/87] Compiles. --- db/src/database.rs | 3 +-- ethcore/src/client/client.rs | 5 +++-- ethcore/src/client/config.rs | 38 +++++++++++++++++++++-------------- ethcore/src/client/mod.rs | 2 +- ethcore/src/client/updater.rs | 7 ++----- parity/blockchain.rs | 4 ++-- parity/cli/mod.rs | 7 +++++++ parity/cli/usage.txt | 4 +++- parity/configuration.rs | 37 +++++++++++++++++++++++++++++++--- parity/helpers.rs | 4 +++- parity/run.rs | 8 +++++++- parity/snapshot.rs | 2 +- 12 files changed, 87 insertions(+), 34 deletions(-) diff --git a/db/src/database.rs b/db/src/database.rs index e1774159b3c..6504900e68d 100644 --- a/db/src/database.rs +++ b/db/src/database.rs @@ -270,8 +270,7 @@ impl DatabaseService for Database { Ok(next_iterator) } - fn iter_next(&self, handle: IteratorHandle) -> Option - { + fn iter_next(&self, handle: IteratorHandle) -> Option { let mut iterators = self.iterators.write(); let mut iterator = match iterators.get_mut(&handle) { Some(some_iterator) => some_iterator, diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 102c4aab631..004f181d976 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -129,7 +129,6 @@ impl SleepState { /// Call `import_block()` to import a block asynchronously; `flush_queue()` flushes the queue. pub struct Client { mode: Mutex, - update_policy: UpdatePolicy, chain: RwLock>, tracedb: RwLock>, engine: Arc, @@ -227,6 +226,8 @@ impl Client { accountdb: Default::default(), }; + + let client = Arc::new(Client { sleep_state: Mutex::new(SleepState::new(awake)), liveness: AtomicBool::new(awake), @@ -262,7 +263,7 @@ impl Client { if let Ok(ops_addr) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { if !ops_addr.is_zero() { trace!(target: "client", "Found operations at {}", ops_addr); - *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), ops_addr)); + *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), ops_addr, client.config.update_policy.clone())); } } *client.registrar.lock() = Some(registrar); diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index bf06df46254..effa0b1dc7b 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -66,33 +66,39 @@ impl FromStr for DatabaseCompactionProfile { } } +/// Filter for releases. #[derive(Debug, Eq, PartialEq, Clone)] pub enum UpdateFilter { + /// All releases following the same track. All, + /// Only those of the same minor version potentially changing tracks. Patch, + /// As with `All`, but only those which are known to be critical. Critical, + /// None. None, } +/// The policy for auto-updating. #[derive(Debug, Eq, PartialEq, Clone)] pub struct UpdatePolicy { - download_only: bool, - track: Track, + /// Download potential updates. + pub enable_downloading: bool, + /// Which of those downloaded should be automatically installed. + pub filter: UpdateFilter, } -/// Operating mode for the client. -#[derive(Debug, Eq, PartialEq, Clone)] -pub enum UpdatePolicy { - /// Always on. - Active, - /// Goes offline after RLP is inactive for some (given) time, but - /// comes back online after a while of inactivity. - Passive(Duration, Duration), - /// Goes offline after RLP is inactive for some (given) time and - /// stays inactive. - Dark(Duration), - /// Always off. - Off, +impl Default for UpdatePolicy { + fn default() -> Self { + UpdatePolicy { + enable_downloading: false, + filter: UpdateFilter::None, + } + } +} + +impl UpdatePolicy { + pub fn new() -> Self { Default::default() } } /// Operating mode for the client. @@ -130,6 +136,8 @@ impl Display for Mode { /// Client configuration. Includes configs for all sub-systems. #[derive(Debug, PartialEq, Default)] pub struct ClientConfig { + /// Updater policy. + pub update_policy: UpdatePolicy, /// Block queue configuration. pub queue: QueueConfig, /// Blockchain configuration. diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index adeaaf64ac8..7759d08ef45 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -26,7 +26,7 @@ mod client; mod updater; pub use self::client::*; -pub use self::config::{Mode, ClientConfig, UpdatePolicy, Automation, DatabaseCompactionProfile, BlockChainConfig, VMType}; +pub use self::config::{Mode, ClientConfig, UpdatePolicy, UpdateFilter, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; pub use types::ids::*; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index dc45a55ff83..f4f40cfade1 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -18,8 +18,7 @@ use std::sync::Weak; use util::misc::{VersionInfo, ReleaseTrack, platform}; use util::{Address, H160, H256, FixedHash}; use client::operations::Operations; -use client::client::Client; -use client::BlockId; +use client::{Client, UpdatePolicy, BlockId}; pub struct ReleaseInfo { fork_supported: usize, @@ -34,15 +33,13 @@ pub struct Updater { client: Weak, operations: Operations, - - pub this: VersionInfo, pub release_info: Option, } impl Updater { - pub fn new(client: Weak, operations: Address) -> Self { + pub fn new(client: Weak, operations: Address, _update_policy: UpdatePolicy) -> Self { let mut u = Updater { client: client.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 7696d1b3870..70326de3bc3 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -153,7 +153,7 @@ fn execute_import(cmd: ImportBlockchain) -> Result { try!(execute_upgrades(&db_dirs, algorithm, cmd.compaction.compaction_profile(db_dirs.fork_path().as_path()))); // prepare client config - let client_config = to_client_config(&cmd.cache_config, Mode::Active, tracing, fat_db, cmd.compaction, cmd.wal, cmd.vm_type, "".into(), algorithm, cmd.pruning_history, cmd.check_seal); + let client_config = to_client_config(&cmd.cache_config, Default::default(), Mode::Active, tracing, fat_db, cmd.compaction, cmd.wal, cmd.vm_type, "".into(), algorithm, cmd.pruning_history, cmd.check_seal); // build client let service = try!(ClientService::start( @@ -304,7 +304,7 @@ fn execute_export(cmd: ExportBlockchain) -> Result { try!(execute_upgrades(&db_dirs, algorithm, cmd.compaction.compaction_profile(db_dirs.fork_path().as_path()))); // prepare client config - let client_config = to_client_config(&cmd.cache_config, Mode::Active, tracing, fat_db, cmd.compaction, cmd.wal, VMType::default(), "".into(), algorithm, cmd.pruning_history, cmd.check_seal); + let client_config = to_client_config(&cmd.cache_config, Default::default(), Mode::Active, tracing, fat_db, cmd.compaction, cmd.wal, VMType::default(), "".into(), algorithm, cmd.pruning_history, cmd.check_seal); let service = try!(ClientService::start( client_config, diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 3948929147c..08474ea45cf 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -78,6 +78,8 @@ usage! { flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(), flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(), flag_auto_update: String = "consensus", or |c: &Config| otry!(c.parity).auto_update.clone(), + flag_no_download: bool = false, or |c: &Config| otry!(c.parity).no_download.clone(), + flag_no_consensus: bool = false, or |c: &Config| otry!(c.parity).no_consensus.clone(), flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(), flag_db_path: String = "$HOME/.parity", or |c: &Config| otry!(c.parity).db_path.clone(), flag_keys_path: String = "$HOME/.parity/keys", or |c: &Config| otry!(c.parity).keys_path.clone(), @@ -290,6 +292,9 @@ struct Operating { mode: Option, mode_timeout: Option, mode_alarm: Option, + auto_update: Option, + no_download: Option, + no_consensus: Option, chain: Option, db_path: Option, keys_path: Option, @@ -504,6 +509,8 @@ mod tests { flag_mode_timeout: 300u64, flag_mode_alarm: 3600u64, flag_auto_update: "consensus".into(), + flag_no_download: false, + flag_no_consensus: false, flag_chain: "xyz".into(), flag_db_path: "$HOME/.parity".into(), flag_keys_path: "$HOME/.parity/keys".into(), diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index f905ec74a9a..1a6fe3b612e 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -38,9 +38,11 @@ Operating Options: none - No updates will be auto-installed. (default: {flag_auto_update}). --no-download Normally new releases will be downloaded ready for - updating. This disables it. Not recommended. + updating. This disables it. Not recommended. + (default: {flag_no_download}). --no-consensus Force the binary to run even if there are known issues regarding consensus. Not recommended. + (default: {flag_no_consensus}). --chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, diff --git a/parity/configuration.rs b/parity/configuration.rs index 0f0c1981448..3cb19fe378e 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -23,7 +23,7 @@ use cli::{Args, ArgsError}; use util::{Hashable, U256, Uint, Bytes, version_data, Secret, Address}; use util::log::Colour; use ethsync::{NetworkConfiguration, is_valid_node_url, AllowIP}; -use ethcore::client::{VMType, UpdatePolicy}; +use ethcore::client::{VMType, UpdatePolicy, UpdateFilter}; use ethcore::miner::{MinerOptions, Banning}; use rpc::{IpcConfiguration, HttpConfiguration}; @@ -81,6 +81,7 @@ impl Configuration { let pruning_history = self.args.flag_pruning_history; let vm_type = try!(self.vm_type()); let mode = match self.args.flag_mode.as_ref() { "last" => None, mode => Some(try!(to_mode(&mode, self.args.flag_mode_timeout, self.args.flag_mode_alarm))), }; + let update_policy = try!(self.update_policy()); let miner_options = try!(self.miner_options()); let logger_config = self.logger_config(); let http_conf = try!(self.http_config()); @@ -233,6 +234,7 @@ impl Configuration { acc_conf: try!(self.accounts_config()), gas_pricer: try!(self.gas_pricer_config()), miner_extras: try!(self.miner_extras()), + update_policy: update_policy, mode: mode, tracing: tracing, fat_db: fat_db, @@ -251,6 +253,7 @@ impl Configuration { no_periodic_snapshot: self.args.flag_no_periodic_snapshot, check_seal: !self.args.flag_no_seal_check, download_old_blocks: !self.args.flag_no_ancient_blocks, + require_consensus: !self.args.flag_no_consensus, }; Cmd::Run(run_cmd) }; @@ -586,8 +589,17 @@ impl Configuration { } } - fn update_policy(&self) -> UpdatePolicy { - + fn update_policy(&self) -> Result { + Ok(UpdatePolicy { + enable_downloading: !self.args.flag_no_download, + filter: match self.args.flag_auto_update.as_ref() { + "none" => UpdateFilter::None, + "critical" => UpdateFilter::Critical, + "patch" => UpdateFilter::Patch, + "all" => UpdateFilter::All, + _ => return Err("Invalid value for `--auto-update`. See `--help` for more information.".into()), + }, + }) } fn directories(&self) -> Directories { @@ -877,6 +889,7 @@ mod tests { no_periodic_snapshot: false, check_seal: true, download_old_blocks: true, + require_consensus: true, })); } @@ -901,6 +914,24 @@ mod tests { assert_eq!(conf3.miner_options().unwrap(), mining_options); } + #[test] + fn should_parse_updater_options() { + // when + let conf0 = parse(&["parity"]); + let conf1 = parse(&["parity", "--auto-update", "all"]); + let conf2 = parse(&["parity", "--no-download", "--auto-update=patch"]); + let conf3 = parse(&["parity", "--auto-update=xxx"]); + + // then + assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::Critical}); + mining_options.tx_queue_strategy = PrioritizationStrategy::GasFactorAndGasPrice; + assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::All}); + mining_options.tx_queue_strategy = PrioritizationStrategy::GasPriceOnly; + assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::Patch}); + mining_options.tx_queue_strategy = PrioritizationStrategy::GasAndGasPrice; + assert!(conf3.update_policy().is_err()); + } + #[test] fn should_parse_network_settings() { // given diff --git a/parity/helpers.rs b/parity/helpers.rs index fe5303ec87a..d748caa6ada 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -20,7 +20,7 @@ use std::time::Duration; use std::fs::File; use util::{clean_0x, U256, Uint, Address, path, CompactionProfile}; use util::journaldb::Algorithm; -use ethcore::client::{Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; +use ethcore::client::{UpdatePolicy, Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; use ethcore::miner::{PendingSet, GasLimit, PrioritizationStrategy}; use cache::CacheConfig; use dir::DatabaseDirectories; @@ -209,6 +209,7 @@ pub fn default_network_config() -> ::ethsync::NetworkConfiguration { #[cfg_attr(feature = "dev", allow(too_many_arguments))] pub fn to_client_config( cache_config: &CacheConfig, + update_policy: UpdatePolicy, mode: Mode, tracing: bool, fat_db: bool, @@ -242,6 +243,7 @@ pub fn to_client_config( // in bytes client_config.jump_table_size = cache_config.jump_tables() as usize * mb; + client_config.update_policy = update_policy; client_config.mode = mode; client_config.tracing.enabled = tracing; client_config.fat_db = fat_db; diff --git a/parity/run.rs b/parity/run.rs index f56ba5b9268..daa6aae051c 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -23,7 +23,7 @@ use ethsync::NetworkConfiguration; use util::{Colour, version, RotatingLogger}; use io::{MayPanic, ForwardPanic, PanicHandler}; use ethcore_logger::{Config as LogConfig}; -use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, ChainNotify, BlockChainClient}; +use ethcore::client::{Mode, UpdatePolicy, DatabaseCompactionProfile, VMType, ChainNotify, BlockChainClient}; use ethcore::service::ClientService; use ethcore::account_provider::AccountProvider; use ethcore::miner::{Miner, MinerService, ExternalMiner, MinerOptions}; @@ -75,6 +75,7 @@ pub struct RunCmd { pub acc_conf: AccountsConfig, pub gas_pricer: GasPricerConfig, pub miner_extras: MinerExtras, + pub update_policy: UpdatePolicy, pub mode: Option, pub tracing: Switch, pub fat_db: Switch, @@ -92,6 +93,7 @@ pub struct RunCmd { pub no_periodic_snapshot: bool, pub check_seal: bool, pub download_old_blocks: bool, + pub require_consensus: bool, } pub fn open_ui(dapps_conf: &dapps::Configuration, signer_conf: &signer::Configuration) -> Result<(), String> { @@ -158,6 +160,9 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { trace!(target: "mode", "mode is {:?}", mode); let network_enabled = match &mode { &Mode::Dark(_) | &Mode::Off => false, _ => true, }; + // get the update policy + let update_policy = cmd.update_policy; + // prepare client and snapshot paths. let client_path = db_dirs.client_path(algorithm); let snapshot_path = db_dirs.snapshot_path(); @@ -219,6 +224,7 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { // create client config let client_config = to_client_config( &cmd.cache_config, + update_policy, mode, tracing, fat_db, diff --git a/parity/snapshot.rs b/parity/snapshot.rs index 804047596a0..d74adc1b479 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -170,7 +170,7 @@ impl SnapshotCommand { try!(execute_upgrades(&db_dirs, algorithm, self.compaction.compaction_profile(db_dirs.fork_path().as_path()))); // prepare client config - let client_config = to_client_config(&self.cache_config, Mode::Active, tracing, fat_db, self.compaction, self.wal, VMType::default(), "".into(), algorithm, self.pruning_history, true); + let client_config = to_client_config(&self.cache_config, Default::default(), Mode::Active, tracing, fat_db, self.compaction, self.wal, VMType::default(), "".into(), algorithm, self.pruning_history, true); let service = try!(ClientService::start( client_config, From 735df6c30fd70dde26b331b64ecbd828d1b7a211 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 24 Nov 2016 17:19:48 +0100 Subject: [PATCH 10/87] More work. --- ethcore/res/ethereum/ropsten.json | 3 +- ethcore/src/client/client.rs | 2 +- ethcore/src/client/config.rs | 4 --- ethcore/src/client/updater.rs | 59 +++++++++++++++++++++++++------ parity/cli/mod.rs | 4 +-- 5 files changed, 53 insertions(+), 19 deletions(-) diff --git a/ethcore/res/ethereum/ropsten.json b/ethcore/res/ethereum/ropsten.json index 62282801ddf..7d2d53016c2 100644 --- a/ethcore/res/ethereum/ropsten.json +++ b/ethcore/res/ethereum/ropsten.json @@ -14,7 +14,8 @@ "eip155Transition": 10, "eip160Transition": 10, "eip161abcTransition": 10, - "eip161dTransition": 10 + "eip161dTransition": 10, + "maxCodeSize": 24576 } } }, diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 004f181d976..200527222d0 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -54,7 +54,7 @@ use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute}; use client::{ BlockId, TransactionId, UncleId, TraceId, ClientConfig, BlockChainClient, MiningBlockChainClient, TraceFilter, CallAnalytics, BlockImportError, Mode, - ChainNotify, UpdatePolicy, + ChainNotify, }; use client::Error as ClientError; use env_info::EnvInfo; diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index effa0b1dc7b..1b153d888f9 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -97,10 +97,6 @@ impl Default for UpdatePolicy { } } -impl UpdatePolicy { - pub fn new() -> Self { Default::default() } -} - /// Operating mode for the client. #[derive(Debug, Eq, PartialEq, Clone)] pub enum Mode { diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index f4f40cfade1..0b83307410c 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -21,47 +21,84 @@ use client::operations::Operations; use client::{Client, UpdatePolicy, BlockId}; pub struct ReleaseInfo { - fork_supported: usize, - latest_known_fork: usize, + pub latest_known_fork: usize, - latest: VersionInfo, - latest_fork: usize, - latest_binary: Option, + pub latest: VersionInfo, + pub latest_fork: usize, + pub latest_binary: Option, } pub struct Updater { client: Weak, operations: Operations, + update_policy: UpdatePolicy, pub this: VersionInfo, + pub this_fork: Option, pub release_info: Option, - } impl Updater { - pub fn new(client: Weak, operations: Address, _update_policy: UpdatePolicy) -> Self { + pub fn new(client: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { let mut u = Updater { client: client.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), + update_policy: update_policy, this: VersionInfo::this(), + this_fork: None, release_info: None, }; + + let (fork, track, _, _) = self.operations.release(client_id, &v.hash.into())?; + u.this_fork = if track > 0 { Some(fork) } else { None }; + u.release_info = u.get_release_info().ok(); + + // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if u.this.track == ReleaseTrack::Unknown { u.this.track = ReleaseTrack::Nightly; - } + } + u } + /// Is the currently running client capable of supporting the current chain? + /// `Some` answer or `None` if information on the running client is not available. + pub fn is_capable(&self) -> Option { + self.release_info.and_then(|relinfo| { + relinfo.fork_supported.map(|fork_supported| { + let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); + fork_supported >= relinfo.latest_fork || current_number < relinfo.latest_fork + }) + }) + } + + /// The release which is ready to be upgraded to, if any. If this returns `Some`, then + /// `execute_upgrade` may be called. + pub fn upgrade_ready(&self) -> Option { + unimplemented!() + } + + /// Actually upgrades the client. Assumes that the binary has been downloaded. + /// @returns `true` on success. + pub fn execute_upgrade(&mut self) -> bool { + unimplemented!() + } + + /// Our version info. + pub fn version_info() -> &VersionInfo { &self.this } + + /// Information gathered concerning the release. + pub fn release_info() -> &Option { &self.release_info } + fn get_release_info(&mut self) -> Result { - //601e0fb0fd7e9e1cec18f8872e8713117cab4e84 if self.this.track == ReleaseTrack::Unknown { return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); } let client_id = "parity"; - let latest_known_fork = self.operations.latest_fork()?; - let our_fork = self.operations.release(client_id, &self.this.hash.into())?.0; + + let latest_release = self.operations.latest_in_track(client_id, self.this.track.into())?; let (fork, track, semver, _critical) = self.operations.release(client_id, &latest_release)?; let maybe_latest_binary = self.operations.checksum(client_id, &latest_release, &platform())?; diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 08474ea45cf..b9d4770be19 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -77,7 +77,7 @@ usage! { flag_mode: String = "last", or |c: &Config| otry!(c.parity).mode.clone(), flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(), flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(), - flag_auto_update: String = "consensus", or |c: &Config| otry!(c.parity).auto_update.clone(), + flag_auto_update: String = "critical", or |c: &Config| otry!(c.parity).auto_update.clone(), flag_no_download: bool = false, or |c: &Config| otry!(c.parity).no_download.clone(), flag_no_consensus: bool = false, or |c: &Config| otry!(c.parity).no_consensus.clone(), flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(), @@ -508,7 +508,7 @@ mod tests { flag_mode: "last".into(), flag_mode_timeout: 300u64, flag_mode_alarm: 3600u64, - flag_auto_update: "consensus".into(), + flag_auto_update: "critical".into(), flag_no_download: false, flag_no_consensus: false, flag_chain: "xyz".into(), From 45017c599a28fa33113caf1c2b095e50afb60125 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 24 Nov 2016 19:11:29 +0100 Subject: [PATCH 11/87] Update test, fix number. --- ethcore/res/ethereum/tests | 2 +- ethcore/src/json_tests/transaction.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ethcore/res/ethereum/tests b/ethcore/res/ethereum/tests index 9028c4801fd..e8f4624b7f1 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8 +Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be diff --git a/ethcore/src/json_tests/transaction.rs b/ethcore/src/json_tests/transaction.rs index 43885212454..12e82bca2ab 100644 --- a/ethcore/src/json_tests/transaction.rs +++ b/ethcore/src/json_tests/transaction.rs @@ -34,7 +34,7 @@ fn do_json_test(json_data: &[u8]) -> Vec { Some(x) if x < 1_150_000 => &old_schedule, Some(_) => &new_schedule }; - let allow_network_id_of_one = number.map_or(false, |n| n >= 3_500_000); + let allow_network_id_of_one = number.map_or(false, |n| n >= 2_675_000); let rlp: Vec = test.rlp.into(); let res = UntrustedRlp::new(&rlp) From 8cddf9976a6273022557594e6bd239b85ea7e6b4 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 25 Nov 2016 15:43:49 +0100 Subject: [PATCH 12/87] Better information. --- ethcore/src/client/updater.rs | 102 ++++++++++++++++++++++------------ util/src/misc.rs | 2 +- 2 files changed, 68 insertions(+), 36 deletions(-) diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index 0b83307410c..c21f47b4a57 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -20,12 +20,20 @@ use util::{Address, H160, H256, FixedHash}; use client::operations::Operations; use client::{Client, UpdatePolicy, BlockId}; +#[derive(Debug, Clone, PartialEq)] pub struct ReleaseInfo { - pub latest_known_fork: usize, + pub version: VersionInfo, + pub is_critical: bool, + pub fork: u64, + pub binary: Option, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct OperationsInfo { + pub fork: u64, - pub latest: VersionInfo, - pub latest_fork: usize, - pub latest_binary: Option, + pub track: ReleaseInfo, + pub minor: Option, } pub struct Updater { @@ -33,11 +41,16 @@ pub struct Updater { operations: Operations, update_policy: UpdatePolicy, + // These don't change pub this: VersionInfo, - pub this_fork: Option, - pub release_info: Option, + pub this_fork: Option, + + // This does change + pub latest: Option, } +const CLIENT_ID: &'static str = "parity"; + impl Updater { pub fn new(client: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { let mut u = Updater { @@ -46,29 +59,29 @@ impl Updater { update_policy: update_policy, this: VersionInfo::this(), this_fork: None, - release_info: None, + latest: None, }; - let (fork, track, _, _) = self.operations.release(client_id, &v.hash.into())?; - u.this_fork = if track > 0 { Some(fork) } else { None }; - - u.release_info = u.get_release_info().ok(); + u.this_fork = u.operations.release(CLIENT_ID, &u.this.hash.into()).ok() + .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if u.this.track == ReleaseTrack::Unknown { u.this.track = ReleaseTrack::Nightly; } + u.latest = u.collect_latest().ok(); + u } /// Is the currently running client capable of supporting the current chain? /// `Some` answer or `None` if information on the running client is not available. pub fn is_capable(&self) -> Option { - self.release_info.and_then(|relinfo| { - relinfo.fork_supported.map(|fork_supported| { + self.latest.as_ref().and_then(|latest| { + self.this_fork.map(|this_fork| { let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); - fork_supported >= relinfo.latest_fork || current_number < relinfo.latest_fork + this_fork >= latest.fork || current_number < latest.fork }) }) } @@ -86,46 +99,65 @@ impl Updater { } /// Our version info. - pub fn version_info() -> &VersionInfo { &self.this } + pub fn version_info(&self) -> &VersionInfo { &self.this } /// Information gathered concerning the release. - pub fn release_info() -> &Option { &self.release_info } + pub fn info(&self) -> &Option { &self.latest } - fn get_release_info(&mut self) -> Result { + fn collect_release_info(&self, release_id: &H256) -> Result { + let (fork, track, semver, is_critical) = self.operations.release(CLIENT_ID, release_id)?; + let latest_binary = self.operations.checksum(CLIENT_ID, release_id, &platform())?; + Ok(ReleaseInfo { + version: VersionInfo::from_raw(semver, track, release_id.clone().into()), + is_critical: is_critical, + fork: fork as u64, + binary: if latest_binary.is_zero() { None } else { Some(latest_binary) }, + }) + } + + fn collect_latest(&self) -> Result { if self.this.track == ReleaseTrack::Unknown { return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); } - let client_id = "parity"; - + let latest_in_track = self.operations.latest_in_track(CLIENT_ID, self.this.track.into())?; + let in_track = self.collect_release_info(&latest_in_track)?; + let mut in_minor = Some(in_track.clone()); + const PROOF: &'static str = "in_minor initialised and assigned with Some; loop breaks if None assigned; qed"; + while in_minor.as_ref().expect(PROOF).version.track != self.this.track { + let track = match in_minor.as_ref().expect(PROOF).version.track { + ReleaseTrack::Beta => ReleaseTrack::Stable, + ReleaseTrack::Nightly => ReleaseTrack::Beta, + _ => { in_minor = None; break; } + }; + in_minor = Some(self.collect_release_info(&self.operations.latest_in_track(CLIENT_ID, track.into())?)?); + } - let latest_release = self.operations.latest_in_track(client_id, self.this.track.into())?; - let (fork, track, semver, _critical) = self.operations.release(client_id, &latest_release)?; - let maybe_latest_binary = self.operations.checksum(client_id, &latest_release, &platform())?; - Ok(ReleaseInfo { - fork_supported: our_fork as usize, - latest_known_fork: latest_known_fork as usize, - latest: VersionInfo::from_raw(semver, track, latest_release.into()), - latest_fork: fork as usize, - latest_binary: if maybe_latest_binary.is_zero() { None } else { Some(maybe_latest_binary) }, + Ok(OperationsInfo { + fork: self.operations.latest_fork()? as u64, + track: in_track, + minor: in_minor, }) } pub fn tick(&mut self) { - self.release_info = self.get_release_info().ok(); - let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); info!(target: "updater", "Current release is {}", self.this); - if let Some(ref relinfo) = self.release_info { - info!(target: "updater", "Latest release in our track is {} ({} binary is {})", - relinfo.latest, + + self.latest = self.collect_latest().ok(); + let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); + + if let Some(ref latest) = self.latest { + info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", + latest.track.version, + if latest.track.is_critical {""} else {"non-"}, platform(), - if let Some(ref b) = relinfo.latest_binary { + if let Some(ref b) = latest.track.binary { format!("{}", b) } else { "unreleased".into() } ); - info!(target: "updater", "Fork: this/current/latest/latest-known: #{}/#{}/#{}/#{}", relinfo.fork_supported, current_number, relinfo.latest_fork, relinfo.latest_known_fork); + info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match self.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); } } } diff --git a/util/src/misc.rs b/util/src/misc.rs index 62231da9a86..f779b92e99e 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -91,7 +91,7 @@ impl Into for ReleaseTrack { } /// Version information of a particular release. -#[derive(Debug, PartialEq)] +#[derive(Debug, Clone, PartialEq)] pub struct VersionInfo { /// The track on which it was released. pub track: ReleaseTrack, From de8dd47ff9262af4fa93bcef6e67536f7d872763 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 25 Nov 2016 19:29:13 +0100 Subject: [PATCH 13/87] Fetch binaries. --- Cargo.lock | 1 + ethcore/Cargo.toml | 1 + ethcore/hash-fetch/src/lib.rs | 2 +- ethcore/src/client/operations.rs | 4 +-- ethcore/src/client/updater.rs | 52 ++++++++++++++++++++++++++++++-- ethcore/src/lib.rs | 1 + 6 files changed, 55 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f738d28b8d4..c8920f52283 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,6 +287,7 @@ dependencies = [ "ethash 1.4.0", "ethcore-bloom-journal 0.1.0", "ethcore-devtools 1.4.0", + "ethcore-hash-fetch 1.5.0", "ethcore-io 1.5.0", "ethcore-ipc 1.4.0", "ethcore-ipc-codegen 1.4.0", diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 7c65766726b..dd1c796a276 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -34,6 +34,7 @@ ethash = { path = "../ethash" } ethcore-util = { path = "../util" } ethcore-io = { path = "../util/io" } ethcore-devtools = { path = "../devtools" } +ethcore-hash-fetch = { path = "./hash-fetch" } ethjson = { path = "../json" } ethcore-ipc = { path = "../ipc/rpc" } ethstore = { path = "../ethstore" } diff --git a/ethcore/hash-fetch/src/lib.rs b/ethcore/hash-fetch/src/lib.rs index ffb74b260e8..b566121f54e 100644 --- a/ethcore/hash-fetch/src/lib.rs +++ b/ethcore/hash-fetch/src/lib.rs @@ -30,4 +30,4 @@ mod client; pub mod urlhint; -pub use client::{HashFetch, Client}; +pub use client::{HashFetch, Client, Error}; diff --git a/ethcore/src/client/operations.rs b/ethcore/src/client/operations.rs index e0408cdb06e..2124884c7d8 100644 --- a/ethcore/src/client/operations.rs +++ b/ethcore/src/client/operations.rs @@ -9,10 +9,10 @@ use util::{FixedHash, Uint}; pub struct Operations { contract: ethabi::Contract, address: util::Address, - do_call: Box) -> Result, String> + Send + 'static>, + do_call: Box) -> Result, String> + Send + Sync + 'static>, } impl Operations { - pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + 'static { + pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + Sync + 'static { Operations { contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_hard\",\"type\":\"bool\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"release\",\"outputs\":[{\"name\":\"o_forkBlock\",\"type\":\"uint32\"},{\"name\":\"o_track\",\"type\":\"uint8\"},{\"name\":\"o_semver\",\"type\":\"uint24\"},{\"name\":\"o_critical\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"build\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"client\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"fork\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"hard\",\"type\":\"bool\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"clientOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"grandOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"},{\"name\":\"_critical\",\"type\":\"bool\"}],\"name\":\"addRelease\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"}],\"name\":\"checksum\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"}]").expect("JSON is autogenerated; qed")), address: address, diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index c21f47b4a57..11bdc0b5c92 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -14,11 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::sync::Weak; +use std::sync::{Mutex, Weak, Arc}; +use std::path::PathBuf; use util::misc::{VersionInfo, ReleaseTrack, platform}; -use util::{Address, H160, H256, FixedHash}; +use std::str::FromStr; +use util::{Bytes, Address, H160, H256, FixedHash}; use client::operations::Operations; -use client::{Client, UpdatePolicy, BlockId}; +use client::{Client, BlockChainClient, UpdatePolicy, BlockId}; +use fetch::HashFetch; +use fetch; #[derive(Debug, Clone, PartialEq)] pub struct ReleaseInfo { @@ -40,6 +44,7 @@ pub struct Updater { client: Weak, operations: Operations, update_policy: UpdatePolicy, + fetch_handler: Mutex>, // These don't change pub this: VersionInfo, @@ -51,12 +56,38 @@ pub struct Updater { const CLIENT_ID: &'static str = "parity"; +struct FetchHandler { + client: Weak, +} + +impl fetch::urlhint::ContractClient for FetchHandler { + fn registrar(&self) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .additional_params() + .get("registrar") + .and_then(|s| Address::from_str(s).ok()) + .ok_or_else(|| "Registrar not available".into()) + } + + fn call(&self, address: Address, data: Bytes) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .call_contract(address, data) + } +} + +fn start_fetch(client: Weak, hash: H256, on_done: Box) + Send>) -> Result { + let f = fetch::Client::new(Arc::new(FetchHandler { client: client, })); + let r = f.fetch(hash, on_done); + r.map(|_| f) +} + impl Updater { pub fn new(client: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { let mut u = Updater { client: client.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), update_policy: update_policy, + fetch_handler: Mutex::new(None), this: VersionInfo::this(), this_fork: None, latest: None, @@ -140,6 +171,12 @@ impl Updater { }) } + fn fetch_done(&self, _r: Result) { + if let Ok(mut x) = self.fetch_handler.lock() { + *x = None; + } + } + pub fn tick(&mut self) { info!(target: "updater", "Current release is {}", self.this); @@ -157,6 +194,15 @@ impl Updater { "unreleased".into() } ); + if let Some(b) = latest.track.binary { + if let Ok(mut fetch_handler) = self.fetch_handler.lock() { + if fetch_handler.is_none() { + let c = self.client.clone(); + let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_ref().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; + *fetch_handler = start_fetch(self.client.clone(), b, Box::new(f)).ok(); + } + } + } info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match self.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); } } diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 26db147442b..c0ad612d29b 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -103,6 +103,7 @@ extern crate ethcore_bloom_journal as bloom_journal; extern crate byteorder; extern crate transient_hashmap; extern crate linked_hash_map; +extern crate ethcore_hash_fetch as fetch; #[macro_use] extern crate log; From 8e2aca719f1b563241d7d0e33ca31beabf940c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 30 Nov 2016 10:16:18 +0100 Subject: [PATCH 14/87] Shared hash-fetch --- ethcore/hash-fetch/src/client.rs | 9 ++++- ethcore/src/client/client.rs | 14 +++++-- ethcore/src/client/fetch.rs | 49 +++++++++++++++++++++++++ ethcore/src/client/mod.rs | 1 + ethcore/src/client/updater.rs | 63 +++++++++++--------------------- 5 files changed, 88 insertions(+), 48 deletions(-) create mode 100644 ethcore/src/client/fetch.rs diff --git a/ethcore/hash-fetch/src/client.rs b/ethcore/hash-fetch/src/client.rs index f5d19afa503..272c952e09c 100644 --- a/ethcore/hash-fetch/src/client.rs +++ b/ethcore/hash-fetch/src/client.rs @@ -26,7 +26,7 @@ use fetch::{Fetch, FetchError, Client as FetchClient}; use urlhint::{ContractClient, URLHintContract, URLHint, URLHintResult}; /// API for fetching by hash. -pub trait HashFetch { +pub trait HashFetch: Send + Sync + 'static { /// Fetch hash-addressed content. /// Parameters: /// 1. `hash` - content hash @@ -42,7 +42,12 @@ pub enum Error { /// Hash could not be resolved to a valid content address. NoResolution, /// Downloaded content hash does not match. - HashMismatch { expected: H256, got: H256 }, + HashMismatch { + /// Expected hash + expected: H256, + /// Computed hash + got: H256, + }, /// IO Error while validating hash. IO(io::Error), /// Error during fetch. diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 200527222d0..26750624d31 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -72,6 +72,8 @@ use state_db::StateDB; use rand::OsRng; use client::updater::Updater; use client::registry::Registry; +use client::fetch::FetchHandler; +use fetch::{self, HashFetch}; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -154,6 +156,7 @@ pub struct Client { rng: Mutex, on_mode_change: Mutex>>, registrar: Mutex>, + fetch_service: Mutex>>, } impl Client { @@ -226,8 +229,6 @@ impl Client { accountdb: Default::default(), }; - - let client = Arc::new(Client { sleep_state: Mutex::new(SleepState::new(awake)), liveness: AtomicBool::new(awake), @@ -255,18 +256,23 @@ impl Client { rng: Mutex::new(try!(OsRng::new().map_err(::util::UtilError::StdIo))), on_mode_change: Mutex::new(None), registrar: Mutex::new(None), + fetch_service: Mutex::new(None), }); if let Some(reg_addr) = client.additional_params().get("registrar").and_then(|s| Address::from_str(s).ok()) { trace!(target: "client", "Found registrar at {}", reg_addr); let weak = Arc::downgrade(&client); + let fetch = Arc::new(fetch::Client::new(Arc::new(FetchHandler::new(weak.clone())))); let registrar = Registry::new(reg_addr, move |a, d| weak.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))); + // TODO [ToDr] The address might not be available when client is starting (but may be available later). + // Shouldn't this be moved inside the `Updater`? if let Ok(ops_addr) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { - if !ops_addr.is_zero() { + if !ops_addr.is_zero() { trace!(target: "client", "Found operations at {}", ops_addr); - *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), ops_addr, client.config.update_policy.clone())); + *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), Arc::downgrade(&fetch), ops_addr, client.config.update_policy.clone())); } } *client.registrar.lock() = Some(registrar); + *client.fetch_service.lock() = Some(fetch); } Ok(client) } diff --git a/ethcore/src/client/fetch.rs b/ethcore/src/client/fetch.rs new file mode 100644 index 00000000000..a94e22b9960 --- /dev/null +++ b/ethcore/src/client/fetch.rs @@ -0,0 +1,49 @@ +// Copyright 2015, 2016 Ethcore (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +use std::sync::Weak; +use std::str::FromStr; +use util::{Bytes, Address}; + +use client::{Client, BlockChainClient}; +use fetch; + +/// Client wrapper implementing `fetch::urlhint::ContractClient` +pub struct FetchHandler { + client: Weak, +} + +impl FetchHandler { + /// Creates new wrapper + pub fn new(client: Weak) -> Self { + FetchHandler { client: client } + } +} + +impl fetch::urlhint::ContractClient for FetchHandler { + fn registrar(&self) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .additional_params() + .get("registrar") + .and_then(|s| Address::from_str(s).ok()) + .ok_or_else(|| "Registrar not available".into()) + } + + fn call(&self, address: Address, data: Bytes) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .call_contract(address, data) + } +} diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 7759d08ef45..621a4c919cf 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -24,6 +24,7 @@ mod test_client; mod trace; mod client; mod updater; +mod fetch; pub use self::client::*; pub use self::config::{Mode, ClientConfig, UpdatePolicy, UpdateFilter, DatabaseCompactionProfile, BlockChainConfig, VMType}; diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index 11bdc0b5c92..9417df7bfdb 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -14,11 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::sync::{Mutex, Weak, Arc}; +use std::sync::{Weak, Arc}; use std::path::PathBuf; use util::misc::{VersionInfo, ReleaseTrack, platform}; -use std::str::FromStr; -use util::{Bytes, Address, H160, H256, FixedHash}; +use util::{Bytes, Address, H160, H256, FixedHash, Mutex}; use client::operations::Operations; use client::{Client, BlockChainClient, UpdatePolicy, BlockId}; use fetch::HashFetch; @@ -42,9 +41,10 @@ pub struct OperationsInfo { pub struct Updater { client: Weak, + fetch: Weak, operations: Operations, update_policy: UpdatePolicy, - fetch_handler: Mutex>, + fetch_handler: Mutex>, // These don't change pub this: VersionInfo, @@ -56,35 +56,15 @@ pub struct Updater { const CLIENT_ID: &'static str = "parity"; -struct FetchHandler { - client: Weak, -} - -impl fetch::urlhint::ContractClient for FetchHandler { - fn registrar(&self) -> Result { - self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? - .additional_params() - .get("registrar") - .and_then(|s| Address::from_str(s).ok()) - .ok_or_else(|| "Registrar not available".into()) - } - - fn call(&self, address: Address, data: Bytes) -> Result { - self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? - .call_contract(address, data) - } -} - -fn start_fetch(client: Weak, hash: H256, on_done: Box) + Send>) -> Result { - let f = fetch::Client::new(Arc::new(FetchHandler { client: client, })); - let r = f.fetch(hash, on_done); - r.map(|_| f) +fn start_fetch(fetch: Arc, hash: H256, on_done: Box) + Send>) -> Result<(), fetch::Error> { + fetch.fetch(hash, on_done) } impl Updater { - pub fn new(client: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { + pub fn new(client: Weak, fetch: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { let mut u = Updater { client: client.clone(), + fetch: fetch.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), update_policy: update_policy, fetch_handler: Mutex::new(None), @@ -107,12 +87,12 @@ impl Updater { } /// Is the currently running client capable of supporting the current chain? - /// `Some` answer or `None` if information on the running client is not available. + /// `Some` answer or `None` if information on the running client is not available. pub fn is_capable(&self) -> Option { self.latest.as_ref().and_then(|latest| { self.this_fork.map(|this_fork| { let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); - this_fork >= latest.fork || current_number < latest.fork + this_fork >= latest.fork || current_number < latest.fork }) }) } @@ -124,15 +104,15 @@ impl Updater { } /// Actually upgrades the client. Assumes that the binary has been downloaded. - /// @returns `true` on success. + /// @returns `true` on success. pub fn execute_upgrade(&mut self) -> bool { unimplemented!() } - /// Our version info. + /// Our version info. pub fn version_info(&self) -> &VersionInfo { &self.this } - /// Information gathered concerning the release. + /// Information gathered concerning the release. pub fn info(&self) -> &Option { &self.latest } fn collect_release_info(&self, release_id: &H256) -> Result { @@ -172,9 +152,7 @@ impl Updater { } fn fetch_done(&self, _r: Result) { - if let Ok(mut x) = self.fetch_handler.lock() { - *x = None; - } + *self.fetch_handler.lock() = None; } pub fn tick(&mut self) { @@ -186,7 +164,7 @@ impl Updater { if let Some(ref latest) = self.latest { info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", latest.track.version, - if latest.track.is_critical {""} else {"non-"}, + if latest.track.is_critical {""} else {"non-"}, platform(), if let Some(ref b) = latest.track.binary { format!("{}", b) @@ -195,11 +173,12 @@ impl Updater { } ); if let Some(b) = latest.track.binary { - if let Ok(mut fetch_handler) = self.fetch_handler.lock() { - if fetch_handler.is_none() { - let c = self.client.clone(); - let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_ref().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; - *fetch_handler = start_fetch(self.client.clone(), b, Box::new(f)).ok(); + let mut fetch_handler = self.fetch_handler.lock(); + if fetch_handler.is_none() { + let c = self.client.clone(); + let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_ref().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; + if let Some(fetch) = self.fetch.clone().upgrade() { + *fetch_handler = start_fetch(fetch, b, Box::new(f)).ok(); } } } From 356aca2db56da299d993a96455379a91ea28268f Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 4 Dec 2016 09:13:23 -0800 Subject: [PATCH 15/87] Fix build. --- ethcore/src/client/test_client.rs | 4 ++-- ethcore/src/client/traits.rs | 4 ++-- ethcore/src/client/updater.rs | 4 ++-- parity/blockchain.rs | 2 +- parity/configuration.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 44e56f54092..eb4e9547d00 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -385,7 +385,7 @@ impl BlockChainClient for TestBlockChainClient { } } - fn storage_root(&self, _address: &Address, _id: BlockID) -> Option { + fn storage_root(&self, _address: &Address, _id: BlockId) -> Option { None } @@ -424,7 +424,7 @@ impl BlockChainClient for TestBlockChainClient { None } - fn list_storage(&self, _id: BlockID, _account: &Address, _after: Option<&H256>, _count: u64) -> Option> { + fn list_storage(&self, _id: BlockId, _account: &Address, _after: Option<&H256>, _count: u64) -> Option> { None } fn transaction(&self, _id: TransactionId) -> Option { diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 7bffda6bced..a7e8041ef03 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -69,8 +69,8 @@ pub trait BlockChainClient : Sync + Send { fn nonce(&self, address: &Address, id: BlockId) -> Option; /// Attempt to get address storage root at given block. - /// May not fail on BlockID::Latest. - fn storage_root(&self, address: &Address, id: BlockID) -> Option; + /// May not fail on BlockId::Latest. + fn storage_root(&self, address: &Address, id: BlockId) -> Option; /// Get address nonce at the latest block's state. fn latest_nonce(&self, address: &Address) -> U256 { diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index 9417df7bfdb..ada6749f021 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -17,9 +17,9 @@ use std::sync::{Weak, Arc}; use std::path::PathBuf; use util::misc::{VersionInfo, ReleaseTrack, platform}; -use util::{Bytes, Address, H160, H256, FixedHash, Mutex}; +use util::{Address, H160, H256, FixedHash, Mutex}; use client::operations::Operations; -use client::{Client, BlockChainClient, UpdatePolicy, BlockId}; +use client::{Client, UpdatePolicy, BlockId}; use fetch::HashFetch; use fetch; diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 26c6fec52d3..84996b5a59e 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -117,7 +117,7 @@ pub struct ExportState { pub wal: bool, pub fat_db: Switch, pub tracing: Switch, - pub at: BlockID, + pub at: BlockId, pub storage: bool, pub code: bool, pub min_balance: Option, diff --git a/parity/configuration.rs b/parity/configuration.rs index 5d50d26179d..4031c7164d9 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -855,7 +855,7 @@ mod tests { wal: true, tracing: Default::default(), fat_db: Default::default(), - at: BlockID::Latest, + at: BlockId::Latest, storage: true, code: true, min_balance: None, From b8c492644bda74c861d78dce67e0e8adfdb9e599 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 4 Dec 2016 10:47:05 -0800 Subject: [PATCH 16/87] Fix more build. --- parity/cli/mod.rs | 3 +++ parity/configuration.rs | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 340c06e8ac8..2e4996c066f 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -689,6 +689,9 @@ mod tests { mode: Some("dark".into()), mode_timeout: Some(15u64), mode_alarm: Some(10u64), + auto_update: None, + no_download: None, + no_consensus: None, chain: Some("./chain.json".into()), db_path: None, keys_path: None, diff --git a/parity/configuration.rs b/parity/configuration.rs index 4031c7164d9..3dee4054b74 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -725,7 +725,7 @@ mod tests { use super::*; use cli::Args; use ethcore_rpc::NetworkSettings; - use ethcore::client::{VMType, BlockId}; + use ethcore::client::{VMType, BlockId, UpdatePolicy, UpdateFilter}; use ethcore::miner::{MinerOptions, PrioritizationStrategy}; use helpers::{replace_home, default_network_config}; use run::RunCmd; @@ -938,6 +938,7 @@ mod tests { check_seal: true, download_old_blocks: true, require_consensus: true, + update_policy: Default::default(), })); } @@ -972,11 +973,8 @@ mod tests { // then assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::Critical}); - mining_options.tx_queue_strategy = PrioritizationStrategy::GasFactorAndGasPrice; assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::All}); - mining_options.tx_queue_strategy = PrioritizationStrategy::GasPriceOnly; assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::Patch}); - mining_options.tx_queue_strategy = PrioritizationStrategy::GasAndGasPrice; assert!(conf3.update_policy().is_err()); } From 9d79cac36b81456ab7501dcf9faf9d22a00b07ac Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 4 Dec 2016 11:56:12 -0800 Subject: [PATCH 17/87] Cleanups. --- ethcore/src/client/updater.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index ada6749f021..8ce942959bd 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::sync::{Weak, Arc}; +use std::sync::{Weak}; use std::path::PathBuf; use util::misc::{VersionInfo, ReleaseTrack, platform}; use util::{Address, H160, H256, FixedHash, Mutex}; @@ -44,7 +44,7 @@ pub struct Updater { fetch: Weak, operations: Operations, update_policy: UpdatePolicy, - fetch_handler: Mutex>, + fetching: Mutex, // These don't change pub this: VersionInfo, @@ -56,10 +56,6 @@ pub struct Updater { const CLIENT_ID: &'static str = "parity"; -fn start_fetch(fetch: Arc, hash: H256, on_done: Box) + Send>) -> Result<(), fetch::Error> { - fetch.fetch(hash, on_done) -} - impl Updater { pub fn new(client: Weak, fetch: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { let mut u = Updater { @@ -67,7 +63,7 @@ impl Updater { fetch: fetch.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), update_policy: update_policy, - fetch_handler: Mutex::new(None), + fetching: Mutex::new(false), this: VersionInfo::this(), this_fork: None, latest: None, @@ -152,7 +148,11 @@ impl Updater { } fn fetch_done(&self, _r: Result) { - *self.fetch_handler.lock() = None; + match _r { + Ok(b) => info!("Fetched latest version OK: {}", b.display()), + Err(e) => warn!("Unable to fetch latest version: {:?}", e), + } + *self.fetching.lock() = false; } pub fn tick(&mut self) { @@ -173,12 +173,13 @@ impl Updater { } ); if let Some(b) = latest.track.binary { - let mut fetch_handler = self.fetch_handler.lock(); - if fetch_handler.is_none() { + let mut fetching = self.fetching.lock(); + if !*fetching { let c = self.client.clone(); let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_ref().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; if let Some(fetch) = self.fetch.clone().upgrade() { - *fetch_handler = start_fetch(fetch, b, Box::new(f)).ok(); + fetch.fetch(b, Box::new(f)).ok(); + *fetching = true; } } } From 459babb1a8742aeead92086b287fda5710910320 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 5 Dec 2016 06:39:56 -0800 Subject: [PATCH 18/87] Logging. --- ethcore/src/client/updater.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index 8ce942959bd..d4a5b76ee2d 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -175,6 +175,7 @@ impl Updater { if let Some(b) = latest.track.binary { let mut fetching = self.fetching.lock(); if !*fetching { + info!("Attempting to get parity binary {}", b); let c = self.client.clone(); let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_ref().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; if let Some(fetch) = self.fetch.clone().upgrade() { From c2b6be95c8fdf3e5b0e54f3f9eb99466d3e26d71 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 9 Dec 2016 19:02:42 +0100 Subject: [PATCH 19/87] Fetch and place in updates path. --- ethcore/light/src/provider.rs | 14 +++--- ethcore/src/client/client.rs | 6 +-- ethcore/src/client/config.rs | 2 - ethcore/src/client/traits.rs | 6 +-- ethcore/src/client/updater.rs | 89 ++++++++++++++++++++++++++--------- parity/cli/usage.txt | 1 - parity/configuration.rs | 5 +- 7 files changed, 82 insertions(+), 41 deletions(-) diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index 264df0397dc..0feee1cab9a 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -20,7 +20,7 @@ use ethcore::blockchain_info::BlockChainInfo; use ethcore::client::{BlockChainClient, ProvingBlockChainClient}; use ethcore::transaction::SignedTransaction; -use ethcore::ids::BlockID; +use ethcore::ids::BlockId; use util::{Bytes, H256}; @@ -96,7 +96,7 @@ impl Provider for T { let best_num = self.chain_info().best_block_number; let start_num = req.block_num; - match self.block_hash(BlockID::Number(req.block_num)) { + match self.block_hash(BlockId::Number(req.block_num)) { Some(hash) if hash == req.block_hash => {} _=> { trace!(target: "les_provider", "unknown/non-canonical start block in header request: {:?}", (req.block_num, req.block_hash)); @@ -108,7 +108,7 @@ impl Provider for T { .map(|x: u64| x.saturating_mul(req.skip)) .take_while(|x| if req.reverse { x < &start_num } else { best_num - start_num < *x }) .map(|x| if req.reverse { start_num - x } else { start_num + x }) - .map(|x| self.block_header(BlockID::Number(x))) + .map(|x| self.block_header(BlockId::Number(x))) .take_while(|x| x.is_some()) .flat_map(|x| x) .collect() @@ -116,7 +116,7 @@ impl Provider for T { fn block_bodies(&self, req: request::Bodies) -> Vec { req.block_hashes.into_iter() - .map(|hash| self.block_body(BlockID::Hash(hash))) + .map(|hash| self.block_body(BlockId::Hash(hash))) .map(|body| body.unwrap_or_else(|| ::rlp::EMPTY_LIST_RLP.to_vec())) .collect() } @@ -135,8 +135,8 @@ impl Provider for T { for request in req.requests { let proof = match request.key2 { - Some(key2) => self.prove_storage(request.key1, key2, request.from_level, BlockID::Hash(request.block)), - None => self.prove_account(request.key1, request.from_level, BlockID::Hash(request.block)), + Some(key2) => self.prove_storage(request.key1, key2, request.from_level, BlockId::Hash(request.block)), + None => self.prove_account(request.key1, request.from_level, BlockId::Hash(request.block)), }; let mut stream = RlpStream::new_list(proof.len()); @@ -153,7 +153,7 @@ impl Provider for T { fn contract_code(&self, req: request::ContractCodes) -> Vec { req.code_requests.into_iter() .map(|req| { - self.code_by_hash(req.account_key, BlockID::Hash(req.block_hash)) + self.code_by_hash(req.account_key, BlockId::Hash(req.block_hash)) }) .collect() } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index fa47e4729c7..6d65f1cee52 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1445,19 +1445,19 @@ impl MayPanic for Client { } impl ProvingBlockChainClient for Client { - fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockID) -> Vec { + fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockId) -> Vec { self.state_at(id) .and_then(move |state| state.prove_storage(key1, key2, from_level).ok()) .unwrap_or_else(Vec::new) } - fn prove_account(&self, key1: H256, from_level: u32, id: BlockID) -> Vec { + fn prove_account(&self, key1: H256, from_level: u32, id: BlockId) -> Vec { self.state_at(id) .and_then(move |state| state.prove_account(key1, from_level).ok()) .unwrap_or_else(Vec::new) } - fn code_by_hash(&self, account_key: H256, id: BlockID) -> Bytes { + fn code_by_hash(&self, account_key: H256, id: BlockId) -> Bytes { self.state_at(id) .and_then(move |state| state.code_by_address_hash(account_key).ok()) .and_then(|x| x) diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 1b153d888f9..dd2ed2b49ba 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -71,8 +71,6 @@ impl FromStr for DatabaseCompactionProfile { pub enum UpdateFilter { /// All releases following the same track. All, - /// Only those of the same minor version potentially changing tracks. - Patch, /// As with `All`, but only those which are known to be critical. Critical, /// None. diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 50282895f96..6ea2f3bf5c4 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -285,15 +285,15 @@ pub trait ProvingBlockChainClient: BlockChainClient { /// Returns a vector of raw trie nodes (in order from the root) proving the storage query. /// Nodes after `from_level` may be omitted. /// An empty vector indicates unservable query. - fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockID) -> Vec; + fn prove_storage(&self, key1: H256, key2: H256, from_level: u32, id: BlockId) -> Vec; /// Prove account existence at a specific block id. /// The key is the keccak hash of the account's address. /// Returns a vector of raw trie nodes (in order from the root) proving the query. /// Nodes after `from_level` may be omitted. /// An empty vector indicates unservable query. - fn prove_account(&self, key1: H256, from_level: u32, id: BlockID) -> Vec; + fn prove_account(&self, key1: H256, from_level: u32, id: BlockId) -> Vec; /// Get code by address hash. - fn code_by_hash(&self, account_key: H256, id: BlockID) -> Bytes; + fn code_by_hash(&self, account_key: H256, id: BlockId) -> Bytes; } \ No newline at end of file diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index d4a5b76ee2d..fdbc9463ac3 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -15,11 +15,12 @@ // along with Parity. If not, see . use std::sync::{Weak}; +use std::{fs, env}; use std::path::PathBuf; -use util::misc::{VersionInfo, ReleaseTrack, platform}; +use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; use util::{Address, H160, H256, FixedHash, Mutex}; use client::operations::Operations; -use client::{Client, UpdatePolicy, BlockId}; +use client::{Client, UpdatePolicy, UpdateFilter, BlockId}; use fetch::HashFetch; use fetch; @@ -44,7 +45,7 @@ pub struct Updater { fetch: Weak, operations: Operations, update_policy: UpdatePolicy, - fetching: Mutex, + fetching: Mutex>, // These don't change pub this: VersionInfo, @@ -52,10 +53,16 @@ pub struct Updater { // This does change pub latest: Option, + pub ready: Option, + } const CLIENT_ID: &'static str = "parity"; +fn platform() -> String { + "test".to_owned() +} + impl Updater { pub fn new(client: Weak, fetch: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { let mut u = Updater { @@ -63,10 +70,11 @@ impl Updater { fetch: fetch.clone(), operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), update_policy: update_policy, - fetching: Mutex::new(false), + fetching: Mutex::new(None), this: VersionInfo::this(), this_fork: None, latest: None, + ready: None, }; u.this_fork = u.operations.release(CLIENT_ID, &u.this.hash.into()).ok() @@ -95,16 +103,26 @@ impl Updater { /// The release which is ready to be upgraded to, if any. If this returns `Some`, then /// `execute_upgrade` may be called. - pub fn upgrade_ready(&self) -> Option { - unimplemented!() + pub fn upgrade_ready(&self) -> Option { + self.ready.clone() } /// Actually upgrades the client. Assumes that the binary has been downloaded. /// @returns `true` on success. pub fn execute_upgrade(&mut self) -> bool { + // TODO: link ~/.parity-updates/parity to self.ready + // TODO: restart parity. unimplemented!() } + /// Returns true iff the current version is capable of forming consensus. + pub fn consensus_capable(&self) -> bool { +/* if let Some(ref latest) = self.latest { + + +*/ unimplemented!() + } + /// Our version info. pub fn version_info(&self) -> &VersionInfo { &self.this } @@ -147,12 +165,37 @@ impl Updater { }) } - fn fetch_done(&self, _r: Result) { + fn fetch_done(&mut self, _r: Result) { + let fetched = self.fetching.lock().take().unwrap(); match _r { - Ok(b) => info!("Fetched latest version OK: {}", b.display()), - Err(e) => warn!("Unable to fetch latest version: {:?}", e), + Ok(b) => { + info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); + let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); + dest.push(".parity-updates"); + match fs::create_dir_all(&dest) { + Ok(_) => { + dest.push(format!("parity-{}-{:?}", fetched.version, fetched.version.hash)); + match fs::copy(&b, &dest) { + Ok(_) => { + info!("Copied file to {}", dest.display()); + let auto = match self.update_policy.filter { + UpdateFilter::All => true, + UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, + _ => false, + }; + self.ready = Some(fetched); + if auto { + self.execute_upgrade(); + } + }, + Err(e) => warn!("Unable to copy update: {:?}", e), + } + }, + Err(e) => warn!("Unable to create updates path: {:?}", e), + } + }, + Err(e) => warn!("Unable to fetch update ({}): {:?}", fetched.version, e), } - *self.fetching.lock() = false; } pub fn tick(&mut self) { @@ -168,19 +211,21 @@ impl Updater { platform(), if let Some(ref b) = latest.track.binary { format!("{}", b) - } else { - "unreleased".into() - } + } else { + "unreleased".into() + } ); - if let Some(b) = latest.track.binary { - let mut fetching = self.fetching.lock(); - if !*fetching { - info!("Attempting to get parity binary {}", b); - let c = self.client.clone(); - let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_ref().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; - if let Some(fetch) = self.fetch.clone().upgrade() { - fetch.fetch(b, Box::new(f)).ok(); - *fetching = true; + if self.update_policy.enable_downloading && latest.track.version.hash != self.version_info().hash && self.ready.as_ref().map_or(true, |t| *t != latest.track) { + if let Some(b) = latest.track.binary { + let mut fetching = self.fetching.lock(); + if fetching.is_none() { + info!("Attempting to get parity binary {}", b); + let c = self.client.clone(); + let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_mut().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; + if let Some(fetch) = self.fetch.clone().upgrade() { + fetch.fetch(b, Box::new(f)).ok(); + *fetching = Some(latest.track.clone()); + } } } } diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index 814ccbcfb41..3178cb30f8a 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -33,7 +33,6 @@ Operating Options: --auto-update TRACK Set a release track to automatically update and install. all - All updates in the current release track. - patch - All updates of the current minor version. critical - Only consensus/security updates. none - No updates will be auto-installed. (default: {flag_auto_update}). diff --git a/parity/configuration.rs b/parity/configuration.rs index 61b902ce6d0..0ee3f8a44b8 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -624,7 +624,6 @@ impl Configuration { filter: match self.args.flag_auto_update.as_ref() { "none" => UpdateFilter::None, "critical" => UpdateFilter::Critical, - "patch" => UpdateFilter::Patch, "all" => UpdateFilter::All, _ => return Err("Invalid value for `--auto-update`. See `--help` for more information.".into()), }, @@ -985,13 +984,13 @@ mod tests { // when let conf0 = parse(&["parity"]); let conf1 = parse(&["parity", "--auto-update", "all"]); - let conf2 = parse(&["parity", "--no-download", "--auto-update=patch"]); + let conf2 = parse(&["parity", "--no-download", "--auto-update=all"]); let conf3 = parse(&["parity", "--auto-update=xxx"]); // then assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::Critical}); assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::All}); - assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::Patch}); + assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::All}); assert!(conf3.update_policy().is_err()); } From e5e6b77984daf761b8049f44ebae936c250105a3 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 9 Dec 2016 20:40:24 +0100 Subject: [PATCH 20/87] Cleanups and avoid redownloading. --- ethcore/src/client/client.rs | 3 + ethcore/src/client/updater.rs | 117 ++++++++++++++++++++++------------ 2 files changed, 81 insertions(+), 39 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 6d65f1cee52..f068b8d99bf 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -678,6 +678,9 @@ impl Client { self.check_snooze(); if let Some(ref mut updater) = *self.updater.lock() { updater.tick(); + if updater.installed.is_some() { + info!("Client should restart now."); + } } } diff --git a/ethcore/src/client/updater.rs b/ethcore/src/client/updater.rs index fdbc9463ac3..75768132c8c 100644 --- a/ethcore/src/client/updater.rs +++ b/ethcore/src/client/updater.rs @@ -15,8 +15,8 @@ // along with Parity. If not, see . use std::sync::{Weak}; -use std::{fs, env}; -use std::path::PathBuf; +use std::{io, os, fs, env}; +use std::path::{Path, PathBuf}; use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; use util::{Address, H160, H256, FixedHash, Mutex}; use client::operations::Operations; @@ -54,7 +54,8 @@ pub struct Updater { // This does change pub latest: Option, pub ready: Option, - + // If Some, client should restart itself. + pub installed: Option, } const CLIENT_ID: &'static str = "parity"; @@ -75,6 +76,7 @@ impl Updater { this_fork: None, latest: None, ready: None, + installed: None, }; u.this_fork = u.operations.release(CLIENT_ID, &u.this.hash.into()).ok() @@ -107,12 +109,40 @@ impl Updater { self.ready.clone() } + #[cfg(windows)] + fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + os::windows::fs::symlink_file(src, dst) + } + + #[cfg(not(windows))] + fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + os::unix::fs::symlink(src, dst) + } + /// Actually upgrades the client. Assumes that the binary has been downloaded. /// @returns `true` on success. pub fn execute_upgrade(&mut self) -> bool { - // TODO: link ~/.parity-updates/parity to self.ready - // TODO: restart parity. - unimplemented!() + (|| -> Result { + if let Some(r) = self.ready.take() { + let p = Self::update_file_path(&r.version); + let n = Self::updates_latest(); + let _ = fs::remove_file(&n); + match Self::symlink(p, n) { + Ok(_) => { + info!("Completed upgrade to {}", &r.version); + self.installed = Some(r); + Ok(true) + } + Err(e) => { + self.ready = Some(r); + Err(format!("Unable to create soft-link for update {:?}", e)) + } + } + } else { + warn!("Execute upgrade called when no upgrade ready."); + Ok(false) + } + })().unwrap_or_else(|e| { warn!("{}", e); false }) } /// Returns true iff the current version is capable of forming consensus. @@ -165,37 +195,40 @@ impl Updater { }) } - fn fetch_done(&mut self, _r: Result) { - let fetched = self.fetching.lock().take().unwrap(); - match _r { - Ok(b) => { - info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); - let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); - dest.push(".parity-updates"); - match fs::create_dir_all(&dest) { - Ok(_) => { - dest.push(format!("parity-{}-{:?}", fetched.version, fetched.version.hash)); - match fs::copy(&b, &dest) { - Ok(_) => { - info!("Copied file to {}", dest.display()); - let auto = match self.update_policy.filter { - UpdateFilter::All => true, - UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, - _ => false, - }; - self.ready = Some(fetched); - if auto { - self.execute_upgrade(); - } - }, - Err(e) => warn!("Unable to copy update: {:?}", e), - } - }, - Err(e) => warn!("Unable to create updates path: {:?}", e), - } - }, - Err(e) => warn!("Unable to fetch update ({}): {:?}", fetched.version, e), - } + fn update_file_path(v: &VersionInfo) -> PathBuf { + let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); + dest.push(".parity-updates"); + dest.push(format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash)); + dest + } + + fn updates_latest() -> PathBuf { + let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); + dest.push(".parity-updates"); + dest.push("parity"); + dest + } + + fn fetch_done(&mut self, result: Result) { + (|| -> Result<(), String> { + let fetched = self.fetching.lock().take().unwrap(); + let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; + info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); + let dest = Self::update_file_path(&fetched.version); + fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; + fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; + info!("Copied file to {}", dest.display()); + let auto = match self.update_policy.filter { + UpdateFilter::All => true, + UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, + _ => false, + }; + self.ready = Some(fetched); + if auto { + self.execute_upgrade(); + } + Ok(()) + })().unwrap_or_else(|e| warn!("{}", e)); } pub fn tick(&mut self) { @@ -215,13 +248,19 @@ impl Updater { "unreleased".into() } ); - if self.update_policy.enable_downloading && latest.track.version.hash != self.version_info().hash && self.ready.as_ref().map_or(true, |t| *t != latest.track) { + if self.update_policy.enable_downloading && latest.track.version.hash != self.version_info().hash && self.installed.as_ref().or(self.ready.as_ref()).map_or(true, |t| *t != latest.track) { if let Some(b) = latest.track.binary { let mut fetching = self.fetching.lock(); if fetching.is_none() { info!("Attempting to get parity binary {}", b); let c = self.client.clone(); - let f = move |r: Result| if let Some(c) = c.upgrade() { c.updater().as_mut().expect("updater exists; updater only owned by client; qed").fetch_done(r); }; + let f = move |r: Result| { + if let Some(client) = c.upgrade() { + if let Some(updater) = client.updater().as_mut() { + updater.fetch_done(r); + } + } + }; if let Some(fetch) = self.fetch.clone().upgrade() { fetch.fetch(b, Box::new(f)).ok(); *fetching = Some(latest.track.clone()); From c82754874cd69a8038c97ecef5e4b71d40844f9d Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 9 Dec 2016 20:48:52 +0100 Subject: [PATCH 21/87] Fix typo. --- 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 b6ebf57b223..ad541391d6b 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -585,7 +585,7 @@ impl Miner { let best_block_header: Header = ::rlp::decode(&chain.best_block_header()); transactions.into_iter() .map(|tx| { - if chain.transaction_block(TransactionID::Hash(tx.hash())).is_some() { + if chain.transaction_block(TransactionId::Hash(tx.hash())).is_some() { debug!(target: "miner", "Rejected tx {:?}: already in the blockchain", tx.hash()); return Err(Error::Transaction(TransactionError::AlreadyImported)); } From fa30dfd4b9c2030fae2a6eafc31f760bc68e5d10 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 10 Dec 2016 23:58:39 +0100 Subject: [PATCH 22/87] Refactor into system service, add exe redirect. --- ethcore/hash-fetch/src/client.rs | 6 +- ethcore/src/client/client.rs | 75 +++--- ethcore/src/client/config.rs | 31 --- ethcore/src/client/fetch.rs | 49 ---- ethcore/src/client/mod.rs | 5 +- ethcore/src/client/registry.rs | 2 +- ethcore/src/client/test_client.rs | 6 + ethcore/src/client/traits.rs | 9 + parity/blockchain.rs | 9 +- parity/cli/usage.txt | 2 + parity/helpers.rs | 2 - parity/informant.rs | 11 + parity/io_handler.rs | 64 ----- parity/main.rs | 159 ++++++++---- {ethcore/src/client => parity}/operations.rs | 0 parity/run.rs | 81 +++--- {ethcore/src/client => parity}/updater.rs | 249 +++++++++++++------ util/src/log.rs | 5 +- 18 files changed, 387 insertions(+), 378 deletions(-) delete mode 100644 ethcore/src/client/fetch.rs delete mode 100644 parity/io_handler.rs rename {ethcore/src/client => parity}/operations.rs (100%) rename {ethcore/src/client => parity}/updater.rs (50%) diff --git a/ethcore/hash-fetch/src/client.rs b/ethcore/hash-fetch/src/client.rs index 272c952e09c..20bde788d38 100644 --- a/ethcore/hash-fetch/src/client.rs +++ b/ethcore/hash-fetch/src/client.rs @@ -84,7 +84,7 @@ impl Client { impl HashFetch for Client { fn fetch(&self, hash: H256, on_done: Box) + Send>) -> Result<(), Error> { - debug!(target: "dapps", "Fetching: {:?}", hash); + debug!(target: "fetch", "Fetching: {:?}", hash); let url = try!( self.contract.resolve(hash.to_vec()).map(|content| match content { @@ -97,7 +97,7 @@ impl HashFetch for Client { }).ok_or_else(|| Error::NoResolution) ); - debug!(target: "dapps", "Resolved {:?} to {:?}. Fetching...", hash, url); + debug!(target: "fetch", "Resolved {:?} to {:?}. Fetching...", hash, url); self.fetch.lock().request_async(&url, Default::default(), Box::new(move |result| { fn validate_hash(hash: H256, result: Result) -> Result { @@ -112,7 +112,7 @@ impl HashFetch for Client { } } - debug!(target: "dapps", "Content fetched, validating hash ({:?})", hash); + debug!(target: "fetch", "Content fetched, validating hash ({:?})", hash); on_done(validate_hash(hash, result)) })).map_err(Into::into) } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 8e9b2beb863..0928193004d 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -70,10 +70,7 @@ use factory::Factories; use rlp::{decode, View, UntrustedRlp}; use state_db::StateDB; use rand::OsRng; -use client::updater::Updater; use client::registry::Registry; -use client::fetch::FetchHandler; -use fetch::{self, HashFetch}; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -144,7 +141,6 @@ pub struct Client { panic_handler: Arc, verifier: Box, miner: Arc, - updater: Mutex>, sleep_state: Mutex, liveness: AtomicBool, io_channel: Mutex>, @@ -156,7 +152,6 @@ pub struct Client { rng: Mutex, on_mode_change: Mutex>>, registrar: Mutex>, - fetch_service: Mutex>>, } impl Client { @@ -247,7 +242,6 @@ impl Client { import_lock: Mutex::new(()), panic_handler: panic_handler, miner: miner, - updater: Mutex::new(None), io_channel: Mutex::new(message_channel), notify: RwLock::new(Vec::new()), queue_transactions: AtomicUsize::new(0), @@ -257,23 +251,12 @@ impl Client { rng: Mutex::new(try!(OsRng::new().map_err(::util::UtilError::StdIo))), on_mode_change: Mutex::new(None), registrar: Mutex::new(None), - fetch_service: Mutex::new(None), }); if let Some(reg_addr) = client.additional_params().get("registrar").and_then(|s| Address::from_str(s).ok()) { trace!(target: "client", "Found registrar at {}", reg_addr); let weak = Arc::downgrade(&client); - let fetch = Arc::new(fetch::Client::new(Arc::new(FetchHandler::new(weak.clone())))); let registrar = Registry::new(reg_addr, move |a, d| weak.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))); - // TODO [ToDr] The address might not be available when client is starting (but may be available later). - // Shouldn't this be moved inside the `Updater`? - if let Ok(ops_addr) = registrar.get_address(&(&b"operations"[..]).sha3(), "A") { - if !ops_addr.is_zero() { - trace!(target: "client", "Found operations at {}", ops_addr); - *client.updater.lock() = Some(Updater::new(Arc::downgrade(&client), Arc::downgrade(&fetch), ops_addr, client.config.update_policy.clone())); - } - } *client.registrar.lock() = Some(registrar); - *client.fetch_service.lock() = Some(fetch); } Ok(client) } @@ -686,12 +669,6 @@ impl Client { pub fn tick(&self) { self.check_garbage(); self.check_snooze(); - if let Some(ref mut updater) = *self.updater.lock() { - updater.tick(); - if updater.installed.is_some() { - info!("Client should restart now."); - } - } } fn check_garbage(&self) { @@ -734,30 +711,6 @@ impl Client { } } - /// Like `call`, but with various defaults. Designed to be used for calling contracts. - pub fn call_contract(&self, address: Address, data: Bytes) -> Result { - let from = Address::default(); - let transaction = Transaction { - nonce: self.latest_nonce(&from), - action: Action::Call(address), - gas: U256::from(50_000_000), - gas_price: U256::default(), - value: U256::default(), - data: data, - }.fake_sign(from); - - self.call(&transaction, BlockId::Latest, Default::default()) - .map_err(|e| format!("{:?}", e)) - .map(|executed| { - executed.output - }) - } - - /// Get the updater object. - pub fn updater(&self) -> MutexGuard> { - self.updater.lock() - } - /// Look up the block number for the given block ID. pub fn block_number(&self, id: BlockId) -> Option { match id { @@ -1377,6 +1330,34 @@ impl BlockChainClient for Client { earliest_state: self.state_db.lock().journal_db().earliest_era().unwrap_or(0), } } + + fn call_contract(&self, address: Address, data: Bytes) -> Result { + let from = Address::default(); + let transaction = Transaction { + nonce: self.latest_nonce(&from), + action: Action::Call(address), + gas: U256::from(50_000_000), + gas_price: U256::default(), + value: U256::default(), + data: data, + }.fake_sign(from); + + self.call(&transaction, BlockId::Latest, Default::default()) + .map_err(|e| format!("{:?}", e)) + .map(|executed| { + executed.output + }) + } + + fn registrar_address(&self) -> Option
{ + self.registrar.lock().as_ref().map(|r| r.address.clone()) + } + + fn registry_address(&self, name: String) -> Option
{ + self.registrar.lock().as_ref() + .and_then(|r| r.get_address(&(name.as_bytes().sha3()), "A").ok()) + .and_then(|a| if a.is_zero() { None } else { Some(a) }) + } } impl MiningBlockChainClient for Client { diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index dd2ed2b49ba..045b8ee05ca 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -66,35 +66,6 @@ impl FromStr for DatabaseCompactionProfile { } } -/// Filter for releases. -#[derive(Debug, Eq, PartialEq, Clone)] -pub enum UpdateFilter { - /// All releases following the same track. - All, - /// As with `All`, but only those which are known to be critical. - Critical, - /// None. - None, -} - -/// The policy for auto-updating. -#[derive(Debug, Eq, PartialEq, Clone)] -pub struct UpdatePolicy { - /// Download potential updates. - pub enable_downloading: bool, - /// Which of those downloaded should be automatically installed. - pub filter: UpdateFilter, -} - -impl Default for UpdatePolicy { - fn default() -> Self { - UpdatePolicy { - enable_downloading: false, - filter: UpdateFilter::None, - } - } -} - /// Operating mode for the client. #[derive(Debug, Eq, PartialEq, Clone)] pub enum Mode { @@ -130,8 +101,6 @@ impl Display for Mode { /// Client configuration. Includes configs for all sub-systems. #[derive(Debug, PartialEq, Default)] pub struct ClientConfig { - /// Updater policy. - pub update_policy: UpdatePolicy, /// Block queue configuration. pub queue: QueueConfig, /// Blockchain configuration. diff --git a/ethcore/src/client/fetch.rs b/ethcore/src/client/fetch.rs deleted file mode 100644 index a94e22b9960..00000000000 --- a/ethcore/src/client/fetch.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -use std::sync::Weak; -use std::str::FromStr; -use util::{Bytes, Address}; - -use client::{Client, BlockChainClient}; -use fetch; - -/// Client wrapper implementing `fetch::urlhint::ContractClient` -pub struct FetchHandler { - client: Weak, -} - -impl FetchHandler { - /// Creates new wrapper - pub fn new(client: Weak) -> Self { - FetchHandler { client: client } - } -} - -impl fetch::urlhint::ContractClient for FetchHandler { - fn registrar(&self) -> Result { - self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? - .additional_params() - .get("registrar") - .and_then(|s| Address::from_str(s).ok()) - .ok_or_else(|| "Registrar not available".into()) - } - - fn call(&self, address: Address, data: Bytes) -> Result { - self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? - .call_contract(address, data) - } -} diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 73b28604267..8d516d846b1 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -16,18 +16,15 @@ //! Blockchain database client. -mod operations; mod registry; mod config; mod error; mod test_client; mod trace; mod client; -mod updater; -mod fetch; pub use self::client::*; -pub use self::config::{Mode, ClientConfig, UpdatePolicy, UpdateFilter, DatabaseCompactionProfile, BlockChainConfig, VMType}; +pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::ChainNotify; diff --git a/ethcore/src/client/registry.rs b/ethcore/src/client/registry.rs index f65661d8890..7693feaeb5d 100644 --- a/ethcore/src/client/registry.rs +++ b/ethcore/src/client/registry.rs @@ -9,7 +9,7 @@ use util::Uint; pub struct Registry { contract: ethabi::Contract, - address: util::Address, + pub address: util::Address, do_call: Box) -> Result, String> + Send + 'static>, } impl Registry { diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 2e08b22bf9b..d2646b105a7 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -679,4 +679,10 @@ impl BlockChainClient for TestBlockChainClient { earliest_state: 1, } } + + fn call_contract(&self, _address: Address, _data: Bytes) -> Result { Ok(vec![]) } + + fn registrar_address(&self) -> Option
{ None } + + fn registry_address(&self, _name: String) -> Option
{ None } } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index a699c6ea2aa..a6956461e55 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -257,6 +257,15 @@ pub trait BlockChainClient : Sync + Send { /// Returns information about pruning/data availability. fn pruning_info(&self) -> PruningInfo; + + /// Like `call`, but with various defaults. Designed to be used for calling contracts. + fn call_contract(&self, address: Address, data: Bytes) -> Result; + + /// Get the address of the registry itself. + fn registrar_address(&self) -> Option
; + + /// Get the address of a particular blockchain service, if available. + fn registry_address(&self, name: String) -> Option
; } impl IpcConfig for BlockChainClient { } diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 77a14daad5e..d62f2b9bbad 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -32,7 +32,6 @@ use ethcore::verification::queue::VerifierSettings; use cache::CacheConfig; use informant::{Informant, MillisecondDuration}; use params::{SpecType, Pruning, Switch, tracing_switch_to_bool, fatdb_switch_to_bool}; -use io_handler::ImportIoHandler; use helpers::{to_client_config, execute_upgrades}; use dir::Directories; use user_defaults::UserDefaults; @@ -231,11 +230,8 @@ fn execute_import(cmd: ImportBlockchain) -> Result { } }; - let informant = Informant::new(client.clone(), None, None, None, cmd.with_color); - - try!(service.register_io_handler(Arc::new(ImportIoHandler { - info: Arc::new(informant), - })).map_err(|_| "Unable to register informant handler".to_owned())); + let informant = Arc::new(Informant::new(client.clone(), None, None, None, cmd.with_color)); + service.register_io_handler(informant).map_err(|_| "Unable to register informant handler".to_owned())?; let do_import = |bytes| { while client.queue_info().is_full() { sleep(Duration::from_secs(1)); } @@ -251,7 +247,6 @@ fn execute_import(cmd: ImportBlockchain) -> Result { Ok(()) }; - match format { DataFormat::Binary => { loop { diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index fae9ad3e826..797a5443e40 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -42,6 +42,8 @@ Operating Options: --no-consensus Force the binary to run even if there are known issues regarding consensus. Not recommended. (default: {flag_no_consensus}). + --force-direct Run the originally installed version of Parity, + ignoring any updates that have since been installed. --chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, diff --git a/parity/helpers.rs b/parity/helpers.rs index 8de7da9f4c3..25acfcc556a 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -209,7 +209,6 @@ pub fn default_network_config() -> ::ethsync::NetworkConfiguration { #[cfg_attr(feature = "dev", allow(too_many_arguments))] pub fn to_client_config( cache_config: &CacheConfig, - update_policy: UpdatePolicy, mode: Mode, tracing: bool, fat_db: bool, @@ -243,7 +242,6 @@ pub fn to_client_config( // in bytes client_config.jump_table_size = cache_config.jump_tables() as usize * mb; - client_config.update_policy = update_policy; client_config.mode = mode; client_config.tracing.enabled = tracing; client_config.fat_db = fat_db; diff --git a/parity/informant.rs b/parity/informant.rs index 1caeb1b7c77..1f3f3862a40 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -222,3 +222,14 @@ impl ChainNotify for Informant { } } +impl IoHandler for Informant { + fn initialize(&self, io: &IoContext) { + io.register_timer(INFO_TIMER, 5000).expect("Error registering timer"); + } + + fn timeout(&self, _io: &IoContext, timer: TimerToken) { + if timer == INFO_TIMER && !self.shutdown.load(Ordering::SeqCst) { + self.info.tick(); + } + } +} diff --git a/parity/io_handler.rs b/parity/io_handler.rs deleted file mode 100644 index 0f1704049b5..00000000000 --- a/parity/io_handler.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -use std::sync::Arc; -use std::sync::atomic::{AtomicBool, Ordering}; -use ethcore::client::Client; -use ethcore::service::ClientIoMessage; -use ethsync::{SyncProvider, ManageNetwork}; -use ethcore::account_provider::AccountProvider; -use io::{TimerToken, IoHandler, IoContext}; - -use informant::Informant; - -const INFO_TIMER: TimerToken = 0; - -pub struct ClientIoHandler { - pub client: Arc, - pub sync: Arc, - pub net: Arc, - pub accounts: Arc, - pub info: Arc, - pub shutdown: Arc -} - -impl IoHandler for ClientIoHandler { - fn initialize(&self, io: &IoContext) { - io.register_timer(INFO_TIMER, 5000).expect("Error registering timer"); - } - - fn timeout(&self, _io: &IoContext, timer: TimerToken) { - if timer == INFO_TIMER && !self.shutdown.load(Ordering::SeqCst) { - self.info.tick(); - } - } -} - -pub struct ImportIoHandler { - pub info: Arc, -} - -impl IoHandler for ImportIoHandler { - fn initialize(&self, io: &IoContext) { - io.register_timer(INFO_TIMER, 5000).expect("Error registering timer"); - } - - fn timeout(&self, _io: &IoContext, timer: TimerToken) { - if let INFO_TIMER = timer { - self.info.tick() - } - } -} diff --git a/parity/main.rs b/parity/main.rs index 17f5ed74bae..cf5ba7391bf 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -109,13 +109,18 @@ mod sync; #[cfg(feature="ipc")] mod boot; mod user_defaults; +mod updater; +mod operations; +mod fetch; #[cfg(feature="stratum")] mod stratum; use std::{process, env}; +use std::collections::HashMap; use std::io::{self as stdio, BufReader, Write}; use std::fs::File; +use std::path::PathBuf; use util::sha3::sha3; use cli::Args; use configuration::{Cmd, Execute, Configuration}; @@ -132,25 +137,31 @@ fn print_hash_of(maybe_file: Option) -> Result { } } -fn execute(command: Execute) -> Result { +enum PostExecutionAction { + Print(String), + Restart, + Quit, +} + +fn execute(command: Execute) -> Result { let logger = setup_log(&command.logger).expect("Logger is initialized only once; qed"); match command.cmd { Cmd::Run(run_cmd) => { - try!(run::execute(run_cmd, logger)); - Ok("".into()) + let restart = run::execute(run_cmd, logger)?; + Ok(if restart { PostExecutionAction::Restart } else { PostExecutionAction::Quit }) }, - Cmd::Version => Ok(Args::print_version()), - Cmd::Hash(maybe_file) => print_hash_of(maybe_file), - Cmd::Account(account_cmd) => account::execute(account_cmd), - Cmd::ImportPresaleWallet(presale_cmd) => presale::execute(presale_cmd), - Cmd::Blockchain(blockchain_cmd) => blockchain::execute(blockchain_cmd), - Cmd::SignerToken(signer_cmd) => signer::execute(signer_cmd), - Cmd::Snapshot(snapshot_cmd) => snapshot::execute(snapshot_cmd), + Cmd::Version => Ok(PostExecutionAction::Print(Args::print_version())), + Cmd::Hash(maybe_file) => print_hash_of(maybe_file).map(|s| PostExecutionAction::Print(s)), + Cmd::Account(account_cmd) => account::execute(account_cmd).map(|s| PostExecutionAction::Print(s)), + Cmd::ImportPresaleWallet(presale_cmd) => presale::execute(presale_cmd).map(|s| PostExecutionAction::Print(s)), + Cmd::Blockchain(blockchain_cmd) => blockchain::execute(blockchain_cmd).map(|s| PostExecutionAction::Print(s)), + Cmd::SignerToken(signer_cmd) => signer::execute(signer_cmd).map(|s| PostExecutionAction::Print(s)), + Cmd::Snapshot(snapshot_cmd) => snapshot::execute(snapshot_cmd).map(|s| PostExecutionAction::Print(s)), } } -fn start() -> Result { +fn start() -> Result { let args: Vec = env::args().collect(); let conf = Configuration::parse(&args).unwrap_or_else(|e| e.exit()); @@ -163,58 +174,108 @@ fn start() -> Result { execute(cmd) } +#[cfg(not(feature="stratum"))] +fn stratum_main(_: &mut HashMap) {} + #[cfg(feature="stratum")] -mod stratum_optional { - pub fn probably_run() -> bool { - // just redirect to the stratum::main() - if ::std::env::args().nth(1).map_or(false, |arg| arg == "stratum") { - super::stratum::main(); - true - } - else { false } - } +fn stratum_main(alt_mains: &mut HashMap) { + alt_mains.insert("stratum".to_owned(), stratum::main); } -#[cfg(not(feature="stratum"))] -mod stratum_optional { - pub fn probably_run() -> bool { - false - } +#[cfg(not(feature="ipc"))] +fn sync_main(_: &mut HashMap) {} + +#[cfg(feature="ipc")] +fn sync_main(alt_mains: &mut HashMap) { + alt_mains.insert("sync".to_owned(), sync::main); } -#[cfg(not(feature="ipc"))] -fn sync_main() -> bool { - false +// TODO: merge with version in Updater. +fn updates_latest() -> PathBuf { + let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); + dest.push(".parity-updates"); + dest.push("parity"); + dest } -#[cfg(feature="ipc")] -fn sync_main() -> bool { - // just redirect to the sync::main() - if std::env::args().nth(1).map_or(false, |arg| arg == "sync") { - sync::main(); - true +// Starts ~/.parity-updates/parity and returns the code it exits with. +fn run_parity() -> Option { + let exe = updates_latest(); + process::Command::new(exe) + .args(&env::args_os().collect::>()) + .status() + .map(|es| es.code().unwrap_or(128)) + .ok() +} + +const PLEASE_RESTART_EXIT_CODE: i32 = 69; + +// Run our version of parity. +// Returns the exit error code. +fn main_direct() -> i32 { + let mut alt_mains = HashMap::new(); + sync_main(&mut alt_mains); + stratum_main(&mut alt_mains); + if let Some(f) = std::env::args().nth(1).and_then(|arg| alt_mains.get(&arg.to_string())) { + f(); + 0 } else { - false + match start() { + Ok(result) => match result { + PostExecutionAction::Print(s) => { info!("{}", s); 0 }, + PostExecutionAction::Restart => PLEASE_RESTART_EXIT_CODE, + PostExecutionAction::Quit => 0, + }, + Err(err) => { + writeln!(&mut stdio::stderr(), "{}", err).expect("StdErr available; qed"); + 1 + }, + } } } -fn main() { - // Always print backtrace on panic. - ::std::env::set_var("RUST_BACKTRACE", "1"); - - if sync_main() { - return; +fn println_trace_main(s: String) { + if env::var("RUST_LOG").ok().and_then(|s| s.find("main=trace")).is_some() { + println!("{}", s); } +} - if stratum_optional::probably_run() { return; } +#[macro_export] +macro_rules! trace_main { + ($arg:expr) => (println_trace_main($arg.into())); + ($($arg:tt)*) => (println_trace_main(format!("{}", format_args!($($arg)*)))); +} - match start() { - Ok(result) => { - info!("{}", result); - }, - Err(err) => { - writeln!(&mut stdio::stderr(), "{}", err).expect("StdErr available; qed"); - process::exit(1); +fn main() { + // Always print backtrace on panic. + env::set_var("RUST_BACKTRACE", "1"); + + // assuming the user is not running with `--force-direct`, then: + // if argv[0] == "parity" and this executable != ~/.parity-updates/parity, run that instead. + let force_direct = std::env::args().any(|arg| arg == "--force-direct"); + let exe = std::env::current_exe().ok(); + let development = exe.and_then(|p| p.parent().and_then(|p| p.parent()).and_then(|p| p.file_name()).map(|n| n == "target")).unwrap_or(false); + let same_name = exe.and_then(|p| p.file_stem().map_or(false, |s| s == "parity")); + let have_update = updates_latest().exists(); + let is_non_updated_current = exe.map_or(false, p.canonicalize() != updates_latest().canonicalize()); + trace_main!("Starting up {} (force-direct: {}, development: {}, have-update: {}, non-updated-current: {})", std::env::current_exe().map(|x| format!("{}", x.display())).unwrap_or("".to_owned()), force_direct, development, have_update, is_non_updated_current); + if !force_direct && ! development && have_update && is_non_updated_current { + // looks like we're not running ~/.parity-updates/parity when the user is expecting otherwise. + // Everything run inside a loop, so we'll be able to restart from the child into a new version seamlessly. + loop { + // If we fail to run the updated parity then fallback to local version. + trace_main!("Attempting to run latest update..."); + let exit_code = run_parity().unwrap_or_else(|| { trace_main!("Falling back to local..."); main_direct() }); + trace_main!("Latest exited with {}", exit_code); + if exit_code != PLEASE_RESTART_EXIT_CODE { + trace_main!("Quitting..."); + process::exit(exit_code); + } + trace_main!("Rerunning..."); } + } else { + trace_main!("Running direct"); + // Otherwise, we're presumably running the version we want. Just run and fall-through. + process::exit(main_direct()); } } diff --git a/ethcore/src/client/operations.rs b/parity/operations.rs similarity index 100% rename from ethcore/src/client/operations.rs rename to parity/operations.rs diff --git a/parity/run.rs b/parity/run.rs index 5c737581260..2a7ecf12e61 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -23,7 +23,7 @@ use ethsync::NetworkConfiguration; use util::{Colour, version, RotatingLogger}; use io::{MayPanic, ForwardPanic, PanicHandler}; use ethcore_logger::{Config as LogConfig}; -use ethcore::client::{Mode, UpdatePolicy, DatabaseCompactionProfile, VMType, ChainNotify, BlockChainClient}; +use ethcore::client::{Mode, UpdatePolicy, Updater, DatabaseCompactionProfile, VMType, ChainNotify, BlockChainClient}; use ethcore::service::ClientService; use ethcore::account_provider::AccountProvider; use ethcore::miner::{Miner, MinerService, ExternalMiner, MinerOptions}; @@ -31,11 +31,11 @@ use ethcore::snapshot; use ethcore::verification::queue::VerifierSettings; use ethsync::SyncConfig; use informant::Informant; +use updater::Updater; use rpc::{HttpServer, IpcServer, HttpConfiguration, IpcConfiguration}; use signer::SignerServer; use dapps::WebappServer; -use io_handler::ClientIoHandler; use params::{ SpecType, Pruning, AccountsConfig, GasPricerConfig, MinerExtras, Switch, tracing_switch_to_bool, fatdb_switch_to_bool, mode_switch_to_bool @@ -116,12 +116,12 @@ pub fn open_ui(dapps_conf: &dapps::Configuration, signer_conf: &signer::Configur Ok(()) } -pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { +pub fn execute(cmd: RunCmd, logger: Arc) -> Result { if cmd.ui && cmd.dapps_conf.enabled { // Check if Parity is already running let addr = format!("{}:{}", cmd.dapps_conf.interface, cmd.dapps_conf.port); if !TcpListener::bind(&addr as &str).is_ok() { - return open_ui(&cmd.dapps_conf, &cmd.signer_conf); + return open_ui(&cmd.dapps_conf, &cmd.signer_conf).map(|_| false); } } @@ -244,7 +244,6 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { // create client config let mut client_config = to_client_config( &cmd.cache_config, - update_policy, mode.clone(), tracing, fat_db, @@ -312,6 +311,12 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { chain_notify.start(); } + // the updater service + let updater = Updater::new(service.client(), update_policy); + if let Some(ref u) = updater { + service.add_notify(u.clone()); + } + // set up dependencies for rpc servers let signer_path = cmd.signer_conf.signer_path.clone(); let deps_for_rpc_apis = Arc::new(rpc_apis::Dependencies { @@ -348,24 +353,23 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { let http_server = try!(rpc::new_http(cmd.http_conf, &dependencies)); let ipc_server = try!(rpc::new_ipc(cmd.ipc_conf, &dependencies)); + // the dapps server let dapps_deps = dapps::Dependencies { panic_handler: panic_handler.clone(), apis: deps_for_rpc_apis.clone(), client: client.clone(), sync: sync_provider.clone(), }; - - // start dapps server let dapps_server = try!(dapps::new(cmd.dapps_conf.clone(), dapps_deps)); + // the signer server let signer_deps = signer::Dependencies { panic_handler: panic_handler.clone(), apis: deps_for_rpc_apis.clone(), }; - - // start signer server let signer_server = try!(signer::start(cmd.signer_conf.clone(), signer_deps)); + // the informant let informant = Arc::new(Informant::new( service.client(), Some(sync_provider.clone()), @@ -373,17 +377,8 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { Some(snapshot_service.clone()), cmd.logger_config.color )); - let info_notify: Arc = informant.clone(); - service.add_notify(info_notify); - let io_handler = Arc::new(ClientIoHandler { - client: service.client(), - info: informant, - sync: sync_provider.clone(), - net: manage_network.clone(), - accounts: account_provider.clone(), - shutdown: Default::default(), - }); - service.register_io_handler(io_handler.clone()).expect("Error registering IO handler"); + service.add_notify(informant.clone()); + service.register_io_handler(informant.clone()).map_err(|_| "Unable to register informant handler".to_owned())?; // save user defaults user_defaults.pruning = algorithm; @@ -392,13 +387,11 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { user_defaults.mode = mode; try!(user_defaults.save(&user_defaults_path)); - let on_mode_change = move |mode: &Mode| { + // tell client how to save the default mode if it gets changed. + client.on_mode_change(move |mode: &Mode| { user_defaults.mode = mode.clone(); let _ = user_defaults.save(&user_defaults_path); // discard failures - there's nothing we can do - }; - - // tell client how to save the default mode if it gets changed. - client.on_mode_change(on_mode_change); + }); // the watcher must be kept alive. let _watcher = match cmd.no_periodic_snapshot { @@ -424,7 +417,9 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { } // Handle exit - wait_for_exit(panic_handler, http_server, ipc_server, dapps_server, signer_server); + wait_for_exit(panic_handler, http_server, ipc_server, dapps_server, signer_server, updater); + + info!("Finishing work, please wait..."); // to make sure timer does not spawn requests while shutdown is in progress io_handler.shutdown.store(true, ::std::sync::atomic::Ordering::SeqCst); @@ -435,7 +430,7 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result<(), String> { // terminated gracefully drop(hypervisor); - Ok(()) + Ok(false) } #[cfg(not(windows))] @@ -443,11 +438,11 @@ fn daemonize(pid_file: String) -> Result<(), String> { extern crate daemonize; daemonize::Daemonize::new() - .pid_file(pid_file) - .chown_pid_file(true) - .start() - .map(|_| ()) - .map_err(|e| format!("Couldn't daemonize; {}", e)) + .pid_file(pid_file) + .chown_pid_file(true) + .start() + .map(|_| ()) + .map_err(|e| format!("Couldn't daemonize; {}", e)) } #[cfg(windows)] @@ -478,20 +473,26 @@ fn wait_for_exit( _http_server: Option, _ipc_server: Option, _dapps_server: Option, - _signer_server: Option - ) { - let exit = Arc::new(Condvar::new()); + _signer_server: Option, + updater: Option> +) -> bool { + let exit = Arc::new((Mutex::new(false), Condvar::new())); // Handle possible exits let e = exit.clone(); - CtrlC::set_handler(move || { e.notify_all(); }); + CtrlC::set_handler(move || { e.1.notify_all(); }); // Handle panics let e = exit.clone(); - panic_handler.on_panic(move |_reason| { e.notify_all(); }); + panic_handler.on_panic(move |_reason| { e.1.notify_all(); }); + + // Handle updater wanting to restart us + if let Some(ref u) = updater { + let e = exit.clone(); + u.set_exit_handler(move || { e.0.lock() = true; e.1.notify_all(); }); + } // Wait for signal - let mutex = Mutex::new(()); - let _ = exit.wait(mutex.lock().unwrap()); - info!("Finishing work, please wait..."); + let _ = exit.1.wait(exit.0.lock().unwrap()); + *exit.0.lock() } diff --git a/ethcore/src/client/updater.rs b/parity/updater.rs similarity index 50% rename from ethcore/src/client/updater.rs rename to parity/updater.rs index 75768132c8c..42def8b5a61 100644 --- a/ethcore/src/client/updater.rs +++ b/parity/updater.rs @@ -19,84 +19,140 @@ use std::{io, os, fs, env}; use std::path::{Path, PathBuf}; use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; use util::{Address, H160, H256, FixedHash, Mutex}; -use client::operations::Operations; -use client::{Client, UpdatePolicy, UpdateFilter, BlockId}; +use super::operations::Operations; +use ethcore::client::{Client, BlockId}; use fetch::HashFetch; use fetch; +/// Filter for releases. +#[derive(Debug, Eq, PartialEq, Clone)] +pub enum UpdateFilter { + /// All releases following the same track. + All, + /// As with `All`, but only those which are known to be critical. + Critical, + /// None. + None, +} + +/// The policy for auto-updating. +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct UpdatePolicy { + /// Download potential updates. + pub enable_downloading: bool, + /// Which of those downloaded should be automatically installed. + pub filter: UpdateFilter, +} + +impl Default for UpdatePolicy { + fn default() -> Self { + UpdatePolicy { + enable_downloading: false, + filter: UpdateFilter::None, + } + } +} + +/// Information regarding a particular release of Parity #[derive(Debug, Clone, PartialEq)] pub struct ReleaseInfo { + /// Information on the version. pub version: VersionInfo, + /// Does this release contain critical security updates? pub is_critical: bool, + /// The latest fork that this release can handle. pub fork: u64, + /// Our platform's binary, if known. pub binary: Option, } +/// Information on our operations environment. #[derive(Debug, Clone, PartialEq)] pub struct OperationsInfo { + /// Our blockchain's latest fork. pub fork: u64, + /// Last fork our client supports, if known. + pub this_fork: Option, + + /// Information on our track's latest release. pub track: ReleaseInfo, + /// Information on our minor version's latest release. pub minor: Option, } +#[derive(Debug, Default)] +struct UpdaterState { + latest: Option, + + fetching: Option, + ready: Option, + installed: Option, +} + +/// Service for checking for updates and determining whether we can achieve consensus. pub struct Updater { - client: Weak, - fetch: Weak, - operations: Operations, + // Useful environmental stuff. update_policy: UpdatePolicy, - fetching: Mutex>, + weak_self: Weak, + client: Weak, + fetcher: Option, + operations: Mutex>, + exit_handler: Mutex>, - // These don't change - pub this: VersionInfo, - pub this_fork: Option, + // Our version info (static) + this: VersionInfo, - // This does change - pub latest: Option, - pub ready: Option, - // If Some, client should restart itself. - pub installed: Option, + // All the other info - this changes so leave it behind a Mutex. + state: Mutex, } const CLIENT_ID: &'static str = "parity"; +// TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! fn platform() -> String { "test".to_owned() } +#[cfg(windows)] +fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + os::windows::fs::symlink_file(src, dst) +} + +#[cfg(not(windows))] +fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + os::unix::fs::symlink(src, dst) +} + impl Updater { - pub fn new(client: Weak, fetch: Weak, operations: Address, update_policy: UpdatePolicy) -> Self { + pub fn new(client: Weak, update_policy: UpdatePolicy) -> Arc { let mut u = Updater { - client: client.clone(), - fetch: fetch.clone(), - operations: Operations::new(operations, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d))), update_policy: update_policy, - fetching: Mutex::new(None), + weak_self: Default::default(), + client: client.clone(), + fetcher: None, + operations: Mutex::new(None), + exit_handler: Mutex::new(None), this: VersionInfo::this(), - this_fork: None, - latest: None, - ready: None, - installed: None, + state: Mutex::new(Default::default()), }; - u.this_fork = u.operations.release(CLIENT_ID, &u.this.hash.into()).ok() - .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); - // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if u.this.track == ReleaseTrack::Unknown { u.this.track = ReleaseTrack::Nightly; } - u.latest = u.collect_latest().ok(); - - u + let r = Arc::new(u); + r.as_mut().weak_self = Arc::downgrade(&r); + r.as_mut().fetcher = Some(fetch::Client::new(r)); + r } /// Is the currently running client capable of supporting the current chain? /// `Some` answer or `None` if information on the running client is not available. pub fn is_capable(&self) -> Option { - self.latest.as_ref().and_then(|latest| { - self.this_fork.map(|this_fork| { + self.state.lock().latest.as_ref().and_then(|latest| { + latest.this_fork.map(|this_fork| { let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); this_fork >= latest.fork || current_number < latest.fork }) @@ -106,35 +162,29 @@ impl Updater { /// The release which is ready to be upgraded to, if any. If this returns `Some`, then /// `execute_upgrade` may be called. pub fn upgrade_ready(&self) -> Option { - self.ready.clone() - } - - #[cfg(windows)] - fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { - os::windows::fs::symlink_file(src, dst) - } - - #[cfg(not(windows))] - fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { - os::unix::fs::symlink(src, dst) + self.state.lock().ready.clone() } /// Actually upgrades the client. Assumes that the binary has been downloaded. /// @returns `true` on success. pub fn execute_upgrade(&mut self) -> bool { (|| -> Result { - if let Some(r) = self.ready.take() { + let s = state.lock(); + if let Some(r) = s.ready.take() { let p = Self::update_file_path(&r.version); let n = Self::updates_latest(); let _ = fs::remove_file(&n); - match Self::symlink(p, n) { + match symlink(p, n) { Ok(_) => { info!("Completed upgrade to {}", &r.version); - self.installed = Some(r); + s.installed = Some(r); + if let Some(ref h) = self.exit_handler().lock() { + (*h)(); + } Ok(true) } Err(e) => { - self.ready = Some(r); + s.ready = Some(r); Err(format!("Unable to create soft-link for update {:?}", e)) } } @@ -146,7 +196,7 @@ impl Updater { } /// Returns true iff the current version is capable of forming consensus. - pub fn consensus_capable(&self) -> bool { + pub fn is_consensus_capable(&self) -> bool { /* if let Some(ref latest) = self.latest { @@ -157,7 +207,12 @@ impl Updater { pub fn version_info(&self) -> &VersionInfo { &self.this } /// Information gathered concerning the release. - pub fn info(&self) -> &Option { &self.latest } + pub fn info(&self) -> Option { self.state.lock().latest.clone() } + + /// Set a closure to call when we want to restart the client + pub fn set_exit_handler(&self, f: Fn()) { + *self.exit_handler.lock() = f; + } fn collect_release_info(&self, release_id: &H256) -> Result { let (fork, track, semver, is_critical) = self.operations.release(CLIENT_ID, release_id)?; @@ -171,6 +226,9 @@ impl Updater { } fn collect_latest(&self) -> Result { + let this_fork = u.operations.release(CLIENT_ID, &u.this.hash.into()).ok() + .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); + if self.this.track == ReleaseTrack::Unknown { return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); } @@ -190,6 +248,7 @@ impl Updater { Ok(OperationsInfo { fork: self.operations.latest_fork()? as u64, + this_fork: this_fork, track: in_track, minor: in_minor, }) @@ -211,19 +270,23 @@ impl Updater { fn fetch_done(&mut self, result: Result) { (|| -> Result<(), String> { - let fetched = self.fetching.lock().take().unwrap(); - let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; - info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); - let dest = Self::update_file_path(&fetched.version); - fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; - fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; - info!("Copied file to {}", dest.display()); - let auto = match self.update_policy.filter { - UpdateFilter::All => true, - UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, - _ => false, + let auto = { + let mut s = state.lock(); + let fetched = s.fetching.take().unwrap(); + let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; + info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); + let dest = Self::update_file_path(&fetched.version); + fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; + fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; + info!("Copied file to {}", dest.display()); + let auto = match self.update_policy.filter { + UpdateFilter::All => true, + UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, + _ => false, + }; + s.ready = Some(fetched); + auto }; - self.ready = Some(fetched); if auto { self.execute_upgrade(); } @@ -231,13 +294,26 @@ impl Updater { })().unwrap_or_else(|e| warn!("{}", e)); } - pub fn tick(&mut self) { + fn poll(&mut self) { info!(target: "updater", "Current release is {}", self.this); - self.latest = self.collect_latest().ok(); + if *self.operations.lock().is_none() { + if let Some(ops_addr) = client.upgrade().registry_address("operations") { + trace!(target: "client", "Found operations at {}", ops_addr); + let client = self.client.clone(); + *self.operations.lock() = Some(Operations::new(ops_addr, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d)))); + } else { + // No Operations contract - bail. + return; + } + } + + u.latest = u.collect_latest().ok(); + let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); - if let Some(ref latest) = self.latest { + let latest = self.collect_latest().ok(); + if let Some(ref latest) = latest { info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", latest.track.version, if latest.track.is_critical {""} else {"non-"}, @@ -248,27 +324,44 @@ impl Updater { "unreleased".into() } ); - if self.update_policy.enable_downloading && latest.track.version.hash != self.version_info().hash && self.installed.as_ref().or(self.ready.as_ref()).map_or(true, |t| *t != latest.track) { + let mut s = self.state.lock(); + let running_latest = latest.track.version.hash == self.version_info().hash; + let already_have_latest = s.installed.as_ref().or(s.ready.as_ref()).map_or(false, |t| *t == latest.track); + if self.update_policy.enable_downloading && !running_latest && !already_have_latest { if let Some(b) = latest.track.binary { - let mut fetching = self.fetching.lock(); if fetching.is_none() { info!("Attempting to get parity binary {}", b); - let c = self.client.clone(); - let f = move |r: Result| { - if let Some(client) = c.upgrade() { - if let Some(updater) = client.updater().as_mut() { - updater.fetch_done(r); - } - } - }; - if let Some(fetch) = self.fetch.clone().upgrade() { - fetch.fetch(b, Box::new(f)).ok(); - *fetching = Some(latest.track.clone()); - } + s.fetching = Some(latest.track.clone()); + let weak_self = self.weak_self.clone(); + let f = move |r: Result| if let Some(this) = weak_self.upgrade().as_mut() { this.fetch_done(r) }}; + fetcher.fetch(b, Box::new(f)).ok(); } } } - info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match self.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); + info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match s.latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, s.latest.track.fork, s.latest.fork); } + (*self.state.lock()).latest = latest; + } +} + +impl ChainNotify for Updater { + fn new_blocks(&self, _imported: Vec, _invalid: Vec, _enacted: Vec, _retracted: Vec, _sealed: Vec, duration: u64) { + // TODO: something like this +// if !self.client.upgrade().map_or(true, |c| c.is_major_syncing()) { + self.poll(); +// } + } +} + +impl fetch::urlhint::ContractClient for Updater { + fn registrar(&self) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .registrar_address() + .ok_or_else(|| "Registrar not available".into()) + } + + fn call(&self, address: Address, data: Bytes) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .call_contract(address, data) } } diff --git a/util/src/log.rs b/util/src/log.rs index 97f3e347f5b..056459b1e5d 100644 --- a/util/src/log.rs +++ b/util/src/log.rs @@ -25,7 +25,7 @@ pub use ansi_term::{Colour, Style}; use parking_lot::{RwLock, RwLockReadGuard}; lazy_static! { - static ref LOG_DUMMY: bool = { + static ref LOG_DUMMY: () = { let mut builder = LogBuilder::new(); builder.filter(None, LogLevelFilter::Info); @@ -36,13 +36,12 @@ lazy_static! { if builder.init().is_ok() { println!("logger initialized"); } - true }; } /// Intialize log with default settings pub fn init_log() { - let _ = *LOG_DUMMY; + *LOG_DUMMY } const LOG_SIZE : usize = 128; From 0302d582d294ca2c5f9e5787f4e0f9353eecc2a1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 02:02:40 +0100 Subject: [PATCH 23/87] Fix build. --- Cargo.lock | 1 + Cargo.toml | 1 + ethcore/src/client/client.rs | 19 +++-- ethcore/src/client/test_client.rs | 4 + ethcore/src/client/traits.rs | 3 + parity/blockchain.rs | 3 +- parity/configuration.rs | 3 +- parity/helpers.rs | 2 +- parity/informant.rs | 16 +++- parity/main.rs | 13 ++-- parity/run.rs | 31 ++++---- parity/snapshot.rs | 2 +- parity/updater.rs | 122 ++++++++++++++---------------- 13 files changed, 114 insertions(+), 106 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 722348c3339..49871eeab67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,7 @@ dependencies = [ "daemonize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.5.0", "ethcore-dapps 1.5.0", "ethcore-devtools 1.5.0", diff --git a/Cargo.toml b/Cargo.toml index c3a44e1cc0e..b4020f19835 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,7 @@ ethcore-stratum = { path = "stratum" } ethcore-dapps = { path = "dapps", optional = true } clippy = { version = "0.0.103", optional = true} ethcore-light = { path = "ethcore/light" } +ethabi = "0.2.2" [target.'cfg(windows)'.dependencies] winapi = "0.2" diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 0928193004d..7fa714e8f7c 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -711,16 +711,6 @@ impl Client { } } - /// Look up the block number for the given block ID. - pub fn block_number(&self, id: BlockId) -> Option { - match id { - BlockId::Number(number) => Some(number), - BlockId::Hash(ref hash) => self.chain.read().block_number(hash), - BlockId::Earliest => Some(0), - BlockId::Latest | BlockId::Pending => Some(self.chain.read().best_block_number()), - } - } - /// Take a snapshot at the given block. /// If the ID given is "latest", this will default to 1000 blocks behind. pub fn take_snapshot(&self, writer: W, at: BlockId, p: &snapshot::Progress) -> Result<(), EthcoreError> { @@ -946,6 +936,15 @@ impl BlockChainClient for Client { Self::block_hash(&chain, id).and_then(|hash| chain.block_header_data(&hash)) } + fn block_number(&self, id: BlockId) -> Option { + match id { + BlockId::Number(number) => Some(number), + BlockId::Hash(ref hash) => self.chain.read().block_number(hash), + BlockId::Earliest => Some(0), + BlockId::Latest | BlockId::Pending => Some(self.chain.read().best_block_number()), + } + } + fn block_body(&self, id: BlockId) -> Option { let chain = self.chain.read(); Self::block_hash(&chain, id).and_then(|hash| chain.block_body(&hash)) diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index d2646b105a7..dd37a3c02f9 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -473,6 +473,10 @@ impl BlockChainClient for TestBlockChainClient { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).map(|r| Rlp::new(r).at(0).as_raw().to_vec())) } + fn block_number(&self, _id: BlockId) -> Option { + unimplemented!() + } + fn block_body(&self, id: BlockId) -> Option { self.block_hash(id).and_then(|hash| self.blocks.read().get(&hash).map(|r| { let mut stream = RlpStream::new_list(2); diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index a6956461e55..8f5d4c77aa7 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -52,6 +52,9 @@ pub trait BlockChainClient : Sync + Send { /// Get raw block header data by block id. fn block_header(&self, id: BlockId) -> Option; + /// Look up the block number for the given block ID. + fn block_number(&self, id: BlockId) -> Option; + /// Get raw block body data by block id. /// Block body is an RLP list of two items: uncles and transactions. fn block_body(&self, id: BlockId) -> Option; diff --git a/parity/blockchain.rs b/parity/blockchain.rs index d62f2b9bbad..ffbe1506807 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -178,7 +178,6 @@ fn execute_import(cmd: ImportBlockchain) -> Result { // prepare client config let mut client_config = to_client_config( &cmd.cache_config, - Default::default(), Mode::Active, tracing, fat_db, @@ -345,7 +344,7 @@ fn start_client( try!(execute_upgrades(&db_dirs, algorithm, compaction.compaction_profile(db_dirs.fork_path().as_path()))); // prepare client config - let client_config = to_client_config(&cache_config, Default::default(), Mode::Active, tracing, fat_db, compaction, wal, VMType::default(), "".into(), algorithm, pruning_history, true); + let client_config = to_client_config(&cache_config, Mode::Active, tracing, fat_db, compaction, wal, VMType::default(), "".into(), algorithm, pruning_history, true); let service = try!(ClientService::start( client_config, diff --git a/parity/configuration.rs b/parity/configuration.rs index ca3189827db..c9358cd35e5 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -23,7 +23,7 @@ use cli::{Args, ArgsError}; use util::{Hashable, U256, Uint, Bytes, version_data, Secret, Address}; use util::log::Colour; use ethsync::{NetworkConfiguration, is_valid_node_url, AllowIP}; -use ethcore::client::{VMType, UpdatePolicy, UpdateFilter}; +use ethcore::client::{VMType}; use ethcore::miner::{MinerOptions, Banning}; use ethcore::verification::queue::VerifierSettings; @@ -37,6 +37,7 @@ use ethcore_logger::Config as LogConfig; use dir::Directories; use dapps::Configuration as DappsConfiguration; use signer::{Configuration as SignerConfiguration}; +use updater::{UpdatePolicy, UpdateFilter}; use run::RunCmd; use blockchain::{BlockchainCmd, ImportBlockchain, ExportBlockchain, ExportState, DataFormat}; use presale::ImportWallet; diff --git a/parity/helpers.rs b/parity/helpers.rs index 25acfcc556a..60a04bc4581 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -20,7 +20,7 @@ use std::time::Duration; use std::fs::File; use util::{clean_0x, U256, Uint, Address, path, CompactionProfile}; use util::journaldb::Algorithm; -use ethcore::client::{UpdatePolicy, Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; +use ethcore::client::{Mode, BlockId, VMType, DatabaseCompactionProfile, ClientConfig, VerifierType}; use ethcore::miner::{PendingSet, GasLimit, PrioritizationStrategy}; use cache::CacheConfig; use dir::DatabaseDirectories; diff --git a/parity/informant.rs b/parity/informant.rs index 1f3f3862a40..31f5c3e81dc 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -19,12 +19,14 @@ use self::ansi_term::Colour::{White, Yellow, Green, Cyan, Blue}; use self::ansi_term::Style; use std::sync::{Arc}; -use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering}; +use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering as AtomicOrdering}; use std::time::{Instant, Duration}; +use io::{TimerToken, IoContext, IoHandler}; use isatty::{stdout_isatty}; use ethsync::{SyncProvider, ManageNetwork}; use util::{Uint, RwLock, Mutex, H256, Colour}; use ethcore::client::*; +use ethcore::service::ClientIoMessage; use ethcore::views::BlockView; use ethcore::snapshot::service::Service as SnapshotService; use ethcore::snapshot::{RestorationStatus, SnapshotService as SS}; @@ -44,6 +46,7 @@ pub struct Informant { last_import: Mutex, skipped: AtomicUsize, skipped_txs: AtomicUsize, + in_shutdown: AtomicBool, } /// Format byte counts to standard denominations. @@ -82,9 +85,14 @@ impl Informant { last_import: Mutex::new(Instant::now()), skipped: AtomicUsize::new(0), skipped_txs: AtomicUsize::new(0), + in_shutdown: AtomicBool::new(false), } } + /// Signal that we're shutting down; no more output necessary. + pub fn shutdown(&self) { + self.in_shutdown.store(true, ::std::sync::atomic::Ordering::SeqCst); + } #[cfg_attr(feature="dev", allow(match_bool))] pub fn tick(&self) { @@ -222,14 +230,16 @@ impl ChainNotify for Informant { } } +const INFO_TIMER: TimerToken = 0; + impl IoHandler for Informant { fn initialize(&self, io: &IoContext) { io.register_timer(INFO_TIMER, 5000).expect("Error registering timer"); } fn timeout(&self, _io: &IoContext, timer: TimerToken) { - if timer == INFO_TIMER && !self.shutdown.load(Ordering::SeqCst) { - self.info.tick(); + if timer == INFO_TIMER && !self.in_shutdown.load(AtomicOrdering::SeqCst) { + self.tick(); } } } diff --git a/parity/main.rs b/parity/main.rs index cf5ba7391bf..7d5426eb9cd 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -25,6 +25,7 @@ extern crate docopt; extern crate num_cpus; extern crate rustc_serialize; +extern crate ethabi; extern crate ethcore_devtools as devtools; extern crate ethcore; extern crate ethsync; @@ -87,7 +88,6 @@ mod upgrade; mod rpc; mod dapps; mod informant; -mod io_handler; mod cli; mod configuration; mod migration; @@ -111,7 +111,6 @@ mod boot; mod user_defaults; mod updater; mod operations; -mod fetch; #[cfg(feature="stratum")] mod stratum; @@ -254,12 +253,12 @@ fn main() { // if argv[0] == "parity" and this executable != ~/.parity-updates/parity, run that instead. let force_direct = std::env::args().any(|arg| arg == "--force-direct"); let exe = std::env::current_exe().ok(); - let development = exe.and_then(|p| p.parent().and_then(|p| p.parent()).and_then(|p| p.file_name()).map(|n| n == "target")).unwrap_or(false); - let same_name = exe.and_then(|p| p.file_stem().map_or(false, |s| s == "parity")); + let development = exe.as_ref().and_then(|p| p.parent().and_then(|p| p.parent()).and_then(|p| p.file_name()).map(|n| n == "target")).unwrap_or(false); + let same_name = exe.as_ref().and_then(|p| p.file_stem().map(|s| s == "parity")).unwrap_or(false); let have_update = updates_latest().exists(); - let is_non_updated_current = exe.map_or(false, p.canonicalize() != updates_latest().canonicalize()); - trace_main!("Starting up {} (force-direct: {}, development: {}, have-update: {}, non-updated-current: {})", std::env::current_exe().map(|x| format!("{}", x.display())).unwrap_or("".to_owned()), force_direct, development, have_update, is_non_updated_current); - if !force_direct && ! development && have_update && is_non_updated_current { + let is_non_updated_current = exe.map_or(false, |p| p.canonicalize().ok() != updates_latest().canonicalize().ok()); + trace_main!("Starting up {} (force-direct: {}, development: {}, same-name: {}, have-update: {}, non-updated-current: {})", std::env::current_exe().map(|x| format!("{}", x.display())).unwrap_or("".to_owned()), force_direct, development, same_name, have_update, is_non_updated_current); + if !force_direct && !development && same_name && have_update && is_non_updated_current { // looks like we're not running ~/.parity-updates/parity when the user is expecting otherwise. // Everything run inside a loop, so we'll be able to restart from the child into a new version seamlessly. loop { diff --git a/parity/run.rs b/parity/run.rs index 2a7ecf12e61..7d7fbff0cf3 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -14,16 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::sync::{Arc, Mutex, Condvar}; +use std::sync::Arc; use std::net::{TcpListener}; use ctrlc::CtrlC; use fdlimit::raise_fd_limit; use ethcore_rpc::{NetworkSettings, is_major_importing}; use ethsync::NetworkConfiguration; -use util::{Colour, version, RotatingLogger}; +use util::{Colour, version, RotatingLogger, Mutex, Condvar}; use io::{MayPanic, ForwardPanic, PanicHandler}; use ethcore_logger::{Config as LogConfig}; -use ethcore::client::{Mode, UpdatePolicy, Updater, DatabaseCompactionProfile, VMType, ChainNotify, BlockChainClient}; +use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockChainClient}; use ethcore::service::ClientService; use ethcore::account_provider::AccountProvider; use ethcore::miner::{Miner, MinerService, ExternalMiner, MinerOptions}; @@ -31,7 +31,7 @@ use ethcore::snapshot; use ethcore::verification::queue::VerifierSettings; use ethsync::SyncConfig; use informant::Informant; -use updater::Updater; +use updater::{UpdatePolicy, Updater}; use rpc::{HttpServer, IpcServer, HttpConfiguration, IpcConfiguration}; use signer::SignerServer; @@ -312,10 +312,8 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result } // the updater service - let updater = Updater::new(service.client(), update_policy); - if let Some(ref u) = updater { - service.add_notify(u.clone()); - } + let updater = Updater::new(Arc::downgrade(&(service.client() as Arc)), update_policy); + service.add_notify(updater.clone()); // set up dependencies for rpc servers let signer_path = cmd.signer_conf.signer_path.clone(); @@ -422,9 +420,9 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result info!("Finishing work, please wait..."); // to make sure timer does not spawn requests while shutdown is in progress - io_handler.shutdown.store(true, ::std::sync::atomic::Ordering::SeqCst); + informant.shutdown(); // just Arc is dropping here, to allow other reference release in its default time - drop(io_handler); + drop(informant); // hypervisor should be shutdown first while everything still works and can be // terminated gracefully @@ -474,7 +472,7 @@ fn wait_for_exit( _ipc_server: Option, _dapps_server: Option, _signer_server: Option, - updater: Option> + updater: Arc ) -> bool { let exit = Arc::new((Mutex::new(false), Condvar::new())); @@ -487,12 +485,11 @@ fn wait_for_exit( panic_handler.on_panic(move |_reason| { e.1.notify_all(); }); // Handle updater wanting to restart us - if let Some(ref u) = updater { - let e = exit.clone(); - u.set_exit_handler(move || { e.0.lock() = true; e.1.notify_all(); }); - } + let e = exit.clone(); + updater.set_exit_handler(move || { *e.0.lock() = true; e.1.notify_all(); }); // Wait for signal - let _ = exit.1.wait(exit.0.lock().unwrap()); - *exit.0.lock() + let mut l = exit.0.lock(); + let _ = exit.1.wait(&mut l); + *l } diff --git a/parity/snapshot.rs b/parity/snapshot.rs index d74adc1b479..804047596a0 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -170,7 +170,7 @@ impl SnapshotCommand { try!(execute_upgrades(&db_dirs, algorithm, self.compaction.compaction_profile(db_dirs.fork_path().as_path()))); // prepare client config - let client_config = to_client_config(&self.cache_config, Default::default(), Mode::Active, tracing, fat_db, self.compaction, self.wal, VMType::default(), "".into(), algorithm, self.pruning_history, true); + let client_config = to_client_config(&self.cache_config, Mode::Active, tracing, fat_db, self.compaction, self.wal, VMType::default(), "".into(), algorithm, self.pruning_history, true); let service = try!(ClientService::start( client_config, diff --git a/parity/updater.rs b/parity/updater.rs index 42def8b5a61..85ceb749337 100644 --- a/parity/updater.rs +++ b/parity/updater.rs @@ -14,15 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::sync::{Weak}; +use std::sync::{Arc, Weak}; use std::{io, os, fs, env}; use std::path::{Path, PathBuf}; use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; -use util::{Address, H160, H256, FixedHash, Mutex}; +use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; use super::operations::Operations; -use ethcore::client::{Client, BlockId}; -use fetch::HashFetch; -use fetch; +use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; +use hash_fetch::{self as fetch, HashFetch}; /// Filter for releases. #[derive(Debug, Eq, PartialEq, Clone)] @@ -94,11 +93,11 @@ struct UpdaterState { pub struct Updater { // Useful environmental stuff. update_policy: UpdatePolicy, - weak_self: Weak, - client: Weak, + weak_self: Mutex>, + client: Weak, fetcher: Option, operations: Mutex>, - exit_handler: Mutex>, + exit_handler: Mutex>>, // Our version info (static) this: VersionInfo, @@ -128,7 +127,7 @@ impl Updater { pub fn new(client: Weak, update_policy: UpdatePolicy) -> Arc { let mut u = Updater { update_policy: update_policy, - weak_self: Default::default(), + weak_self: Mutex::new(Default::default()), client: client.clone(), fetcher: None, operations: Mutex::new(None), @@ -142,9 +141,9 @@ impl Updater { u.this.track = ReleaseTrack::Nightly; } - let r = Arc::new(u); - r.as_mut().weak_self = Arc::downgrade(&r); - r.as_mut().fetcher = Some(fetch::Client::new(r)); + let mut r = Arc::new(u); + Arc::get_mut(&mut r).expect("arc created on previous line; qed").fetcher = Some(fetch::Client::new(r.clone())); + *r.weak_self.lock() = Arc::downgrade(&r); r } @@ -167,9 +166,9 @@ impl Updater { /// Actually upgrades the client. Assumes that the binary has been downloaded. /// @returns `true` on success. - pub fn execute_upgrade(&mut self) -> bool { + pub fn execute_upgrade(&self) -> bool { (|| -> Result { - let s = state.lock(); + let mut s = self.state.lock(); if let Some(r) = s.ready.take() { let p = Self::update_file_path(&r.version); let n = Self::updates_latest(); @@ -178,7 +177,7 @@ impl Updater { Ok(_) => { info!("Completed upgrade to {}", &r.version); s.installed = Some(r); - if let Some(ref h) = self.exit_handler().lock() { + if let Some(ref h) = *self.exit_handler.lock() { (*h)(); } Ok(true) @@ -195,14 +194,6 @@ impl Updater { })().unwrap_or_else(|e| { warn!("{}", e); false }) } - /// Returns true iff the current version is capable of forming consensus. - pub fn is_consensus_capable(&self) -> bool { -/* if let Some(ref latest) = self.latest { - - -*/ unimplemented!() - } - /// Our version info. pub fn version_info(&self) -> &VersionInfo { &self.this } @@ -210,13 +201,13 @@ impl Updater { pub fn info(&self) -> Option { self.state.lock().latest.clone() } /// Set a closure to call when we want to restart the client - pub fn set_exit_handler(&self, f: Fn()) { - *self.exit_handler.lock() = f; + pub fn set_exit_handler(&self, f: F) where F: Fn() + 'static + Send { + *self.exit_handler.lock() = Some(Box::new(f)); } - fn collect_release_info(&self, release_id: &H256) -> Result { - let (fork, track, semver, is_critical) = self.operations.release(CLIENT_ID, release_id)?; - let latest_binary = self.operations.checksum(CLIENT_ID, release_id, &platform())?; + fn collect_release_info(operations: &Operations, release_id: &H256) -> Result { + let (fork, track, semver, is_critical) = operations.release(CLIENT_ID, release_id)?; + let latest_binary = operations.checksum(CLIENT_ID, release_id, &platform())?; Ok(ReleaseInfo { version: VersionInfo::from_raw(semver, track, release_id.clone().into()), is_critical: is_critical, @@ -226,32 +217,36 @@ impl Updater { } fn collect_latest(&self) -> Result { - let this_fork = u.operations.release(CLIENT_ID, &u.this.hash.into()).ok() - .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); + if let Some(ref operations) = *self.operations.lock() { + let this_fork = operations.release(CLIENT_ID, &self.this.hash.into()).ok() + .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); - if self.this.track == ReleaseTrack::Unknown { - return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); - } + if self.this.track == ReleaseTrack::Unknown { + return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); + } - let latest_in_track = self.operations.latest_in_track(CLIENT_ID, self.this.track.into())?; - let in_track = self.collect_release_info(&latest_in_track)?; - let mut in_minor = Some(in_track.clone()); - const PROOF: &'static str = "in_minor initialised and assigned with Some; loop breaks if None assigned; qed"; - while in_minor.as_ref().expect(PROOF).version.track != self.this.track { - let track = match in_minor.as_ref().expect(PROOF).version.track { - ReleaseTrack::Beta => ReleaseTrack::Stable, - ReleaseTrack::Nightly => ReleaseTrack::Beta, - _ => { in_minor = None; break; } - }; - in_minor = Some(self.collect_release_info(&self.operations.latest_in_track(CLIENT_ID, track.into())?)?); - } + let latest_in_track = operations.latest_in_track(CLIENT_ID, self.this.track.into())?; + let in_track = Self::collect_release_info(operations, &latest_in_track)?; + let mut in_minor = Some(in_track.clone()); + const PROOF: &'static str = "in_minor initialised and assigned with Some; loop breaks if None assigned; qed"; + while in_minor.as_ref().expect(PROOF).version.track != self.this.track { + let track = match in_minor.as_ref().expect(PROOF).version.track { + ReleaseTrack::Beta => ReleaseTrack::Stable, + ReleaseTrack::Nightly => ReleaseTrack::Beta, + _ => { in_minor = None; break; } + }; + in_minor = Some(Self::collect_release_info(operations, &operations.latest_in_track(CLIENT_ID, track.into())?)?); + } - Ok(OperationsInfo { - fork: self.operations.latest_fork()? as u64, - this_fork: this_fork, - track: in_track, - minor: in_minor, - }) + Ok(OperationsInfo { + fork: operations.latest_fork()? as u64, + this_fork: this_fork, + track: in_track, + minor: in_minor, + }) + } else { + Err("Operations not available".into()) + } } fn update_file_path(v: &VersionInfo) -> PathBuf { @@ -268,10 +263,10 @@ impl Updater { dest } - fn fetch_done(&mut self, result: Result) { + fn fetch_done(&self, result: Result) { (|| -> Result<(), String> { let auto = { - let mut s = state.lock(); + let mut s = self.state.lock(); let fetched = s.fetching.take().unwrap(); let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); @@ -288,17 +283,18 @@ impl Updater { auto }; if auto { + // will lock self.state, so ensure it's outside of previous block. self.execute_upgrade(); } Ok(()) })().unwrap_or_else(|e| warn!("{}", e)); } - fn poll(&mut self) { + fn poll(&self) { info!(target: "updater", "Current release is {}", self.this); - if *self.operations.lock().is_none() { - if let Some(ops_addr) = client.upgrade().registry_address("operations") { + if self.operations.lock().is_none() { + if let Some(ops_addr) = self.client.upgrade().and_then(|c| c.registry_address("operations".into())) { trace!(target: "client", "Found operations at {}", ops_addr); let client = self.client.clone(); *self.operations.lock() = Some(Operations::new(ops_addr, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d)))); @@ -308,8 +304,6 @@ impl Updater { } } - u.latest = u.collect_latest().ok(); - let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); let latest = self.collect_latest().ok(); @@ -329,23 +323,23 @@ impl Updater { let already_have_latest = s.installed.as_ref().or(s.ready.as_ref()).map_or(false, |t| *t == latest.track); if self.update_policy.enable_downloading && !running_latest && !already_have_latest { if let Some(b) = latest.track.binary { - if fetching.is_none() { + if s.fetching.is_none() { info!("Attempting to get parity binary {}", b); s.fetching = Some(latest.track.clone()); - let weak_self = self.weak_self.clone(); - let f = move |r: Result| if let Some(this) = weak_self.upgrade().as_mut() { this.fetch_done(r) }}; - fetcher.fetch(b, Box::new(f)).ok(); + let weak_self = self.weak_self.lock().clone(); + let f = move |r: Result| if let Some(this) = weak_self.upgrade() { this.fetch_done(r) }; + self.fetcher.as_ref().expect("Created on `new`; qed").fetch(b, Box::new(f)).ok(); } } } - info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match s.latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, s.latest.track.fork, s.latest.fork); + info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); } (*self.state.lock()).latest = latest; } } impl ChainNotify for Updater { - fn new_blocks(&self, _imported: Vec, _invalid: Vec, _enacted: Vec, _retracted: Vec, _sealed: Vec, duration: u64) { + fn new_blocks(&self, _imported: Vec, _invalid: Vec, _enacted: Vec, _retracted: Vec, _sealed: Vec, _duration: u64) { // TODO: something like this // if !self.client.upgrade().map_or(true, |c| c.is_major_syncing()) { self.poll(); From 120564ff296f5b5415706fd123967233bf950cf1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 02:12:52 +0100 Subject: [PATCH 24/87] Avoid pulling in hash_fetch. --- Cargo.lock | 1 - ethcore/Cargo.toml | 1 - ethcore/src/lib.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49871eeab67..a700bc7570c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -297,7 +297,6 @@ dependencies = [ "ethash 1.5.0", "ethcore-bloom-journal 0.1.0", "ethcore-devtools 1.5.0", - "ethcore-hash-fetch 1.5.0", "ethcore-io 1.5.0", "ethcore-ipc 1.5.0", "ethcore-ipc-codegen 1.5.0", diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index cd757d6dc51..17c5d3a04af 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -34,7 +34,6 @@ ethash = { path = "../ethash" } ethcore-util = { path = "../util" } ethcore-io = { path = "../util/io" } ethcore-devtools = { path = "../devtools" } -ethcore-hash-fetch = { path = "./hash-fetch" } ethjson = { path = "../json" } ethcore-ipc = { path = "../ipc/rpc" } ethstore = { path = "../ethstore" } diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index c0ad612d29b..26db147442b 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -103,7 +103,6 @@ extern crate ethcore_bloom_journal as bloom_journal; extern crate byteorder; extern crate transient_hashmap; extern crate linked_hash_map; -extern crate ethcore_hash_fetch as fetch; #[macro_use] extern crate log; From 7a1539cfb5571722493debd72887e44c72fa6f2c Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 02:39:56 +0100 Subject: [PATCH 25/87] Fix deadlock. --- parity/updater.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parity/updater.rs b/parity/updater.rs index 85ceb749337..7da7a6dc835 100644 --- a/parity/updater.rs +++ b/parity/updater.rs @@ -95,7 +95,7 @@ pub struct Updater { update_policy: UpdatePolicy, weak_self: Mutex>, client: Weak, - fetcher: Option, + fetcher: Mutex>, operations: Mutex>, exit_handler: Mutex>>, @@ -129,7 +129,7 @@ impl Updater { update_policy: update_policy, weak_self: Mutex::new(Default::default()), client: client.clone(), - fetcher: None, + fetcher: Mutex::new(None), operations: Mutex::new(None), exit_handler: Mutex::new(None), this: VersionInfo::this(), @@ -141,8 +141,8 @@ impl Updater { u.this.track = ReleaseTrack::Nightly; } - let mut r = Arc::new(u); - Arc::get_mut(&mut r).expect("arc created on previous line; qed").fetcher = Some(fetch::Client::new(r.clone())); + let r = Arc::new(u); + *r.fetcher.lock() = Some(fetch::Client::new(r.clone())); *r.weak_self.lock() = Arc::downgrade(&r); r } @@ -328,7 +328,7 @@ impl Updater { s.fetching = Some(latest.track.clone()); let weak_self = self.weak_self.lock().clone(); let f = move |r: Result| if let Some(this) = weak_self.upgrade() { this.fetch_done(r) }; - self.fetcher.as_ref().expect("Created on `new`; qed").fetch(b, Box::new(f)).ok(); + self.fetcher.lock().as_ref().expect("Created on `new`; qed").fetch(b, Box::new(f)).ok(); } } } From 2865cbaf70d0af36cd3be20a927da6c6a390cb3d Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 03:33:10 +0100 Subject: [PATCH 26/87] Use file contents instead of symlink. --- parity/main.rs | 32 +++++++++++++++++++------------- parity/updater.rs | 36 ++++++++++++------------------------ 2 files changed, 31 insertions(+), 37 deletions(-) diff --git a/parity/main.rs b/parity/main.rs index 7d5426eb9cd..a435e6230cc 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -117,7 +117,7 @@ mod stratum; use std::{process, env}; use std::collections::HashMap; -use std::io::{self as stdio, BufReader, Write}; +use std::io::{self as stdio, BufReader, Read, Write}; use std::fs::File; use std::path::PathBuf; use util::sha3::sha3; @@ -190,21 +190,26 @@ fn sync_main(alt_mains: &mut HashMap) { } // TODO: merge with version in Updater. -fn updates_latest() -> PathBuf { +fn updates_path(name: &str) -> PathBuf { let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); dest.push(".parity-updates"); - dest.push("parity"); + dest.push(name); dest } +fn latest_exe_path() -> Option { + File::open(updates_path("latest")).ok() + .and_then(|mut f| { let mut exe = String::new(); f.read_to_string(&mut exe).ok().map(|_| updates_path(&exe)) }) +} + // Starts ~/.parity-updates/parity and returns the code it exits with. fn run_parity() -> Option { - let exe = updates_latest(); - process::Command::new(exe) - .args(&env::args_os().collect::>()) - .status() - .map(|es| es.code().unwrap_or(128)) - .ok() + latest_exe_path().and_then(|exe| process::Command::new(exe) + .args(&env::args_os().collect::>()) + .status() + .map(|es| es.code().unwrap_or(128)) + .ok() + ) } const PLEASE_RESTART_EXIT_CODE: i32 = 69; @@ -254,16 +259,17 @@ fn main() { let force_direct = std::env::args().any(|arg| arg == "--force-direct"); let exe = std::env::current_exe().ok(); let development = exe.as_ref().and_then(|p| p.parent().and_then(|p| p.parent()).and_then(|p| p.file_name()).map(|n| n == "target")).unwrap_or(false); - let same_name = exe.as_ref().and_then(|p| p.file_stem().map(|s| s == "parity")).unwrap_or(false); - let have_update = updates_latest().exists(); - let is_non_updated_current = exe.map_or(false, |p| p.canonicalize().ok() != updates_latest().canonicalize().ok()); + let same_name = exe.as_ref().map(|p| p.file_stem().map_or(false, |s| s == "parity") && p.extension().map_or(true, |x| x == "exe")).unwrap_or(false); + let latest_exe = latest_exe_path(); + let have_update = latest_exe.as_ref().map_or(false, |p| p.exists()); + let is_non_updated_current = exe.map_or(false, |exe| latest_exe.as_ref().map_or(false, |lexe| exe.canonicalize().ok() != lexe.canonicalize().ok())); trace_main!("Starting up {} (force-direct: {}, development: {}, same-name: {}, have-update: {}, non-updated-current: {})", std::env::current_exe().map(|x| format!("{}", x.display())).unwrap_or("".to_owned()), force_direct, development, same_name, have_update, is_non_updated_current); if !force_direct && !development && same_name && have_update && is_non_updated_current { // looks like we're not running ~/.parity-updates/parity when the user is expecting otherwise. // Everything run inside a loop, so we'll be able to restart from the child into a new version seamlessly. loop { // If we fail to run the updated parity then fallback to local version. - trace_main!("Attempting to run latest update..."); + trace_main!("Attempting to run latest update ({})...", latest_exe.as_ref().expect("guarded by have_update; latest_exe must exist for have_update; qed").display()); let exit_code = run_parity().unwrap_or_else(|| { trace_main!("Falling back to local..."); main_direct() }); trace_main!("Latest exited with {}", exit_code); if exit_code != PLEASE_RESTART_EXIT_CODE { diff --git a/parity/updater.rs b/parity/updater.rs index 7da7a6dc835..79abdbe1a1d 100644 --- a/parity/updater.rs +++ b/parity/updater.rs @@ -15,8 +15,9 @@ // along with Parity. If not, see . use std::sync::{Arc, Weak}; -use std::{io, os, fs, env}; -use std::path::{Path, PathBuf}; +use std::{fs, env}; +use std::io::Write; +use std::path::{PathBuf}; use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; use super::operations::Operations; @@ -113,16 +114,6 @@ fn platform() -> String { "test".to_owned() } -#[cfg(windows)] -fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { - os::windows::fs::symlink_file(src, dst) -} - -#[cfg(not(windows))] -fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { - os::unix::fs::symlink(src, dst) -} - impl Updater { pub fn new(client: Weak, update_policy: UpdatePolicy) -> Arc { let mut u = Updater { @@ -170,10 +161,10 @@ impl Updater { (|| -> Result { let mut s = self.state.lock(); if let Some(r) = s.ready.take() { - let p = Self::update_file_path(&r.version); - let n = Self::updates_latest(); - let _ = fs::remove_file(&n); - match symlink(p, n) { + let p = Self::update_file_name(&r.version); + let n = Self::updates_path("latest"); + // TODO: creating then writing is a bit fragile. would be nice to make it atomic. + match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { Ok(_) => { info!("Completed upgrade to {}", &r.version); s.installed = Some(r); @@ -249,17 +240,14 @@ impl Updater { } } - fn update_file_path(v: &VersionInfo) -> PathBuf { - let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); - dest.push(".parity-updates"); - dest.push(format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash)); - dest + fn update_file_name(v: &VersionInfo) -> String { + format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash) } - fn updates_latest() -> PathBuf { + fn updates_path(name: &str) -> PathBuf { let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); dest.push(".parity-updates"); - dest.push("parity"); + dest.push(name); dest } @@ -270,7 +258,7 @@ impl Updater { let fetched = s.fetching.take().unwrap(); let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); - let dest = Self::update_file_path(&fetched.version); + let dest = Self::updates_path(&Self::update_file_name(&fetched.version)); fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; info!("Copied file to {}", dest.display()); From d9f6ea56ef64926160e9ba37af3fe3dc155f06af Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 04:05:02 +0100 Subject: [PATCH 27/87] Don't restart if we're not in the cradle. --- parity/cli/usage.txt | 3 +++ parity/main.rs | 29 ++++++++++++++++------------- parity/run.rs | 15 ++++++++++----- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index 797a5443e40..cc7736d31e1 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -351,6 +351,9 @@ Legacy Options: --extradata STRING Equivalent to --extra-data STRING. --cache MB Equivalent to --cache-size MB. +Internal Options: + --can-restart Executable will auto-restart if exiting with 125. + Miscellaneous Options: -c --config CONFIG Specify a filename containing a configuration file. (default: {flag_config}) diff --git a/parity/main.rs b/parity/main.rs index a435e6230cc..9d627b363e3 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -142,12 +142,12 @@ enum PostExecutionAction { Quit, } -fn execute(command: Execute) -> Result { +fn execute(command: Execute, can_restart: bool) -> Result { let logger = setup_log(&command.logger).expect("Logger is initialized only once; qed"); match command.cmd { Cmd::Run(run_cmd) => { - let restart = run::execute(run_cmd, logger)?; + let restart = run::execute(run_cmd, can_restart, logger)?; Ok(if restart { PostExecutionAction::Restart } else { PostExecutionAction::Quit }) }, Cmd::Version => Ok(PostExecutionAction::Print(Args::print_version())), @@ -160,7 +160,7 @@ fn execute(command: Execute) -> Result { } } -fn start() -> Result { +fn start(can_restart: bool) -> Result { let args: Vec = env::args().collect(); let conf = Configuration::parse(&args).unwrap_or_else(|e| e.exit()); @@ -170,7 +170,7 @@ fn start() -> Result { } let cmd = try!(conf.into_command()); - execute(cmd) + execute(cmd, can_restart) } #[cfg(not(feature="stratum"))] @@ -204,19 +204,21 @@ fn latest_exe_path() -> Option { // Starts ~/.parity-updates/parity and returns the code it exits with. fn run_parity() -> Option { + use ::std::ffi::OsString; + let prefix = vec![OsString::from("--can-restart"), OsString::from("--force-direct")]; latest_exe_path().and_then(|exe| process::Command::new(exe) - .args(&env::args_os().collect::>()) - .status() - .map(|es| es.code().unwrap_or(128)) - .ok() - ) + .args(&(env::args_os().chain(prefix.into_iter()).collect::>())) + .status() + .map(|es| es.code().unwrap_or(128)) + .ok() + ) } const PLEASE_RESTART_EXIT_CODE: i32 = 69; // Run our version of parity. // Returns the exit error code. -fn main_direct() -> i32 { +fn main_direct(can_restart: bool) -> i32 { let mut alt_mains = HashMap::new(); sync_main(&mut alt_mains); stratum_main(&mut alt_mains); @@ -224,7 +226,7 @@ fn main_direct() -> i32 { f(); 0 } else { - match start() { + match start(can_restart) { Ok(result) => match result { PostExecutionAction::Print(s) => { info!("{}", s); 0 }, PostExecutionAction::Restart => PLEASE_RESTART_EXIT_CODE, @@ -270,7 +272,7 @@ fn main() { loop { // If we fail to run the updated parity then fallback to local version. trace_main!("Attempting to run latest update ({})...", latest_exe.as_ref().expect("guarded by have_update; latest_exe must exist for have_update; qed").display()); - let exit_code = run_parity().unwrap_or_else(|| { trace_main!("Falling back to local..."); main_direct() }); + let exit_code = run_parity().unwrap_or_else(|| { trace_main!("Falling back to local..."); main_direct(true) }); trace_main!("Latest exited with {}", exit_code); if exit_code != PLEASE_RESTART_EXIT_CODE { trace_main!("Quitting..."); @@ -281,6 +283,7 @@ fn main() { } else { trace_main!("Running direct"); // Otherwise, we're presumably running the version we want. Just run and fall-through. - process::exit(main_direct()); + let can_restart = std::env::args().any(|arg| arg == "--can-restart"); + process::exit(main_direct(can_restart)); } } diff --git a/parity/run.rs b/parity/run.rs index 7d7fbff0cf3..26e88eb597d 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -116,7 +116,7 @@ pub fn open_ui(dapps_conf: &dapps::Configuration, signer_conf: &signer::Configur Ok(()) } -pub fn execute(cmd: RunCmd, logger: Arc) -> Result { +pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc) -> Result { if cmd.ui && cmd.dapps_conf.enabled { // Check if Parity is already running let addr = format!("{}:{}", cmd.dapps_conf.interface, cmd.dapps_conf.port); @@ -415,7 +415,7 @@ pub fn execute(cmd: RunCmd, logger: Arc) -> Result } // Handle exit - wait_for_exit(panic_handler, http_server, ipc_server, dapps_server, signer_server, updater); + wait_for_exit(panic_handler, http_server, ipc_server, dapps_server, signer_server, updater, can_restart); info!("Finishing work, please wait..."); @@ -472,7 +472,8 @@ fn wait_for_exit( _ipc_server: Option, _dapps_server: Option, _signer_server: Option, - updater: Arc + updater: Arc, + can_restart: bool ) -> bool { let exit = Arc::new((Mutex::new(false), Condvar::new())); @@ -485,8 +486,12 @@ fn wait_for_exit( panic_handler.on_panic(move |_reason| { e.1.notify_all(); }); // Handle updater wanting to restart us - let e = exit.clone(); - updater.set_exit_handler(move || { *e.0.lock() = true; e.1.notify_all(); }); + if can_restart { + let e = exit.clone(); + updater.set_exit_handler(move || { *e.0.lock() = true; e.1.notify_all(); }); + } else { + updater.set_exit_handler(|| info!("Update installed; ready for restart.")); + } // Wait for signal let mut l = exit.0.lock(); From 8d7a63bbea5675809ea02d53766e0f5ad8313d84 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 13:10:33 +0100 Subject: [PATCH 28/87] Join up the final dots. --- parity/run.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parity/run.rs b/parity/run.rs index 26e88eb597d..04085cd588b 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -415,7 +415,7 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc) -> R } // Handle exit - wait_for_exit(panic_handler, http_server, ipc_server, dapps_server, signer_server, updater, can_restart); + let restart = wait_for_exit(panic_handler, http_server, ipc_server, dapps_server, signer_server, updater, can_restart); info!("Finishing work, please wait..."); @@ -428,7 +428,7 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc) -> R // terminated gracefully drop(hypervisor); - Ok(false) + Ok(restart) } #[cfg(not(windows))] From 5bf9fa9168d7c652bbcd1477db1e4524ef28b0d5 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 13:35:00 +0100 Subject: [PATCH 29/87] Allow reuse of previous logger. --- logger/src/lib.rs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/logger/src/lib.rs b/logger/src/lib.rs index 1e1555c7c6d..377f5d4519d 100644 --- a/logger/src/lib.rs +++ b/logger/src/lib.rs @@ -27,12 +27,12 @@ extern crate time; extern crate lazy_static; use std::{env, thread, fs}; -use std::sync::Arc; +use std::sync::{Weak, Arc}; use std::io::Write; use isatty::{stderr_isatty, stdout_isatty}; use env_logger::LogBuilder; use regex::Regex; -use util::RotatingLogger; +use util::{Mutex, RotatingLogger} ; use util::log::Colour; #[derive(Debug, PartialEq, Clone)] @@ -52,6 +52,10 @@ impl Default for Config { } } +lazy_static! { + static ref ROTATING_LOGGER : Mutex> = Mutex::new(Default::default()); +} + /// Sets up the logger pub fn setup_log(config: &Config) -> Result, String> { use rlog::*; @@ -121,9 +125,17 @@ pub fn setup_log(config: &Config) -> Result, String> { }; builder.format(format); - builder.init().expect("Logger initialized only once."); - - Ok(logs) + builder.init() + .and_then(|_| { + *ROTATING_LOGGER.lock() = Arc::downgrade(&logs); + Ok(logs) + }) + // couldn't create new logger - try to fall back on previous logger. + .or_else(|err| match ROTATING_LOGGER.lock().upgrade() { + Some(l) => Ok(l), + // no previous logger. fatal. + None => Err(format!("{:?}", err)), + }) } fn kill_color(s: &str) -> String { From 0e17cf8d3ad9d5700927b5f0f68953b08b5288c6 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 15:41:49 +0100 Subject: [PATCH 30/87] Fix tests. --- dapps/src/tests/helpers.rs | 2 +- parity/cli/config.full.toml | 4 ++++ parity/configuration.rs | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dapps/src/tests/helpers.rs b/dapps/src/tests/helpers.rs index 66bf0f8eba7..289753dbfee 100644 --- a/dapps/src/tests/helpers.rs +++ b/dapps/src/tests/helpers.rs @@ -65,7 +65,7 @@ fn init_logger() { if let Ok(log) = env::var("RUST_LOG") { let mut builder = LogBuilder::new(); builder.parse(&log); - builder.init().expect("Logger is initialized only once."); + let _ = builder.init(); // ignore errors since ./test.sh will call this multiple times. } } diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index 48dac61d3d2..2f420e0a7f9 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -2,6 +2,10 @@ mode = "last" mode_timeout = 300 mode_alarm = 3600 +auto_update = "critical" +no_download = false +no_consensus = false + chain = "homestead" db_path = "$HOME/.parity" keys_path = "$HOME/.parity/keys" diff --git a/parity/configuration.rs b/parity/configuration.rs index c9358cd35e5..74a936fb5c2 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -746,7 +746,7 @@ mod tests { use super::*; use cli::Args; use ethcore_rpc::NetworkSettings; - use ethcore::client::{VMType, BlockId, UpdatePolicy, UpdateFilter}; + use ethcore::client::{VMType, BlockId}; use ethcore::miner::{MinerOptions, PrioritizationStrategy}; use helpers::{replace_home, default_network_config}; use run::RunCmd; @@ -755,6 +755,7 @@ mod tests { use presale::ImportWallet; use account::{AccountCmd, NewAccount, ImportAccounts}; use devtools::{RandomTempPath}; + use updater::{UpdatePolicy, UpdateFilter}; use std::io::Write; use std::fs::{File, create_dir}; @@ -942,7 +943,7 @@ mod tests { acc_conf: Default::default(), gas_pricer: Default::default(), miner_extras: Default::default(), - update_policy: Default::default(), + update_policy: UpdatePolicy { enable_downloading: true, filter: UpdateFilter::Critical }, mode: Default::default(), tracing: Default::default(), compaction: Default::default(), From 22cb5753d0450ac14594f4f174a581eeb10ca696 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 16:52:41 +0100 Subject: [PATCH 31/87] Improve capability information and disable old clients. --- ethcore/src/client/client.rs | 17 +++++++++ ethcore/src/client/test_client.rs | 2 + ethcore/src/client/traits.rs | 6 ++- parity/configuration.rs | 13 +++---- parity/run.rs | 1 - parity/updater.rs | 62 ++++++++++++++++++++++++++----- 6 files changed, 83 insertions(+), 18 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 7fa714e8f7c..f07f7328d06 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -127,6 +127,7 @@ impl SleepState { /// Blockchain database client backed by a persistent database. Owns and manages a blockchain and a block queue. /// Call `import_block()` to import a block asynchronously; `flush_queue()` flushes the queue. pub struct Client { + enabled: AtomicBool, mode: Mutex, chain: RwLock>, tracedb: RwLock>, @@ -164,6 +165,7 @@ impl Client { message_channel: IoChannel, db_config: &DatabaseConfig, ) -> Result, ClientError> { + let path = path.to_path_buf(); let gb = spec.genesis_block(); @@ -226,6 +228,7 @@ impl Client { }; let client = Arc::new(Client { + enabled: AtomicBool::new(true), sleep_state: Mutex::new(SleepState::new(awake)), liveness: AtomicBool::new(awake), mode: Mutex::new(config.mode.clone()), @@ -411,6 +414,12 @@ impl Client { /// This is triggered by a message coming from a block queue when the block is ready for insertion pub fn import_verified_blocks(&self) -> usize { + + // Shortcut out if we know we're incapable of syncing the chain. + if !self.enabled.load(AtomicOrdering::Relaxed) { + return 0; + } + let max_blocks_to_import = 4; let (imported_blocks, import_results, invalid_blocks, imported, duration, is_empty) = { let mut imported_blocks = Vec::with_capacity(max_blocks_to_import); @@ -909,8 +918,16 @@ impl BlockChainClient for Client { r } + fn disable(&self) { + self.set_mode(IpcMode::Off); + self.enabled.store(false, AtomicOrdering::Relaxed); + } + fn set_mode(&self, new_mode: IpcMode) { trace!(target: "mode", "Client::set_mode({:?})", new_mode); + if !self.enabled.load(AtomicOrdering::Relaxed) { + return; + } { let mut mode = self.mode.lock(); *mode = new_mode.clone().into(); diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index dd37a3c02f9..ba2b0f11bf3 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -677,6 +677,8 @@ impl BlockChainClient for TestBlockChainClient { fn set_mode(&self, _: Mode) { unimplemented!(); } + fn disable(&self) { unimplemented!(); } + fn pruning_info(&self) -> PruningInfo { PruningInfo { earliest_chain: 1, diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 8f5d4c77aa7..8c36ac3825a 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -54,7 +54,7 @@ pub trait BlockChainClient : Sync + Send { /// Look up the block number for the given block ID. fn block_number(&self, id: BlockId) -> Option; - + /// Get raw block body data by block id. /// Block body is an RLP list of two items: uncles and transactions. fn block_body(&self, id: BlockId) -> Option; @@ -252,6 +252,10 @@ pub trait BlockChainClient : Sync + Send { /// Set the mode. fn set_mode(&self, mode: Mode); + /// Disable the client from importing blocks. This cannot be undone in this session and indicates + /// that a subsystem has reason to believe this executable incapable of syncing the chain. + fn disable(&self); + /// Returns engine-related extra info for `BlockId`. fn block_extra_info(&self, id: BlockId) -> Option>; diff --git a/parity/configuration.rs b/parity/configuration.rs index 74a936fb5c2..e690437b902 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -282,7 +282,6 @@ impl Configuration { no_periodic_snapshot: self.args.flag_no_periodic_snapshot, check_seal: !self.args.flag_no_seal_check, download_old_blocks: !self.args.flag_no_ancient_blocks, - require_consensus: !self.args.flag_no_consensus, serve_light: self.args.flag_serve_light, verifier_settings: verifier_settings, }; @@ -628,6 +627,7 @@ impl Configuration { fn update_policy(&self) -> Result { Ok(UpdatePolicy { enable_downloading: !self.args.flag_no_download, + require_consensus: !self.args.flag_no_consensus, filter: match self.args.flag_auto_update.as_ref() { "none" => UpdateFilter::None, "critical" => UpdateFilter::Critical, @@ -943,7 +943,7 @@ mod tests { acc_conf: Default::default(), gas_pricer: Default::default(), miner_extras: Default::default(), - update_policy: UpdatePolicy { enable_downloading: true, filter: UpdateFilter::Critical }, + update_policy: UpdatePolicy { enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical }, mode: Default::default(), tracing: Default::default(), compaction: Default::default(), @@ -961,7 +961,6 @@ mod tests { no_periodic_snapshot: false, check_seal: true, download_old_blocks: true, - require_consensus: true, serve_light: false, verifier_settings: Default::default(), })); @@ -992,14 +991,14 @@ mod tests { fn should_parse_updater_options() { // when let conf0 = parse(&["parity"]); - let conf1 = parse(&["parity", "--auto-update", "all"]); + let conf1 = parse(&["parity", "--auto-update", "all", "--no-consensus"]); let conf2 = parse(&["parity", "--no-download", "--auto-update=all"]); let conf3 = parse(&["parity", "--auto-update=xxx"]); // then - assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::Critical}); - assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::All}); - assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::All}); + assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical}); + assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: false, filter: UpdateFilter::All}); + assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, require_consensus: true, filter: UpdateFilter::All}); assert!(conf3.update_policy().is_err()); } diff --git a/parity/run.rs b/parity/run.rs index 04085cd588b..7a583a39d25 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -94,7 +94,6 @@ pub struct RunCmd { pub no_periodic_snapshot: bool, pub check_seal: bool, pub download_old_blocks: bool, - pub require_consensus: bool, pub serve_light: bool, pub verifier_settings: VerifierSettings, } diff --git a/parity/updater.rs b/parity/updater.rs index 79abdbe1a1d..a13ae32ff99 100644 --- a/parity/updater.rs +++ b/parity/updater.rs @@ -40,6 +40,8 @@ pub enum UpdateFilter { pub struct UpdatePolicy { /// Download potential updates. pub enable_downloading: bool, + /// Disable client if we know we're incapable of syncing. + pub require_consensus: bool, /// Which of those downloaded should be automatically installed. pub filter: UpdateFilter, } @@ -48,6 +50,7 @@ impl Default for UpdatePolicy { fn default() -> Self { UpdatePolicy { enable_downloading: false, + require_consensus: true, filter: UpdateFilter::None, } } @@ -81,6 +84,23 @@ pub struct OperationsInfo { pub minor: Option, } +/// Information on the current version's consensus capabililty. +#[derive(Debug, Clone, Copy, PartialEq)] +pub enum CapState { + /// Unknown. + Unknown, + /// Capable of consensus indefinitely. + Capable, + /// Capable of consensus up until a definite block. + CapableUntil(u64), + /// Incapable of consensus since a particular block. + IncapableSince(u64), +} + +impl Default for CapState { + fn default() -> Self { CapState::Unknown } +} + #[derive(Debug, Default)] struct UpdaterState { latest: Option, @@ -88,6 +108,8 @@ struct UpdaterState { fetching: Option, ready: Option, installed: Option, + + capability: CapState, } /// Service for checking for updates and determining whether we can achieve consensus. @@ -135,18 +157,16 @@ impl Updater { let r = Arc::new(u); *r.fetcher.lock() = Some(fetch::Client::new(r.clone())); *r.weak_self.lock() = Arc::downgrade(&r); + + r.poll(); + r } /// Is the currently running client capable of supporting the current chain? - /// `Some` answer or `None` if information on the running client is not available. - pub fn is_capable(&self) -> Option { - self.state.lock().latest.as_ref().and_then(|latest| { - latest.this_fork.map(|this_fork| { - let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); - this_fork >= latest.fork || current_number < latest.fork - }) - }) + /// We default to true if there's no clear information. + pub fn capability(&self) -> CapState { + self.state.lock().capability } /// The release which is ready to be upgraded to, if any. If this returns `Some`, then @@ -294,6 +314,7 @@ impl Updater { let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); + let mut capability = CapState::Unknown; let latest = self.collect_latest().ok(); if let Some(ref latest) = latest { info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", @@ -321,8 +342,31 @@ impl Updater { } } info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); + + if let Some(this_fork) = latest.this_fork { + if this_fork < latest.fork { + // We're behind the latest fork. Now is the time to be upgrading; perhaps we're too late... + if let Some(c) = self.client.upgrade() { + let current_number = c.block_number(BlockId::Latest).unwrap_or(0); + if current_number >= latest.fork - 1 { + // We're at (or past) the last block we can import. Disable the client. + if self.update_policy.require_consensus { + c.disable(); + } + capability = CapState::IncapableSince(latest.fork); + } else { + capability = CapState::CapableUntil(latest.fork); + } + } + } else { + capability = CapState::Capable; + } + } } - (*self.state.lock()).latest = latest; + + let mut s = self.state.lock(); + s.latest = latest; + s.capability = capability; } } From e09b1faf208b91c951bde81429ca14b6deb9c8bf Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 17:13:26 +0100 Subject: [PATCH 32/87] Fix semver version issues. --- Cargo.lock | 14 +++++++------- Cargo.toml | 2 +- db/Cargo.toml | 2 +- ethcore/Cargo.toml | 2 +- ipc/hypervisor/Cargo.toml | 2 +- ipc/rpc/Cargo.toml | 2 +- ipc/tests/Cargo.toml | 2 +- stratum/Cargo.toml | 2 +- sync/Cargo.toml | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1110073215c..13e9bc51fad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ dependencies = [ "rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (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.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -318,7 +318,7 @@ dependencies = [ "rlp 0.1.0", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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)", "transient-hashmap 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -408,7 +408,7 @@ dependencies = [ "ethcore-devtools 1.5.0", "ethcore-util 1.5.0", "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", - "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -431,7 +431,7 @@ dependencies = [ "ethcore-ipc-nano 1.5.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)", - "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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)", ] @@ -456,7 +456,7 @@ dependencies = [ "ethcore-util 1.5.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)", - "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -576,7 +576,7 @@ dependencies = [ "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)", "mio 0.5.1 (git+https://github.com/ethcore/mio?branch=v0.5.x)", - "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -693,7 +693,7 @@ dependencies = [ "parking_lot 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.1.0", - "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "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)", ] diff --git a/Cargo.toml b/Cargo.toml index b4020f19835..beab0717724 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ time = "0.1" num_cpus = "0.2" number_prefix = "0.2" rpassword = "0.2.1" -semver = "0.2" +semver = "0.5" ansi_term = "0.7" lazy_static = "0.2" regex = "0.1" diff --git a/db/Cargo.toml b/db/Cargo.toml index 9642ed88298..2a327e5e3d1 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -15,7 +15,7 @@ clippy = { version = "0.0.103", optional = true} ethcore-devtools = { path = "../devtools" } ethcore-ipc = { path = "../ipc/rpc" } rocksdb = { git = "https://github.com/ethcore/rust-rocksdb" } -semver = "0.2" +semver = "0.5" ethcore-ipc-nano = { path = "../ipc/nano" } nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } crossbeam = "0.2" diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 17c5d3a04af..c6823952951 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -21,7 +21,7 @@ crossbeam = "0.2.9" lazy_static = "0.2" bloomchain = "0.1" rayon = "0.4.2" -semver = "0.2" +semver = "0.5" bit-set = "0.4" time = "0.1" rand = "0.3" diff --git a/ipc/hypervisor/Cargo.toml b/ipc/hypervisor/Cargo.toml index d730b9bcfc0..cd0fb456197 100644 --- a/ipc/hypervisor/Cargo.toml +++ b/ipc/hypervisor/Cargo.toml @@ -11,7 +11,7 @@ build = "build.rs" ethcore-ipc = { path = "../rpc" } nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } ethcore-ipc-nano = { path = "../nano" } -semver = "0.2" +semver = "0.5" log = "0.3" time = "0.1" diff --git a/ipc/rpc/Cargo.toml b/ipc/rpc/Cargo.toml index 1aecb32928a..f9d39054707 100644 --- a/ipc/rpc/Cargo.toml +++ b/ipc/rpc/Cargo.toml @@ -10,4 +10,4 @@ license = "GPL-3.0" ethcore-devtools = { path = "../../devtools" } nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } ethcore-util = { path = "../../util" } -semver = "0.2" +semver = "0.5" diff --git a/ipc/tests/Cargo.toml b/ipc/tests/Cargo.toml index 23bde87e22e..7f10edaa72f 100644 --- a/ipc/tests/Cargo.toml +++ b/ipc/tests/Cargo.toml @@ -10,7 +10,7 @@ path = "run.rs" [dependencies] ethcore-ipc = { path = "../rpc" } ethcore-devtools = { path = "../../devtools" } -semver = "0.2" +semver = "0.5" nanomsg = { git = "https://github.com/ethcore/nanomsg.rs.git" } ethcore-ipc-nano = { path = "../nano" } ethcore-util = { path = "../../util" } diff --git a/stratum/Cargo.toml b/stratum/Cargo.toml index 609f4ee9bbc..f3ff1bc8e81 100644 --- a/stratum/Cargo.toml +++ b/stratum/Cargo.toml @@ -19,7 +19,7 @@ ethcore-devtools = { path = "../devtools" } lazy_static = "0.2" env_logger = "0.3" ethcore-ipc = { path = "../ipc/rpc" } -semver = "0.2" +semver = "0.5" ethcore-ipc-nano = { path = "../ipc/nano" } [profile.release] diff --git a/sync/Cargo.toml b/sync/Cargo.toml index f4166bbe5f5..484d4bb1746 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -25,7 +25,7 @@ time = "0.1.34" rand = "0.3.13" heapsize = "0.3" ethcore-ipc = { path = "../ipc/rpc" } -semver = "0.2" +semver = "0.5" ethcore-ipc-nano = { path = "../ipc/nano" } ethcore-devtools = { path = "../devtools" } ethkey = { path = "../ethkey" } From 10b0898bdf9a3784f3804af9f43c2b80d375a934 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 19:14:42 +0100 Subject: [PATCH 33/87] Crate tidyups. - Move Updater into its own crate. - Change ethcore -> parity in authors, homepages and licenses. --- Cargo.lock | 42 +- Cargo.toml | 16 +- build.rs | 2 +- dapps/Cargo.toml | 4 +- dapps/build.rs | 2 +- dapps/js-glue/Cargo.toml | 2 +- dapps/js-glue/build.rs | 2 +- dapps/js-glue/src/codegen.rs | 2 +- dapps/js-glue/src/js.rs | 2 +- dapps/js-glue/src/lib.rs | 2 +- dapps/js-glue/src/lib.rs.in | 2 +- dapps/src/api/api.rs | 2 +- dapps/src/api/mod.rs | 2 +- dapps/src/api/response.rs | 2 +- dapps/src/api/types.rs | 2 +- dapps/src/api/types.rs.in | 2 +- dapps/src/apps/cache.rs | 2 +- dapps/src/apps/fetcher.rs | 2 +- dapps/src/apps/fs.rs | 2 +- dapps/src/apps/manifest.rs | 2 +- dapps/src/apps/mod.rs | 2 +- dapps/src/endpoint.rs | 2 +- dapps/src/handlers/auth.rs | 2 +- dapps/src/handlers/content.rs | 2 +- dapps/src/handlers/echo.rs | 2 +- dapps/src/handlers/fetch.rs | 2 +- dapps/src/handlers/mod.rs | 2 +- dapps/src/handlers/redirect.rs | 2 +- dapps/src/lib.rs | 4 +- dapps/src/page/builtin.rs | 2 +- dapps/src/page/handler.rs | 2 +- dapps/src/page/local.rs | 2 +- dapps/src/page/mod.rs | 2 +- dapps/src/proxypac.rs | 2 +- dapps/src/router/auth.rs | 2 +- dapps/src/router/host_validation.rs | 2 +- dapps/src/router/mod.rs | 2 +- dapps/src/rpc.rs | 2 +- dapps/src/tests/api.rs | 2 +- dapps/src/tests/authorization.rs | 2 +- dapps/src/tests/fetch.rs | 2 +- dapps/src/tests/helpers.rs | 2 +- dapps/src/tests/mod.rs | 2 +- dapps/src/tests/redirection.rs | 2 +- dapps/src/tests/validation.rs | 2 +- dapps/src/url.rs | 2 +- dapps/ui/Cargo.toml | 4 +- dapps/ui/src/lib.rs | 2 +- db/Cargo.toml | 4 +- db/build.rs | 2 +- db/src/database.rs | 2 +- db/src/lib.rs | 2 +- db/src/lib.rs.in | 2 +- db/src/traits.rs | 2 +- devtools/Cargo.toml | 4 +- devtools/src/http_client.rs | 2 +- devtools/src/lib.rs | 2 +- devtools/src/random_path.rs | 2 +- devtools/src/stop_guard.rs | 2 +- devtools/src/test_socket.rs | 2 +- ethash/Cargo.toml | 2 +- ethash/src/compute.rs | 2 +- ethash/src/lib.rs | 2 +- ethcore/Cargo.toml | 4 +- ethcore/build.rs | 2 +- ethcore/hash-fetch/Cargo.toml | 15 - ethcore/hash-fetch/res/registrar.json | 21 - ethcore/hash-fetch/res/urlhint.json | 6 - ethcore/hash-fetch/src/client.rs | 119 ----- ethcore/hash-fetch/src/lib.rs | 33 -- ethcore/hash-fetch/src/urlhint.rs | 409 ------------------ ethcore/light/Cargo.toml | 2 +- ethcore/light/build.rs | 2 +- ethcore/light/src/client.rs | 2 +- ethcore/light/src/lib.rs | 2 +- ethcore/light/src/net/buffer_flow.rs | 2 +- ethcore/light/src/net/context.rs | 2 +- ethcore/light/src/net/error.rs | 2 +- ethcore/light/src/net/mod.rs | 2 +- ethcore/light/src/net/status.rs | 2 +- ethcore/light/src/net/tests/mod.rs | 2 +- ethcore/light/src/provider.rs | 2 +- ethcore/light/src/types/les_request.rs | 2 +- ethcore/light/src/types/mod.rs | 2 +- ethcore/light/src/types/mod.rs.in | 2 +- ethcore/src/account_db.rs | 2 +- ethcore/src/account_provider/mod.rs | 2 +- ethcore/src/account_provider/stores.rs | 2 +- ethcore/src/action_params.rs | 2 +- ethcore/src/basic_types.rs | 2 +- ethcore/src/block.rs | 2 +- ethcore/src/blockchain/best_block.rs | 2 +- ethcore/src/blockchain/block_info.rs | 2 +- ethcore/src/blockchain/blockchain.rs | 2 +- ethcore/src/blockchain/cache.rs | 2 +- ethcore/src/blockchain/config.rs | 2 +- ethcore/src/blockchain/extras.rs | 2 +- ethcore/src/blockchain/generator/block.rs | 2 +- ethcore/src/blockchain/generator/bloom.rs | 2 +- ethcore/src/blockchain/generator/complete.rs | 2 +- ethcore/src/blockchain/generator/fork.rs | 2 +- ethcore/src/blockchain/generator/generator.rs | 2 +- ethcore/src/blockchain/generator/mod.rs | 2 +- .../src/blockchain/generator/transaction.rs | 2 +- ethcore/src/blockchain/import_route.rs | 2 +- ethcore/src/blockchain/mod.rs | 2 +- ethcore/src/blooms/bloom.rs | 2 +- ethcore/src/blooms/bloom_group.rs | 2 +- ethcore/src/blooms/group_position.rs | 2 +- ethcore/src/blooms/mod.rs | 2 +- ethcore/src/builtin.rs | 2 +- ethcore/src/cache_manager.rs | 2 +- ethcore/src/client/chain_notify.rs | 2 +- ethcore/src/client/client.rs | 2 +- ethcore/src/client/config.rs | 2 +- ethcore/src/client/error.rs | 2 +- ethcore/src/client/mod.rs | 2 +- ethcore/src/client/test_client.rs | 2 +- ethcore/src/client/traits.rs | 2 +- ethcore/src/db.rs | 2 +- ethcore/src/engines/authority_round.rs | 2 +- ethcore/src/engines/basic_authority.rs | 2 +- ethcore/src/engines/instant_seal.rs | 2 +- ethcore/src/engines/mod.rs | 2 +- ethcore/src/engines/null_engine.rs | 2 +- ethcore/src/env_info.rs | 2 +- ethcore/src/error.rs | 2 +- ethcore/src/ethereum/denominations.rs | 2 +- ethcore/src/ethereum/ethash.rs | 2 +- ethcore/src/ethereum/mod.rs | 2 +- ethcore/src/evm/benches/mod.rs | 2 +- ethcore/src/evm/evm.rs | 2 +- ethcore/src/evm/ext.rs | 2 +- ethcore/src/evm/factory.rs | 2 +- ethcore/src/evm/instructions.rs | 2 +- ethcore/src/evm/interpreter/gasometer.rs | 2 +- ethcore/src/evm/interpreter/informant.rs | 2 +- ethcore/src/evm/interpreter/memory.rs | 2 +- ethcore/src/evm/interpreter/mod.rs | 2 +- ethcore/src/evm/interpreter/shared_cache.rs | 2 +- ethcore/src/evm/interpreter/stack.rs | 2 +- ethcore/src/evm/jit.rs | 2 +- ethcore/src/evm/mod.rs | 2 +- ethcore/src/evm/schedule.rs | 2 +- ethcore/src/evm/tests.rs | 2 +- ethcore/src/executive.rs | 2 +- ethcore/src/externalities.rs | 2 +- ethcore/src/factory.rs | 2 +- ethcore/src/header.rs | 2 +- ethcore/src/json_tests/chain.rs | 2 +- ethcore/src/json_tests/eip150_state.rs | 2 +- ethcore/src/json_tests/eip161_state.rs | 2 +- ethcore/src/json_tests/executive.rs | 2 +- ethcore/src/json_tests/homestead_chain.rs | 2 +- ethcore/src/json_tests/homestead_state.rs | 2 +- ethcore/src/json_tests/mod.rs | 2 +- ethcore/src/json_tests/state.rs | 2 +- ethcore/src/json_tests/test_common.rs | 2 +- ethcore/src/json_tests/transaction.rs | 2 +- ethcore/src/json_tests/trie.rs | 2 +- ethcore/src/lib.rs | 2 +- ethcore/src/migrations/blocks/mod.rs | 2 +- ethcore/src/migrations/blocks/v8.rs | 2 +- ethcore/src/migrations/extras/mod.rs | 2 +- ethcore/src/migrations/extras/v6.rs | 2 +- ethcore/src/migrations/mod.rs | 2 +- ethcore/src/migrations/state/mod.rs | 2 +- ethcore/src/migrations/state/v7.rs | 2 +- ethcore/src/migrations/v10.rs | 2 +- ethcore/src/migrations/v9.rs | 2 +- ethcore/src/miner/banning_queue.rs | 2 +- ethcore/src/miner/external.rs | 2 +- ethcore/src/miner/local_transactions.rs | 2 +- ethcore/src/miner/miner.rs | 2 +- ethcore/src/miner/mod.rs | 2 +- ethcore/src/miner/price_info.rs | 2 +- ethcore/src/miner/transaction_queue.rs | 2 +- ethcore/src/miner/work_notify.rs | 2 +- ethcore/src/pod_account.rs | 2 +- ethcore/src/pod_state.rs | 2 +- ethcore/src/service.rs | 2 +- ethcore/src/snapshot/account.rs | 2 +- ethcore/src/snapshot/block.rs | 2 +- ethcore/src/snapshot/error.rs | 2 +- ethcore/src/snapshot/io.rs | 2 +- ethcore/src/snapshot/mod.rs | 2 +- ethcore/src/snapshot/service.rs | 2 +- .../src/snapshot/snapshot_service_trait.rs | 2 +- ethcore/src/snapshot/tests/blocks.rs | 2 +- ethcore/src/snapshot/tests/helpers.rs | 2 +- ethcore/src/snapshot/tests/mod.rs | 2 +- ethcore/src/snapshot/tests/service.rs | 2 +- ethcore/src/snapshot/tests/state.rs | 2 +- ethcore/src/snapshot/watcher.rs | 2 +- ethcore/src/spec/genesis.rs | 2 +- ethcore/src/spec/mod.rs | 2 +- ethcore/src/spec/seal.rs | 2 +- ethcore/src/spec/spec.rs | 2 +- ethcore/src/state/account.rs | 2 +- ethcore/src/state/mod.rs | 2 +- ethcore/src/state/substate.rs | 2 +- ethcore/src/state_db.rs | 2 +- ethcore/src/tests/client.rs | 2 +- ethcore/src/tests/helpers.rs | 2 +- ethcore/src/tests/mod.rs | 2 +- ethcore/src/tests/rpc.rs | 2 +- ethcore/src/trace/config.rs | 2 +- ethcore/src/trace/db.rs | 2 +- ethcore/src/trace/error.rs | 2 +- ethcore/src/trace/executive_tracer.rs | 2 +- ethcore/src/trace/import.rs | 2 +- ethcore/src/trace/mod.rs | 2 +- ethcore/src/trace/noop_tracer.rs | 2 +- ethcore/src/types/account_diff.rs | 2 +- ethcore/src/types/block_import_error.rs | 2 +- ethcore/src/types/block_status.rs | 2 +- ethcore/src/types/blockchain_info.rs | 2 +- ethcore/src/types/call_analytics.rs | 2 +- ethcore/src/types/executed.rs | 2 +- ethcore/src/types/filter.rs | 2 +- ethcore/src/types/ids.rs | 2 +- ethcore/src/types/log_entry.rs | 2 +- ethcore/src/types/mod.rs | 2 +- ethcore/src/types/mod.rs.in | 2 +- ethcore/src/types/mode.rs | 2 +- ethcore/src/types/pruning_info.rs | 2 +- ethcore/src/types/receipt.rs | 2 +- ethcore/src/types/restoration_status.rs | 2 +- ethcore/src/types/snapshot_manifest.rs | 2 +- ethcore/src/types/state_diff.rs | 2 +- ethcore/src/types/trace_filter.rs | 2 +- ethcore/src/types/trace_types/error.rs | 2 +- ethcore/src/types/trace_types/filter.rs | 2 +- ethcore/src/types/trace_types/flat.rs | 2 +- ethcore/src/types/trace_types/localized.rs | 2 +- ethcore/src/types/trace_types/mod.rs | 2 +- ethcore/src/types/trace_types/trace.rs | 2 +- ethcore/src/types/transaction.rs | 2 +- ethcore/src/types/transaction_import.rs | 2 +- ethcore/src/types/tree_route.rs | 2 +- ethcore/src/types/verification_queue_info.rs | 2 +- ethcore/src/verification/canon_verifier.rs | 2 +- ethcore/src/verification/mod.rs | 2 +- ethcore/src/verification/noop_verifier.rs | 2 +- ethcore/src/verification/queue/kind.rs | 2 +- ethcore/src/verification/queue/mod.rs | 2 +- ethcore/src/verification/verification.rs | 2 +- ethcore/src/verification/verifier.rs | 2 +- ethcore/src/views/block.rs | 2 +- ethcore/src/views/body.rs | 2 +- ethcore/src/views/header.rs | 2 +- ethcore/src/views/mod.rs | 2 +- ethcore/src/views/transaction.rs | 2 +- ethcrypto/Cargo.toml | 2 +- ethcrypto/src/lib.rs | 2 +- ethkey/Cargo.toml | 2 +- ethkey/src/bin/ethkey.rs | 2 +- ethkey/src/bin/main.rs | 2 +- ethkey/src/brain.rs | 2 +- ethkey/src/error.rs | 2 +- ethkey/src/keccak.rs | 2 +- ethkey/src/keypair.rs | 2 +- ethkey/src/lib.rs | 2 +- ethkey/src/prefix.rs | 2 +- ethkey/src/random.rs | 2 +- ethkey/src/signature.rs | 2 +- ethstore/Cargo.toml | 2 +- ethstore/build.rs | 2 +- ethstore/src/account/cipher.rs | 2 +- ethstore/src/account/kdf.rs | 2 +- ethstore/src/account/mod.rs | 2 +- ethstore/src/account/safe_account.rs | 2 +- ethstore/src/account/version.rs | 2 +- ethstore/src/bin/ethstore.rs | 2 +- ethstore/src/bin/main.rs | 2 +- ethstore/src/dir/disk.rs | 2 +- ethstore/src/dir/geth.rs | 2 +- ethstore/src/dir/mod.rs | 2 +- ethstore/src/dir/parity.rs | 2 +- ethstore/src/error.rs | 2 +- ethstore/src/ethkey.rs | 2 +- ethstore/src/ethstore.rs | 2 +- ethstore/src/import.rs | 2 +- ethstore/src/json/cipher.rs | 2 +- ethstore/src/json/crypto.rs | 2 +- ethstore/src/json/error.rs | 2 +- ethstore/src/json/hash.rs | 2 +- ethstore/src/json/id.rs | 2 +- ethstore/src/json/kdf.rs | 2 +- ethstore/src/json/key_file.rs | 2 +- ethstore/src/json/mod.rs | 2 +- ethstore/src/json/version.rs | 2 +- ethstore/src/lib.rs | 2 +- ethstore/src/random.rs | 2 +- ethstore/src/secret_store.rs | 2 +- ethstore/tests/api.rs | 2 +- ethstore/tests/cli.rs | 2 +- ethstore/tests/util/mod.rs | 2 +- ethstore/tests/util/transient_dir.rs | 2 +- evmbin/Cargo.toml | 2 +- evmbin/benches/mod.rs | 2 +- evmbin/src/ext.rs | 2 +- evmbin/src/main.rs | 2 +- evmjit/Cargo.toml | 2 +- evmjit/src/lib.rs | 2 +- ipc/codegen/Cargo.toml | 2 +- ipc/codegen/build.rs | 2 +- ipc/codegen/src/codegen.rs | 2 +- ipc/codegen/src/lib.rs | 2 +- ipc/codegen/src/lib.rs.in | 2 +- ipc/codegen/src/serialization.rs | 2 +- ipc/hypervisor/Cargo.toml | 2 +- ipc/hypervisor/build.rs | 2 +- ipc/hypervisor/src/lib.rs | 2 +- ipc/hypervisor/src/service.rs | 2 +- ipc/hypervisor/src/service.rs.in | 2 +- ipc/nano/Cargo.toml | 2 +- ipc/nano/src/lib.rs | 2 +- ipc/rpc/Cargo.toml | 2 +- ipc/rpc/src/binary.rs | 2 +- ipc/rpc/src/interface.rs | 2 +- ipc/rpc/src/lib.rs | 2 +- ipc/tests/Cargo.toml | 2 +- ipc/tests/binary.rs | 2 +- ipc/tests/binary.rs.in | 2 +- ipc/tests/build.rs | 2 +- ipc/tests/examples.rs | 2 +- ipc/tests/nested.rs | 2 +- ipc/tests/nested.rs.in | 2 +- ipc/tests/over_nano.rs | 2 +- ipc/tests/run.rs | 2 +- ipc/tests/service.rs | 2 +- ipc/tests/service.rs.in | 2 +- ipc/tests/with_attrs.rs | 2 +- ipc/tests/with_attrs.rs.in | 2 +- js/Cargo.precompiled.toml | 2 +- js/Cargo.toml | 2 +- js/build.rs | 2 +- js/npm/parity/test/smoke.spec.js | 2 +- js/npm/test/mocha.config.js | 2 +- js/src/abi/abi.js | 2 +- js/src/abi/decoder/bytesTaken.js | 2 +- js/src/abi/decoder/bytesTaken.spec.js | 2 +- js/src/abi/decoder/decodeResult.js | 2 +- js/src/abi/decoder/decodeResult.spec.js | 2 +- js/src/abi/decoder/decoder.js | 2 +- js/src/abi/decoder/decoder.spec.js | 2 +- js/src/abi/decoder/index.js | 2 +- js/src/abi/encoder/encoder.js | 2 +- js/src/abi/encoder/encoder.spec.js | 2 +- js/src/abi/encoder/index.js | 2 +- js/src/abi/encoder/mediate.js | 2 +- js/src/abi/encoder/mediate.spec.js | 2 +- js/src/abi/index.js | 2 +- js/src/abi/spec/constructor.js | 2 +- js/src/abi/spec/constructor.spec.js | 2 +- js/src/abi/spec/event/decodedLog.js | 2 +- js/src/abi/spec/event/decodedLog.spec.js | 2 +- js/src/abi/spec/event/decodedLogParam.js | 2 +- js/src/abi/spec/event/decodedLogParam.spec.js | 2 +- js/src/abi/spec/event/event.js | 2 +- js/src/abi/spec/event/event.spec.js | 2 +- js/src/abi/spec/event/eventParam.js | 2 +- js/src/abi/spec/event/eventParam.spec.js | 2 +- js/src/abi/spec/event/index.js | 2 +- js/src/abi/spec/function.js | 2 +- js/src/abi/spec/function.spec.js | 2 +- js/src/abi/spec/index.js | 2 +- js/src/abi/spec/interface.js | 2 +- js/src/abi/spec/interface.spec.js | 2 +- js/src/abi/spec/param.js | 2 +- js/src/abi/spec/param.spec.js | 2 +- js/src/abi/spec/paramType/format.js | 2 +- js/src/abi/spec/paramType/format.spec.js | 2 +- js/src/abi/spec/paramType/index.js | 2 +- js/src/abi/spec/paramType/paramType.js | 2 +- js/src/abi/spec/paramType/paramType.spec.js | 2 +- js/src/abi/spec/paramType/types.js | 2 +- js/src/abi/token/index.js | 2 +- js/src/abi/token/token.js | 2 +- js/src/abi/token/token.spec.js | 2 +- js/src/abi/util/address.js | 2 +- js/src/abi/util/address.spec.js | 2 +- js/src/abi/util/pad.js | 2 +- js/src/abi/util/pad.spec.js | 2 +- js/src/abi/util/signature.js | 2 +- js/src/abi/util/signature.spec.js | 2 +- js/src/abi/util/slice.js | 2 +- js/src/abi/util/slice.spec.js | 2 +- js/src/abi/util/sliceAs.js | 2 +- js/src/abi/util/sliceAs.spec.js | 2 +- js/src/abi/util/types.js | 2 +- js/src/abi/util/types.spec.js | 2 +- js/src/api/api.js | 2 +- js/src/api/api.spec.js | 2 +- js/src/api/contract/contract.js | 2 +- js/src/api/contract/contract.spec.js | 2 +- js/src/api/contract/index.js | 2 +- js/src/api/format/input.js | 2 +- js/src/api/format/input.spec.js | 2 +- js/src/api/format/output.js | 2 +- js/src/api/format/output.spec.js | 2 +- js/src/api/index.js | 2 +- js/src/api/rpc/db/db.js | 2 +- js/src/api/rpc/db/db.spec.js | 2 +- js/src/api/rpc/db/index.js | 2 +- js/src/api/rpc/eth/eth.e2e.js | 2 +- js/src/api/rpc/eth/eth.js | 2 +- js/src/api/rpc/eth/eth.spec.js | 2 +- js/src/api/rpc/eth/index.js | 2 +- js/src/api/rpc/index.js | 2 +- js/src/api/rpc/net/index.js | 2 +- js/src/api/rpc/net/net.e2e.js | 2 +- js/src/api/rpc/net/net.js | 2 +- js/src/api/rpc/net/net.spec.js | 2 +- js/src/api/rpc/parity/index.js | 2 +- js/src/api/rpc/parity/parity.e2e.js | 2 +- js/src/api/rpc/parity/parity.js | 2 +- js/src/api/rpc/parity/parity.spec.js | 2 +- js/src/api/rpc/personal/index.js | 2 +- js/src/api/rpc/personal/personal.e2e.js | 2 +- js/src/api/rpc/personal/personal.js | 2 +- js/src/api/rpc/personal/personal.spec.js | 2 +- js/src/api/rpc/shh/index.js | 2 +- js/src/api/rpc/shh/shh.js | 2 +- js/src/api/rpc/signer/index.js | 2 +- js/src/api/rpc/signer/signer.js | 2 +- js/src/api/rpc/trace/index.js | 2 +- js/src/api/rpc/trace/trace.e2e.js | 2 +- js/src/api/rpc/trace/trace.js | 2 +- js/src/api/rpc/trace/trace.spec.js | 2 +- js/src/api/rpc/web3/index.js | 2 +- js/src/api/rpc/web3/web3.e2e.js | 2 +- js/src/api/rpc/web3/web3.js | 2 +- js/src/api/rpc/web3/web3.spec.js | 2 +- js/src/api/subscriptions/eth.js | 2 +- js/src/api/subscriptions/eth.spec.js | 2 +- js/src/api/subscriptions/index.js | 2 +- js/src/api/subscriptions/logging.js | 2 +- js/src/api/subscriptions/logging.spec.js | 2 +- js/src/api/subscriptions/manager.js | 2 +- js/src/api/subscriptions/manager.spec.js | 2 +- js/src/api/subscriptions/personal.js | 2 +- js/src/api/subscriptions/personal.spec.js | 2 +- js/src/api/subscriptions/signer.js | 2 +- js/src/api/transport/error.js | 2 +- js/src/api/transport/http/http.e2e.js | 2 +- js/src/api/transport/http/http.js | 2 +- js/src/api/transport/http/http.spec.js | 2 +- js/src/api/transport/http/index.js | 2 +- js/src/api/transport/index.js | 2 +- js/src/api/transport/jsonRpcBase.js | 2 +- js/src/api/transport/jsonRpcBase.spec.js | 2 +- js/src/api/transport/ws/index.js | 2 +- js/src/api/transport/ws/ws.e2e.js | 2 +- js/src/api/transport/ws/ws.js | 2 +- js/src/api/transport/ws/ws.spec.js | 2 +- js/src/api/util/decode.js | 2 +- js/src/api/util/decode.spec.js | 2 +- js/src/api/util/format.js | 2 +- js/src/api/util/format.spec.js | 2 +- js/src/api/util/index.js | 2 +- js/src/api/util/sha3.js | 2 +- js/src/api/util/sha3.spec.js | 2 +- js/src/api/util/types.js | 2 +- js/src/api/util/types.spec.js | 2 +- js/src/api/util/wei.js | 2 +- js/src/api/util/wei.spec.js | 2 +- js/src/contracts/abi/index.js | 2 +- js/src/contracts/badgereg.js | 2 +- js/src/contracts/code/index.js | 2 +- js/src/contracts/code/wallet.js | 2 +- js/src/contracts/contracts.js | 2 +- js/src/contracts/dappreg.js | 2 +- js/src/contracts/githubhint.js | 2 +- js/src/contracts/index.js | 2 +- js/src/contracts/registry.js | 2 +- js/src/contracts/signaturereg.js | 2 +- js/src/contracts/sms-verification.js | 2 +- js/src/contracts/tokenreg.js | 2 +- js/src/dapps/basiccoin.js | 2 +- .../basiccoin/AddressSelect/addressSelect.js | 2 +- js/src/dapps/basiccoin/AddressSelect/index.js | 2 +- .../basiccoin/Application/Header/header.js | 2 +- .../basiccoin/Application/Header/index.js | 2 +- .../basiccoin/Application/Loading/index.js | 2 +- .../basiccoin/Application/Loading/loading.js | 2 +- .../basiccoin/Application/application.js | 2 +- js/src/dapps/basiccoin/Application/index.js | 2 +- js/src/dapps/basiccoin/Application/pages.js | 2 +- js/src/dapps/basiccoin/Container/container.js | 2 +- js/src/dapps/basiccoin/Container/index.js | 2 +- .../basiccoin/Deploy/Deployment/deployment.js | 2 +- .../basiccoin/Deploy/Deployment/index.js | 2 +- js/src/dapps/basiccoin/Deploy/Event/event.js | 2 +- js/src/dapps/basiccoin/Deploy/Event/index.js | 2 +- .../dapps/basiccoin/Deploy/Events/events.js | 2 +- js/src/dapps/basiccoin/Deploy/Events/index.js | 2 +- js/src/dapps/basiccoin/Deploy/deploy.js | 2 +- js/src/dapps/basiccoin/Deploy/index.js | 2 +- .../basiccoin/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/basiccoin/IdentityIcon/index.js | 2 +- .../dapps/basiccoin/Overview/Owner/index.js | 2 +- .../dapps/basiccoin/Overview/Owner/owner.js | 2 +- .../dapps/basiccoin/Overview/Token/index.js | 2 +- .../dapps/basiccoin/Overview/Token/token.js | 2 +- js/src/dapps/basiccoin/Overview/index.js | 2 +- js/src/dapps/basiccoin/Overview/overview.js | 2 +- .../dapps/basiccoin/Transfer/Event/event.js | 2 +- .../dapps/basiccoin/Transfer/Event/index.js | 2 +- .../dapps/basiccoin/Transfer/Events/events.js | 2 +- .../dapps/basiccoin/Transfer/Events/index.js | 2 +- js/src/dapps/basiccoin/Transfer/Send/index.js | 2 +- js/src/dapps/basiccoin/Transfer/Send/send.js | 2 +- js/src/dapps/basiccoin/Transfer/index.js | 2 +- js/src/dapps/basiccoin/Transfer/transfer.js | 2 +- js/src/dapps/basiccoin/parity.js | 2 +- js/src/dapps/basiccoin/services.js | 2 +- js/src/dapps/dappreg.js | 2 +- .../dapps/dappreg/Application/application.js | 2 +- js/src/dapps/dappreg/Application/index.js | 2 +- js/src/dapps/dappreg/Button/button.js | 2 +- js/src/dapps/dappreg/Button/index.js | 2 +- js/src/dapps/dappreg/ButtonBar/buttonBar.js | 2 +- js/src/dapps/dappreg/ButtonBar/index.js | 2 +- js/src/dapps/dappreg/Dapp/dapp.js | 2 +- js/src/dapps/dappreg/Dapp/index.js | 2 +- js/src/dapps/dappreg/Input/index.js | 2 +- js/src/dapps/dappreg/Input/input.js | 2 +- js/src/dapps/dappreg/Modal/index.js | 2 +- js/src/dapps/dappreg/Modal/modal.js | 2 +- js/src/dapps/dappreg/ModalDelete/index.js | 2 +- .../dapps/dappreg/ModalDelete/modalDelete.js | 2 +- js/src/dapps/dappreg/ModalRegister/index.js | 2 +- .../dappreg/ModalRegister/modalRegister.js | 2 +- js/src/dapps/dappreg/ModalUpdate/index.js | 2 +- .../dapps/dappreg/ModalUpdate/modalUpdate.js | 2 +- js/src/dapps/dappreg/SelectAccount/index.js | 2 +- .../dappreg/SelectAccount/selectAccount.js | 2 +- js/src/dapps/dappreg/SelectDapp/index.js | 2 +- js/src/dapps/dappreg/SelectDapp/selectDapp.js | 2 +- js/src/dapps/dappreg/Warning/index.js | 2 +- js/src/dapps/dappreg/Warning/warning.js | 2 +- js/src/dapps/dappreg/dappsStore.js | 2 +- js/src/dapps/dappreg/modalStore.js | 2 +- js/src/dapps/dappreg/parity.js | 2 +- js/src/dapps/githubhint.js | 2 +- .../githubhint/Application/application.js | 2 +- js/src/dapps/githubhint/Application/index.js | 2 +- js/src/dapps/githubhint/Button/button.js | 2 +- js/src/dapps/githubhint/Button/index.js | 2 +- js/src/dapps/githubhint/Events/events.js | 2 +- js/src/dapps/githubhint/Events/index.js | 2 +- .../githubhint/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/githubhint/IdentityIcon/index.js | 2 +- js/src/dapps/githubhint/Loading/index.js | 2 +- js/src/dapps/githubhint/Loading/loading.js | 2 +- js/src/dapps/githubhint/parity.js | 2 +- js/src/dapps/githubhint/services.js | 2 +- js/src/dapps/index.js | 2 +- js/src/dapps/localtx.js | 2 +- .../dapps/localtx/Application/application.js | 2 +- .../localtx/Application/application.spec.js | 2 +- js/src/dapps/localtx/Application/index.js | 2 +- js/src/dapps/localtx/Transaction/index.js | 2 +- .../dapps/localtx/Transaction/transaction.js | 2 +- .../localtx/Transaction/transaction.spec.js | 2 +- js/src/dapps/localtx/parity.js | 2 +- js/src/dapps/registry.js | 2 +- js/src/dapps/registry/Accounts/accounts.js | 2 +- js/src/dapps/registry/Accounts/actions.js | 2 +- js/src/dapps/registry/Accounts/index.js | 2 +- .../dapps/registry/Application/application.js | 2 +- js/src/dapps/registry/Application/index.js | 2 +- js/src/dapps/registry/Container.js | 2 +- js/src/dapps/registry/Events/actions.js | 2 +- js/src/dapps/registry/Events/events.js | 2 +- js/src/dapps/registry/Events/index.js | 2 +- js/src/dapps/registry/Events/reducers.js | 2 +- .../registry/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/registry/IdentityIcon/index.js | 2 +- js/src/dapps/registry/Lookup/actions.js | 2 +- js/src/dapps/registry/Lookup/index.js | 2 +- js/src/dapps/registry/Lookup/lookup.js | 2 +- js/src/dapps/registry/Lookup/reducers.js | 2 +- js/src/dapps/registry/Names/actions.js | 2 +- js/src/dapps/registry/Names/index.js | 2 +- js/src/dapps/registry/Names/names.js | 2 +- js/src/dapps/registry/Names/reducers.js | 2 +- js/src/dapps/registry/Records/records.js | 2 +- js/src/dapps/registry/actions.js | 2 +- .../registry/addresses/accounts-reducer.js | 2 +- js/src/dapps/registry/addresses/actions.js | 2 +- .../registry/addresses/contacts-reducer.js | 2 +- js/src/dapps/registry/parity.js | 2 +- js/src/dapps/registry/reducers.js | 2 +- js/src/dapps/registry/store.js | 2 +- js/src/dapps/registry/ui/address.js | 2 +- js/src/dapps/registry/ui/hash.js | 2 +- js/src/dapps/registry/ui/image.js | 2 +- .../dapps/registry/ui/record-type-select.js | 2 +- js/src/dapps/signaturereg.js | 2 +- .../signaturereg/Application/application.js | 2 +- .../dapps/signaturereg/Application/index.js | 2 +- js/src/dapps/signaturereg/Button/button.js | 2 +- js/src/dapps/signaturereg/Button/index.js | 2 +- js/src/dapps/signaturereg/Events/events.js | 2 +- js/src/dapps/signaturereg/Events/index.js | 2 +- js/src/dapps/signaturereg/Header/header.js | 2 +- js/src/dapps/signaturereg/Header/index.js | 2 +- .../signaturereg/IdentityIcon/identityIcon.js | 2 +- .../dapps/signaturereg/IdentityIcon/index.js | 2 +- js/src/dapps/signaturereg/Import/import.js | 2 +- js/src/dapps/signaturereg/Import/index.js | 2 +- js/src/dapps/signaturereg/Loading/index.js | 2 +- js/src/dapps/signaturereg/Loading/loading.js | 2 +- js/src/dapps/signaturereg/format.js | 2 +- js/src/dapps/signaturereg/parity.js | 2 +- js/src/dapps/signaturereg/services.js | 2 +- js/src/dapps/tokenreg.js | 2 +- .../AccountSelector/account-selector.js | 2 +- .../Accounts/AccountSelector/container.js | 2 +- .../Accounts/AccountSelector/index.js | 2 +- js/src/dapps/tokenreg/Accounts/actions.js | 2 +- js/src/dapps/tokenreg/Accounts/reducer.js | 2 +- js/src/dapps/tokenreg/Actions/Query/index.js | 2 +- js/src/dapps/tokenreg/Actions/Query/query.js | 2 +- .../dapps/tokenreg/Actions/Register/index.js | 2 +- .../tokenreg/Actions/Register/register.js | 2 +- js/src/dapps/tokenreg/Actions/actions.js | 2 +- js/src/dapps/tokenreg/Actions/component.js | 2 +- js/src/dapps/tokenreg/Actions/container.js | 2 +- js/src/dapps/tokenreg/Actions/index.js | 2 +- js/src/dapps/tokenreg/Actions/reducer.js | 2 +- .../dapps/tokenreg/Application/application.js | 2 +- js/src/dapps/tokenreg/Application/index.js | 2 +- js/src/dapps/tokenreg/Chip/chip.js | 2 +- js/src/dapps/tokenreg/Chip/index.js | 2 +- js/src/dapps/tokenreg/Container.js | 2 +- .../tokenreg/IdentityIcon/identityIcon.js | 2 +- js/src/dapps/tokenreg/IdentityIcon/index.js | 2 +- .../dapps/tokenreg/Inputs/Text/container.js | 2 +- js/src/dapps/tokenreg/Inputs/Text/index.js | 2 +- .../dapps/tokenreg/Inputs/Text/input-text.js | 2 +- js/src/dapps/tokenreg/Inputs/validation.js | 2 +- js/src/dapps/tokenreg/Loading/index.js | 2 +- js/src/dapps/tokenreg/Loading/loading.js | 2 +- js/src/dapps/tokenreg/Status/actions.js | 2 +- js/src/dapps/tokenreg/Status/index.js | 2 +- js/src/dapps/tokenreg/Status/reducer.js | 2 +- js/src/dapps/tokenreg/Status/status.js | 2 +- .../dapps/tokenreg/Tokens/Token/add-meta.js | 2 +- js/src/dapps/tokenreg/Tokens/Token/index.js | 2 +- js/src/dapps/tokenreg/Tokens/Token/token.js | 2 +- .../tokenreg/Tokens/Token/tokenContainer.js | 2 +- js/src/dapps/tokenreg/Tokens/actions.js | 2 +- js/src/dapps/tokenreg/Tokens/container.js | 2 +- js/src/dapps/tokenreg/Tokens/index.js | 2 +- js/src/dapps/tokenreg/Tokens/reducer.js | 2 +- js/src/dapps/tokenreg/Tokens/tokens.js | 2 +- js/src/dapps/tokenreg/constants.js | 2 +- js/src/dapps/tokenreg/parity.js | 2 +- js/src/dapps/tokenreg/reducers.js | 2 +- js/src/dapps/tokenreg/store.js | 2 +- js/src/dapps/tokenreg/utils.js | 2 +- js/src/environment/index.js | 2 +- .../integration-tests/fake-backend.js | 2 +- js/src/environment/integration-tests/index.js | 2 +- js/src/environment/perf-debug/index.js | 2 +- js/src/environment/perf-debug/why-update.js | 2 +- js/src/environment/tests/index.js | 2 +- js/src/environment/tests/test-utils.js | 2 +- js/src/index.js | 2 +- js/src/jsonrpc/generator/build-json.js | 2 +- js/src/jsonrpc/generator/build-markdown.js | 2 +- js/src/jsonrpc/index.js | 2 +- js/src/jsonrpc/index.spec.js | 2 +- js/src/jsonrpc/interfaces/db.js | 2 +- js/src/jsonrpc/interfaces/eth.js | 2 +- js/src/jsonrpc/interfaces/net.js | 2 +- js/src/jsonrpc/interfaces/parity.js | 2 +- js/src/jsonrpc/interfaces/personal.js | 2 +- js/src/jsonrpc/interfaces/shh.js | 2 +- js/src/jsonrpc/interfaces/signer.js | 2 +- js/src/jsonrpc/interfaces/trace.js | 2 +- js/src/jsonrpc/interfaces/web3.js | 2 +- js/src/jsonrpc/types.js | 2 +- js/src/lib.rs | 2 +- js/src/lib.rs.in | 2 +- js/src/library.etherscan.js | 2 +- js/src/library.parity.js | 2 +- js/src/library.shapeshift.js | 2 +- js/src/main.js | 2 +- js/src/modals/AddAddress/addAddress.js | 2 +- js/src/modals/AddAddress/index.js | 2 +- js/src/modals/AddContract/addContract.js | 2 +- js/src/modals/AddContract/index.js | 2 +- .../AccountDetails/accountDetails.js | 2 +- .../CreateAccount/AccountDetails/index.js | 2 +- .../AccountDetailsGeth/accountDetailsGeth.js | 2 +- .../CreateAccount/AccountDetailsGeth/index.js | 2 +- .../CreationType/creationType.js | 2 +- .../CreateAccount/CreationType/index.js | 2 +- .../modals/CreateAccount/NewAccount/index.js | 2 +- .../CreateAccount/NewAccount/newAccount.js | 2 +- js/src/modals/CreateAccount/NewGeth/index.js | 2 +- .../modals/CreateAccount/NewGeth/newGeth.js | 2 +- .../modals/CreateAccount/NewImport/index.js | 2 +- .../CreateAccount/NewImport/newImport.js | 2 +- js/src/modals/CreateAccount/RawKey/index.js | 2 +- js/src/modals/CreateAccount/RawKey/rawKey.js | 2 +- .../CreateAccount/RecoveryPhrase/index.js | 2 +- .../RecoveryPhrase/recoveryPhrase.js | 2 +- js/src/modals/CreateAccount/createAccount.js | 2 +- js/src/modals/CreateAccount/index.js | 2 +- js/src/modals/CreateAccount/print.js | 2 +- .../CreateWallet/WalletDetails/index.js | 2 +- .../WalletDetails/walletDetails.js | 2 +- .../modals/CreateWallet/WalletInfo/index.js | 2 +- .../CreateWallet/WalletInfo/walletInfo.js | 2 +- .../modals/CreateWallet/WalletType/index.js | 2 +- .../CreateWallet/WalletType/walletType.js | 2 +- js/src/modals/CreateWallet/createWallet.js | 2 +- .../modals/CreateWallet/createWalletStore.js | 2 +- js/src/modals/CreateWallet/index.js | 2 +- js/src/modals/DeleteAccount/deleteAccount.js | 2 +- js/src/modals/DeleteAccount/index.js | 2 +- .../DeployContract/DetailsStep/detailsStep.js | 2 +- .../DeployContract/DetailsStep/index.js | 2 +- .../DeployContract/ErrorStep/errorStep.js | 2 +- .../modals/DeployContract/ErrorStep/index.js | 2 +- .../DeployContract/ParametersStep/index.js | 2 +- .../ParametersStep/parametersStep.js | 4 +- .../modals/DeployContract/deployContract.js | 2 +- js/src/modals/DeployContract/index.js | 2 +- js/src/modals/EditMeta/editMeta.js | 2 +- js/src/modals/EditMeta/index.js | 2 +- .../DetailsStep/detailsStep.js | 2 +- .../ExecuteContract/DetailsStep/index.js | 2 +- .../modals/ExecuteContract/executeContract.js | 2 +- js/src/modals/ExecuteContract/index.js | 2 +- js/src/modals/FirstRun/Completed/completed.js | 2 +- js/src/modals/FirstRun/Completed/index.js | 2 +- js/src/modals/FirstRun/TnC/index.js | 2 +- js/src/modals/FirstRun/TnC/tnc.js | 2 +- js/src/modals/FirstRun/Welcome/index.js | 2 +- js/src/modals/FirstRun/Welcome/welcome.js | 2 +- js/src/modals/FirstRun/firstRun.js | 2 +- js/src/modals/FirstRun/index.js | 2 +- js/src/modals/LoadContract/index.js | 2 +- js/src/modals/LoadContract/loadContract.js | 2 +- js/src/modals/PasswordManager/index.js | 2 +- .../modals/PasswordManager/passwordManager.js | 2 +- js/src/modals/SMSVerification/Done/done.js | 2 +- js/src/modals/SMSVerification/Done/index.js | 2 +- .../SMSVerification/GatherData/gatherData.js | 2 +- .../SMSVerification/GatherData/index.js | 2 +- .../modals/SMSVerification/QueryCode/index.js | 2 +- .../SMSVerification/QueryCode/queryCode.js | 2 +- .../modals/SMSVerification/SMSVerification.js | 2 +- .../SMSVerification/SendConfirmation/index.js | 2 +- .../SendConfirmation/sendConfirmation.js | 2 +- .../SMSVerification/SendRequest/index.js | 2 +- .../SendRequest/sendRequest.js | 2 +- js/src/modals/SMSVerification/index.js | 2 +- js/src/modals/SMSVerification/store.js | 2 +- js/src/modals/SaveContract/index.js | 2 +- js/src/modals/SaveContract/saveContract.js | 2 +- .../awaitingDepositStep.js | 2 +- .../Shapeshift/AwaitingDepositStep/index.js | 2 +- .../awaitingExchangeStep.js | 2 +- .../Shapeshift/AwaitingExchangeStep/index.js | 2 +- .../Shapeshift/CompletedStep/completedStep.js | 2 +- .../modals/Shapeshift/CompletedStep/index.js | 2 +- .../modals/Shapeshift/ErrorStep/errorStep.js | 2 +- js/src/modals/Shapeshift/ErrorStep/index.js | 2 +- js/src/modals/Shapeshift/OptionsStep/index.js | 2 +- .../Shapeshift/OptionsStep/optionsStep.js | 2 +- js/src/modals/Shapeshift/Price/index.js | 2 +- js/src/modals/Shapeshift/Price/price.js | 2 +- js/src/modals/Shapeshift/Value/index.js | 2 +- js/src/modals/Shapeshift/Value/value.js | 2 +- js/src/modals/Shapeshift/index.js | 2 +- js/src/modals/Shapeshift/shapeshift.js | 2 +- js/src/modals/Transfer/Details/details.js | 2 +- js/src/modals/Transfer/Details/index.js | 2 +- js/src/modals/Transfer/Extras/extras.js | 2 +- js/src/modals/Transfer/Extras/index.js | 2 +- js/src/modals/Transfer/errors.js | 2 +- js/src/modals/Transfer/index.js | 2 +- js/src/modals/Transfer/store.js | 2 +- js/src/modals/Transfer/transfer.js | 2 +- js/src/modals/WalletSettings/index.js | 2 +- .../modals/WalletSettings/walletSettings.js | 2 +- .../WalletSettings/walletSettingsStore.js | 2 +- js/src/modals/index.js | 2 +- js/src/parity.js | 2 +- js/src/redux/actions.js | 2 +- js/src/redux/index.js | 2 +- js/src/redux/middleware.js | 2 +- js/src/redux/providers/apiActions.js | 2 +- js/src/redux/providers/apiReducer.js | 2 +- js/src/redux/providers/balances.js | 2 +- js/src/redux/providers/balancesActions.js | 2 +- js/src/redux/providers/balancesReducer.js | 2 +- js/src/redux/providers/blockchainActions.js | 2 +- js/src/redux/providers/blockchainReducer.js | 2 +- .../redux/providers/certifications/actions.js | 2 +- .../providers/certifications/middleware.js | 2 +- .../redux/providers/certifications/reducer.js | 2 +- js/src/redux/providers/compilerActions.js | 2 +- js/src/redux/providers/compilerReducer.js | 2 +- js/src/redux/providers/compilerWorker.js | 2 +- js/src/redux/providers/imagesActions.js | 2 +- js/src/redux/providers/imagesReducer.js | 2 +- js/src/redux/providers/index.js | 2 +- js/src/redux/providers/personal.js | 2 +- js/src/redux/providers/personalActions.js | 2 +- js/src/redux/providers/personalReducer.js | 2 +- js/src/redux/providers/signer.js | 2 +- js/src/redux/providers/signerActions.js | 2 +- js/src/redux/providers/signerMiddleware.js | 2 +- js/src/redux/providers/signerReducer.js | 2 +- js/src/redux/providers/snackbarActions.js | 2 +- js/src/redux/providers/snackbarReducer.js | 2 +- js/src/redux/providers/status.js | 2 +- js/src/redux/providers/statusActions.js | 2 +- js/src/redux/providers/statusReducer.js | 2 +- js/src/redux/providers/walletActions.js | 2 +- js/src/redux/providers/walletReducer.js | 2 +- js/src/redux/reducers.js | 2 +- js/src/redux/store.js | 2 +- js/src/redux/util.js | 2 +- js/src/secureApi.js | 2 +- js/src/ui/Actionbar/Export/export.js | 2 +- js/src/ui/Actionbar/Export/index.js | 2 +- js/src/ui/Actionbar/Import/import.js | 2 +- js/src/ui/Actionbar/Import/index.js | 2 +- js/src/ui/Actionbar/Search/index.js | 2 +- js/src/ui/Actionbar/Search/search.js | 2 +- js/src/ui/Actionbar/Sort/index.js | 2 +- js/src/ui/Actionbar/Sort/sort.js | 2 +- js/src/ui/Actionbar/Sort/sortStore.js | 2 +- js/src/ui/Actionbar/actionbar.js | 2 +- js/src/ui/Actionbar/actionbar.spec.js | 2 +- js/src/ui/Actionbar/index.js | 2 +- js/src/ui/Badge/badge.js | 2 +- js/src/ui/Badge/badge.spec.js | 2 +- js/src/ui/Badge/index.js | 2 +- js/src/ui/Balance/balance.js | 2 +- js/src/ui/Balance/index.js | 2 +- js/src/ui/BlockStatus/blockStatus.js | 2 +- js/src/ui/BlockStatus/index.js | 2 +- js/src/ui/Button/button.js | 2 +- js/src/ui/Button/button.spec.js | 2 +- js/src/ui/Button/index.js | 2 +- js/src/ui/Certifications/certifications.js | 2 +- js/src/ui/Certifications/index.js | 2 +- js/src/ui/ConfirmDialog/confirmDialog.js | 2 +- js/src/ui/ConfirmDialog/index.js | 2 +- js/src/ui/Container/Title/index.js | 2 +- js/src/ui/Container/Title/title.js | 2 +- js/src/ui/Container/Title/title.spec.js | 2 +- js/src/ui/Container/container.js | 2 +- js/src/ui/Container/container.spec.js | 2 +- js/src/ui/Container/index.js | 2 +- js/src/ui/ContextProvider/contextProvider.js | 2 +- js/src/ui/CopyToClipboard/copyToClipboard.js | 2 +- js/src/ui/CopyToClipboard/index.js | 2 +- js/src/ui/Editor/editor.js | 2 +- js/src/ui/Editor/index.js | 2 +- js/src/ui/Editor/mode-solidity.js | 2 +- js/src/ui/Errors/actions.js | 2 +- js/src/ui/Errors/errors.js | 2 +- js/src/ui/Errors/index.js | 2 +- js/src/ui/Errors/middleware.js | 2 +- js/src/ui/Errors/reducers.js | 2 +- js/src/ui/Form/AddressSelect/addressSelect.js | 2 +- js/src/ui/Form/AddressSelect/index.js | 2 +- js/src/ui/Form/AutoComplete/autocomplete.js | 2 +- js/src/ui/Form/AutoComplete/index.js | 2 +- js/src/ui/Form/FormWrap/formWrap.js | 2 +- js/src/ui/Form/FormWrap/index.js | 2 +- js/src/ui/Form/Input/index.js | 2 +- js/src/ui/Form/Input/input.js | 2 +- js/src/ui/Form/InputAddress/index.js | 2 +- js/src/ui/Form/InputAddress/inputAddress.js | 2 +- js/src/ui/Form/InputAddressSelect/index.js | 2 +- .../InputAddressSelect/inputAddressSelect.js | 2 +- js/src/ui/Form/InputChip/index.js | 2 +- js/src/ui/Form/InputChip/inputChip.js | 2 +- js/src/ui/Form/InputInline/index.js | 2 +- js/src/ui/Form/InputInline/inputInline.js | 2 +- js/src/ui/Form/RadioButtons/index.js | 2 +- js/src/ui/Form/RadioButtons/radioButtons.js | 2 +- js/src/ui/Form/Select/index.js | 2 +- js/src/ui/Form/Select/select.js | 2 +- js/src/ui/Form/TypedInput/index.js | 2 +- js/src/ui/Form/TypedInput/typedInput.js | 2 +- js/src/ui/Form/form.js | 2 +- js/src/ui/Form/index.js | 2 +- .../GasPriceSelector/gasPriceSelector.js | 2 +- .../GasPriceEditor/GasPriceSelector/index.js | 2 +- js/src/ui/GasPriceEditor/gasPriceEditor.js | 2 +- js/src/ui/GasPriceEditor/index.js | 2 +- js/src/ui/GasPriceEditor/store.js | 2 +- js/src/ui/IdentityIcon/identityIcon.js | 2 +- js/src/ui/IdentityIcon/index.js | 2 +- js/src/ui/IdentityName/identityName.js | 2 +- js/src/ui/IdentityName/identityName.spec.js | 2 +- js/src/ui/IdentityName/index.js | 2 +- js/src/ui/Loading/index.js | 2 +- js/src/ui/Loading/loading.js | 2 +- js/src/ui/MethodDecoding/index.js | 2 +- js/src/ui/MethodDecoding/methodDecoding.js | 2 +- js/src/ui/Modal/Busy/busy.js | 2 +- js/src/ui/Modal/Busy/index.js | 2 +- js/src/ui/Modal/Completed/completed.js | 2 +- js/src/ui/Modal/Completed/index.js | 2 +- js/src/ui/Modal/Title/index.js | 2 +- js/src/ui/Modal/Title/title.js | 2 +- js/src/ui/Modal/index.js | 2 +- js/src/ui/Modal/modal.js | 2 +- js/src/ui/Page/index.js | 2 +- js/src/ui/Page/page.js | 2 +- js/src/ui/ParityBackground/index.js | 2 +- .../ui/ParityBackground/parityBackground.js | 2 +- js/src/ui/ShortenedHash/index.js | 2 +- js/src/ui/ShortenedHash/shortenedHash.js | 2 +- js/src/ui/SignerIcon/index.js | 2 +- js/src/ui/SignerIcon/signerIcon.js | 2 +- js/src/ui/Tags/index.js | 2 +- js/src/ui/Tags/tags.js | 2 +- js/src/ui/Theme/index.js | 2 +- js/src/ui/Theme/theme.js | 2 +- js/src/ui/Theme/theme.spec.js | 2 +- js/src/ui/Tooltips/Tooltip/index.js | 2 +- js/src/ui/Tooltips/Tooltip/tooltip.js | 2 +- js/src/ui/Tooltips/actions.js | 2 +- js/src/ui/Tooltips/index.js | 2 +- js/src/ui/Tooltips/reducers.js | 2 +- js/src/ui/Tooltips/tooltips.js | 2 +- js/src/ui/TxHash/index.js | 2 +- js/src/ui/TxHash/txHash.js | 2 +- js/src/ui/TxList/TxRow/index.js | 2 +- js/src/ui/TxList/TxRow/txRow.js | 2 +- js/src/ui/TxList/TxRow/txRow.spec.js | 2 +- js/src/ui/TxList/index.js | 2 +- js/src/ui/TxList/store.js | 2 +- js/src/ui/TxList/store.spec.js | 2 +- js/src/ui/TxList/txList.js | 2 +- js/src/ui/TxList/txList.spec.js | 2 +- js/src/ui/index.js | 2 +- js/src/util/abi.js | 2 +- js/src/util/constants.js | 2 +- js/src/util/notifications.js | 2 +- js/src/util/proptypes.js | 2 +- js/src/util/subscribe-to-event.js | 2 +- js/src/util/tx.js | 2 +- js/src/util/validation.js | 2 +- js/src/util/wallet.js | 2 +- js/src/util/wallets.js | 2 +- js/src/util/web3.extensions.js | 2 +- js/src/views/Account/Header/header.js | 2 +- js/src/views/Account/Header/index.js | 2 +- js/src/views/Account/Transactions/index.js | 2 +- .../Account/Transactions/transactions.js | 2 +- js/src/views/Account/account.js | 2 +- js/src/views/Account/index.js | 2 +- js/src/views/Accounts/List/index.js | 2 +- js/src/views/Accounts/List/list.js | 2 +- js/src/views/Accounts/Summary/index.js | 2 +- js/src/views/Accounts/Summary/summary.js | 2 +- js/src/views/Accounts/accounts.js | 2 +- js/src/views/Accounts/index.js | 2 +- js/src/views/Address/Delete/delete.js | 2 +- js/src/views/Address/Delete/index.js | 2 +- js/src/views/Address/address.js | 2 +- js/src/views/Address/index.js | 2 +- js/src/views/Addresses/addresses.js | 2 +- js/src/views/Addresses/index.js | 2 +- .../views/Application/Container/container.js | 2 +- js/src/views/Application/Container/index.js | 2 +- .../DappContainer/dappContainer.js | 2 +- .../views/Application/DappContainer/index.js | 2 +- .../Application/FrameError/frameError.js | 2 +- js/src/views/Application/FrameError/index.js | 2 +- js/src/views/Application/Snackbar/index.js | 2 +- js/src/views/Application/Snackbar/snackbar.js | 2 +- js/src/views/Application/Status/index.js | 2 +- js/src/views/Application/Status/status.js | 2 +- js/src/views/Application/TabBar/index.js | 2 +- js/src/views/Application/TabBar/tabBar.js | 2 +- js/src/views/Application/application.js | 2 +- js/src/views/Application/index.js | 2 +- js/src/views/Application/store.js | 2 +- js/src/views/Connection/connection.js | 2 +- js/src/views/Connection/index.js | 2 +- js/src/views/Contract/Events/Event/event.js | 2 +- js/src/views/Contract/Events/Event/index.js | 2 +- js/src/views/Contract/Events/events.js | 2 +- js/src/views/Contract/Events/index.js | 2 +- js/src/views/Contract/Queries/index.js | 2 +- js/src/views/Contract/Queries/inputQuery.js | 2 +- js/src/views/Contract/Queries/queries.js | 2 +- js/src/views/Contract/contract.js | 2 +- js/src/views/Contract/index.js | 2 +- js/src/views/Contracts/Summary/index.js | 2 +- js/src/views/Contracts/Summary/summary.js | 2 +- js/src/views/Contracts/contracts.js | 2 +- js/src/views/Contracts/index.js | 2 +- js/src/views/Dapp/dapp.js | 2 +- js/src/views/Dapp/index.js | 2 +- js/src/views/Dapps/AddDapps/AddDapps.js | 2 +- js/src/views/Dapps/AddDapps/index.js | 2 +- js/src/views/Dapps/Summary/index.js | 2 +- js/src/views/Dapps/Summary/summary.js | 2 +- js/src/views/Dapps/dapps.js | 2 +- js/src/views/Dapps/dappsStore.js | 2 +- js/src/views/Dapps/index.js | 2 +- js/src/views/ParityBar/index.js | 2 +- js/src/views/ParityBar/parityBar.js | 2 +- .../views/Settings/Background/background.js | 2 +- js/src/views/Settings/Background/index.js | 2 +- js/src/views/Settings/Parity/index.js | 2 +- js/src/views/Settings/Parity/parity.js | 2 +- js/src/views/Settings/Proxy/index.js | 2 +- js/src/views/Settings/Proxy/proxy.js | 2 +- js/src/views/Settings/Views/defaults.js | 2 +- js/src/views/Settings/Views/index.js | 2 +- js/src/views/Settings/Views/views.js | 2 +- js/src/views/Settings/actions.js | 2 +- js/src/views/Settings/index.js | 2 +- js/src/views/Settings/middleware.js | 2 +- js/src/views/Settings/reducers.js | 2 +- js/src/views/Settings/settings.js | 2 +- .../Signer/components/Account/Account.js | 2 +- .../Account/AccountLink/AccountLink.js | 2 +- .../components/Account/AccountLink/index.js | 2 +- .../views/Signer/components/Account/index.js | 2 +- .../Signer/components/RequestPending/index.js | 2 +- .../RequestPending/requestPending.js | 2 +- .../components/SignRequest/SignRequest.js | 2 +- .../Signer/components/SignRequest/index.js | 2 +- .../TransactionMainDetails.js | 2 +- .../TransactionMainDetails/index.js | 2 +- .../TransactionPending/TransactionPending.js | 2 +- .../components/TransactionPending/index.js | 2 +- .../TransactionPendingForm.js | 2 +- .../TransactionPendingFormConfirm.js | 2 +- .../TransactionPendingFormConfirm/index.js | 2 +- .../TransactionPendingFormReject.js | 2 +- .../TransactionPendingFormReject/index.js | 2 +- .../TransactionPendingForm/index.js | 2 +- .../components/TxHashLink/TxHashLink.js | 2 +- .../Signer/components/TxHashLink/index.js | 2 +- js/src/views/Signer/components/util/logger.js | 2 +- js/src/views/Signer/components/util/react.js | 2 +- .../Signer/components/util/transaction.js | 2 +- .../components/util/transaction.spec.js | 2 +- js/src/views/Signer/components/util/util.js | 2 +- .../Signer/containers/Embedded/embedded.js | 2 +- .../views/Signer/containers/Embedded/index.js | 2 +- .../containers/RequestsPage/RequestsPage.js | 2 +- .../Signer/containers/RequestsPage/index.js | 2 +- js/src/views/Signer/index.js | 2 +- js/src/views/Signer/signer.js | 2 +- js/src/views/Signer/store.js | 2 +- js/src/views/Signer/utils/extension.js | 2 +- js/src/views/Signer/utils/utils.js | 2 +- js/src/views/Status/actions/app.js | 2 +- js/src/views/Status/actions/clipboard.js | 2 +- js/src/views/Status/actions/debug.js | 2 +- js/src/views/Status/actions/localstorage.js | 2 +- js/src/views/Status/actions/logger.js | 2 +- js/src/views/Status/actions/mining.js | 2 +- js/src/views/Status/actions/modify-mining.js | 2 +- js/src/views/Status/actions/rpc.js | 2 +- js/src/views/Status/actions/status.js | 2 +- .../components/AutoComplete/AutoComplete.js | 2 +- .../AutoComplete/AutoComplete.spec.js | 2 +- .../Status/components/AutoComplete/index.js | 2 +- js/src/views/Status/components/Box/Box.js | 2 +- .../views/Status/components/Box/Box.spec.js | 2 +- js/src/views/Status/components/Box/index.js | 2 +- js/src/views/Status/components/Call/Call.js | 2 +- .../views/Status/components/Call/Call.spec.js | 2 +- js/src/views/Status/components/Call/index.js | 2 +- js/src/views/Status/components/Calls/Calls.js | 2 +- .../Status/components/Calls/Calls.spec.js | 2 +- js/src/views/Status/components/Calls/index.js | 2 +- .../components/CallsToolbar/CallsToolbar.js | 2 +- .../CallsToolbar/CallsToolbar.spec.js | 2 +- .../Status/components/CallsToolbar/index.js | 2 +- js/src/views/Status/components/Debug/debug.js | 2 +- js/src/views/Status/components/Debug/index.js | 2 +- .../components/EditableValue/EditableValue.js | 2 +- .../Status/components/EditableValue/index.js | 2 +- .../components/JsonEditor/JsonEditor.js | 2 +- .../Status/components/JsonEditor/index.js | 2 +- .../Status/components/Markdown/Markdown.js | 2 +- .../views/Status/components/Markdown/index.js | 2 +- .../MiningSettings/decodeExtraData.js | 2 +- .../MiningSettings/decodeExtraData.spec.js | 2 +- .../Status/components/MiningSettings/index.js | 2 +- .../MiningSettings/miningSettings.js | 2 +- .../MiningSettings/numberFromString.js | 2 +- .../MiningSettings/numberFromString.spec.js | 2 +- .../Status/components/Response/Response.js | 2 +- .../components/Response/Response.spec.js | 2 +- .../views/Status/components/Response/index.js | 2 +- .../Status/components/RpcCalls/RpcCalls.js | 2 +- .../views/Status/components/RpcCalls/index.js | 2 +- .../Status/components/RpcDocs/RpcDocs.js | 2 +- .../views/Status/components/RpcDocs/index.js | 2 +- .../views/Status/components/RpcNav/RpcNav.js | 2 +- .../views/Status/components/RpcNav/index.js | 2 +- .../ScrollTopButton/ScrollTopButton.js | 2 +- .../components/ScrollTopButton/index.js | 2 +- .../Status/components/ScrollTopButton/util.js | 2 +- .../views/Status/components/Status/index.js | 2 +- .../views/Status/components/Status/status.js | 2 +- js/src/views/Status/constants/index.js | 2 +- .../Status/containers/RpcPage/RpcPage.js | 2 +- .../views/Status/containers/RpcPage/index.js | 2 +- .../Status/containers/StatusPage/index.js | 2 +- .../containers/StatusPage/statusPage.js | 2 +- js/src/views/Status/index.js | 2 +- js/src/views/Status/middleware/index.js | 2 +- .../views/Status/middleware/localstorage.js | 2 +- .../Status/middleware/localstorage.spec.js | 2 +- js/src/views/Status/reducers/debug.js | 2 +- js/src/views/Status/reducers/index.js | 2 +- js/src/views/Status/reducers/logger.js | 2 +- js/src/views/Status/reducers/mining.js | 2 +- js/src/views/Status/reducers/rpc.js | 2 +- js/src/views/Status/reducers/settings.js | 2 +- js/src/views/Status/reducers/status.js | 2 +- js/src/views/Status/status.js | 2 +- js/src/views/Status/util/error.js | 2 +- js/src/views/Status/util/error.spec.js | 2 +- js/src/views/Status/util/index.js | 2 +- js/src/views/Status/util/index.spec.js | 2 +- js/src/views/Status/util/react.js | 2 +- js/src/views/Status/util/rpc-md.js | 2 +- .../Wallet/Confirmations/confirmations.js | 2 +- js/src/views/Wallet/Confirmations/index.js | 2 +- js/src/views/Wallet/Details/details.js | 2 +- js/src/views/Wallet/Details/index.js | 2 +- js/src/views/Wallet/Transactions/index.js | 2 +- .../views/Wallet/Transactions/transactions.js | 2 +- js/src/views/Wallet/index.js | 2 +- js/src/views/Wallet/wallet.js | 2 +- js/src/views/WriteContract/index.js | 2 +- js/src/views/WriteContract/writeContract.js | 2 +- .../views/WriteContract/writeContractStore.js | 2 +- js/src/views/index.js | 2 +- js/src/web3.js | 2 +- js/test/babel.js | 2 +- js/test/e2e/ethapi.js | 2 +- js/test/mocha.config.js | 2 +- js/test/mockRpc.js | 2 +- js/test/npmParity.js | 2 +- js/test/types.js | 2 +- js/webpack/app.js | 2 +- js/webpack/build.server.js | 2 +- js/webpack/dev.server.js | 2 +- js/webpack/libraries.js | 2 +- js/webpack/npm.js | 2 +- js/webpack/shared.js | 2 +- js/webpack/test.js | 2 +- js/webpack/vendor.js | 2 +- json/Cargo.toml | 2 +- json/build.rs | 2 +- json/src/blockchain/account.rs | 2 +- json/src/blockchain/block.rs | 2 +- json/src/blockchain/blockchain.rs | 2 +- json/src/blockchain/header.rs | 2 +- json/src/blockchain/mod.rs | 2 +- json/src/blockchain/state.rs | 2 +- json/src/blockchain/test.rs | 2 +- json/src/blockchain/transaction.rs | 2 +- json/src/bytes.rs | 2 +- json/src/hash.rs | 2 +- json/src/lib.rs | 2 +- json/src/lib.rs.in | 2 +- json/src/misc/account_meta.rs | 2 +- json/src/misc/dapps_settings.rs | 2 +- json/src/misc/mod.rs | 2 +- json/src/spec/account.rs | 2 +- json/src/spec/authority_round.rs | 2 +- json/src/spec/basic_authority.rs | 2 +- json/src/spec/builtin.rs | 2 +- json/src/spec/engine.rs | 2 +- json/src/spec/ethash.rs | 2 +- json/src/spec/genesis.rs | 2 +- json/src/spec/mod.rs | 2 +- json/src/spec/params.rs | 2 +- json/src/spec/seal.rs | 2 +- json/src/spec/spec.rs | 2 +- json/src/spec/state.rs | 2 +- json/src/state/log.rs | 2 +- json/src/state/mod.rs | 2 +- json/src/state/state.rs | 2 +- json/src/state/test.rs | 2 +- json/src/state/transaction.rs | 2 +- json/src/transaction/mod.rs | 2 +- json/src/transaction/test.rs | 2 +- json/src/transaction/transaction.rs | 2 +- json/src/transaction/txtest.rs | 2 +- json/src/trie/input.rs | 2 +- json/src/trie/mod.rs | 2 +- json/src/trie/test.rs | 2 +- json/src/trie/trie.rs | 2 +- json/src/uint.rs | 2 +- json/src/vm/call.rs | 2 +- json/src/vm/env.rs | 2 +- json/src/vm/log.rs | 2 +- json/src/vm/mod.rs | 2 +- json/src/vm/test.rs | 2 +- json/src/vm/transaction.rs | 2 +- json/src/vm/vm.rs | 2 +- license_header | 2 +- logger/Cargo.toml | 2 +- logger/src/lib.rs | 2 +- parity/account.rs | 2 +- parity/blockchain.rs | 2 +- parity/boot.rs | 2 +- parity/cache.rs | 2 +- parity/cli/mod.rs | 2 +- parity/cli/usage.rs | 2 +- parity/configuration.rs | 2 +- parity/dapps.rs | 2 +- parity/deprecated.rs | 2 +- parity/dir.rs | 2 +- parity/helpers.rs | 2 +- parity/informant.rs | 2 +- parity/main.rs | 8 +- parity/migration.rs | 2 +- parity/modules.rs | 2 +- parity/operations.rs | 359 --------------- parity/params.rs | 2 +- parity/presale.rs | 2 +- parity/rpc.rs | 2 +- parity/rpc_apis.rs | 5 +- parity/run.rs | 3 +- parity/signer.rs | 2 +- parity/snapshot.rs | 2 +- parity/stratum.rs | 2 +- parity/sync.rs | 2 +- parity/updater.rs | 393 ----------------- parity/upgrade.rs | 2 +- parity/url.rs | 2 +- parity/user_defaults.rs | 2 +- rpc/Cargo.toml | 2 +- rpc/build.rs | 2 +- rpc/rpctest/Cargo.toml | 2 +- rpc/rpctest/src/main.rs | 2 +- rpc/src/lib.rs | 2 +- rpc/src/v1/helpers/auto_args.rs | 2 +- rpc/src/v1/helpers/block_import.rs | 2 +- rpc/src/v1/helpers/dispatch.rs | 2 +- rpc/src/v1/helpers/errors.rs | 2 +- rpc/src/v1/helpers/mod.rs | 2 +- rpc/src/v1/helpers/network_settings.rs | 2 +- rpc/src/v1/helpers/params.rs | 2 +- rpc/src/v1/helpers/poll_manager.rs | 2 +- rpc/src/v1/helpers/requests.rs | 2 +- rpc/src/v1/helpers/signer.rs | 2 +- rpc/src/v1/helpers/signing_queue.rs | 2 +- rpc/src/v1/impls/eth.rs | 2 +- rpc/src/v1/impls/eth_filter.rs | 2 +- rpc/src/v1/impls/mod.rs | 2 +- rpc/src/v1/impls/net.rs | 2 +- rpc/src/v1/impls/parity.rs | 2 +- rpc/src/v1/impls/parity_accounts.rs | 2 +- rpc/src/v1/impls/parity_set.rs | 2 +- rpc/src/v1/impls/personal.rs | 2 +- rpc/src/v1/impls/rpc.rs | 2 +- rpc/src/v1/impls/signer.rs | 2 +- rpc/src/v1/impls/signing.rs | 2 +- rpc/src/v1/impls/signing_unsafe.rs | 2 +- rpc/src/v1/impls/traces.rs | 2 +- rpc/src/v1/impls/web3.rs | 2 +- rpc/src/v1/mod.rs | 2 +- rpc/src/v1/tests/helpers/fetch.rs | 2 +- rpc/src/v1/tests/helpers/miner_service.rs | 2 +- rpc/src/v1/tests/helpers/mod.rs | 2 +- rpc/src/v1/tests/helpers/snapshot_service.rs | 2 +- rpc/src/v1/tests/helpers/sync_provider.rs | 2 +- rpc/src/v1/tests/mocked/eth.rs | 2 +- rpc/src/v1/tests/mocked/manage_network.rs | 2 +- rpc/src/v1/tests/mocked/mod.rs | 2 +- rpc/src/v1/tests/mocked/net.rs | 2 +- rpc/src/v1/tests/mocked/parity.rs | 2 +- rpc/src/v1/tests/mocked/parity_accounts.rs | 2 +- rpc/src/v1/tests/mocked/parity_set.rs | 2 +- rpc/src/v1/tests/mocked/personal.rs | 2 +- rpc/src/v1/tests/mocked/rpc.rs | 2 +- rpc/src/v1/tests/mocked/signer.rs | 2 +- rpc/src/v1/tests/mocked/signing.rs | 2 +- rpc/src/v1/tests/mocked/web3.rs | 2 +- rpc/src/v1/traits/eth.rs | 2 +- rpc/src/v1/traits/eth_signing.rs | 2 +- rpc/src/v1/traits/mod.rs | 2 +- rpc/src/v1/traits/net.rs | 2 +- rpc/src/v1/traits/parity.rs | 2 +- rpc/src/v1/traits/parity_accounts.rs | 2 +- rpc/src/v1/traits/parity_set.rs | 2 +- rpc/src/v1/traits/parity_signing.rs | 2 +- rpc/src/v1/traits/personal.rs | 2 +- rpc/src/v1/traits/rpc.rs | 2 +- rpc/src/v1/traits/signer.rs | 2 +- rpc/src/v1/traits/traces.rs | 2 +- rpc/src/v1/traits/web3.rs | 2 +- rpc/src/v1/types/block.rs | 2 +- rpc/src/v1/types/block_number.rs | 2 +- rpc/src/v1/types/bytes.rs | 2 +- rpc/src/v1/types/call_request.rs | 2 +- rpc/src/v1/types/confirmations.rs | 2 +- rpc/src/v1/types/dapp_id.rs | 2 +- rpc/src/v1/types/filter.rs | 2 +- rpc/src/v1/types/hash.rs | 2 +- rpc/src/v1/types/histogram.rs | 2 +- rpc/src/v1/types/index.rs | 2 +- rpc/src/v1/types/log.rs | 2 +- rpc/src/v1/types/mod.rs | 2 +- rpc/src/v1/types/mod.rs.in | 2 +- rpc/src/v1/types/receipt.rs | 2 +- rpc/src/v1/types/rpc_settings.rs | 2 +- rpc/src/v1/types/sync.rs | 2 +- rpc/src/v1/types/trace.rs | 2 +- rpc/src/v1/types/trace_filter.rs | 2 +- rpc/src/v1/types/transaction.rs | 2 +- rpc/src/v1/types/transaction_request.rs | 2 +- rpc/src/v1/types/uint.rs | 2 +- rpc/src/v1/types/work.rs | 2 +- signer/Cargo.toml | 4 +- signer/build.rs | 2 +- signer/src/authcode_store.rs | 2 +- signer/src/lib.rs | 2 +- signer/src/tests/mod.rs | 2 +- signer/src/ws_server/mod.rs | 2 +- signer/src/ws_server/session.rs | 2 +- stratum/Cargo.toml | 2 +- stratum/build.rs | 2 +- stratum/src/lib.rs | 2 +- stratum/src/traits.rs | 2 +- sync/Cargo.toml | 2 +- sync/build.rs | 2 +- sync/src/api.rs | 2 +- sync/src/block_sync.rs | 2 +- sync/src/blocks.rs | 2 +- sync/src/chain.rs | 2 +- sync/src/lib.rs | 2 +- sync/src/snapshot.rs | 2 +- sync/src/sync_io.rs | 2 +- sync/src/tests/chain.rs | 2 +- sync/src/tests/consensus.rs | 2 +- sync/src/tests/helpers.rs | 2 +- sync/src/tests/mod.rs | 2 +- sync/src/tests/rpc.rs | 2 +- sync/src/tests/snapshot.rs | 2 +- sync/src/transactions_stats.rs | 2 +- util/Cargo.toml | 4 +- util/benches/bigint.rs | 2 +- util/benches/rlp.rs | 2 +- util/benches/trie.rs | 2 +- util/bigint/Cargo.toml | 4 +- util/bigint/build.rs | 2 +- util/bigint/src/hash.rs | 2 +- util/bigint/src/lib.rs | 2 +- util/bigint/src/uint.rs | 2 +- util/bloom/Cargo.toml | 2 +- util/bloom/src/lib.rs | 2 +- util/build.rs | 2 +- util/fetch/Cargo.toml | 6 +- util/fetch/src/client.rs | 2 +- util/fetch/src/fetch_file.rs | 2 +- util/fetch/src/lib.rs | 2 +- util/https-fetch/Cargo.toml | 5 +- util/https-fetch/src/client.rs | 2 +- util/https-fetch/src/http.rs | 2 +- util/https-fetch/src/lib.rs | 2 +- util/https-fetch/src/tlsclient.rs | 2 +- util/https-fetch/src/url.rs | 2 +- util/io/Cargo.toml | 4 +- util/io/src/lib.rs | 2 +- util/io/src/panics.rs | 2 +- util/io/src/service.rs | 2 +- util/io/src/worker.rs | 2 +- util/network/Cargo.toml | 4 +- util/network/src/connection.rs | 2 +- util/network/src/discovery.rs | 2 +- util/network/src/error.rs | 2 +- util/network/src/handshake.rs | 2 +- util/network/src/host.rs | 2 +- util/network/src/ip_utils.rs | 2 +- util/network/src/lib.rs | 2 +- util/network/src/node_table.rs | 2 +- util/network/src/service.rs | 2 +- util/network/src/session.rs | 2 +- util/network/src/stats.rs | 2 +- util/network/src/tests.rs | 2 +- util/rlp/Cargo.toml | 2 +- util/rlp/src/bytes.rs | 2 +- util/rlp/src/commonrlps.rs | 2 +- util/rlp/src/lib.rs | 2 +- util/rlp/src/rlpcompression.rs | 2 +- util/rlp/src/rlperrors.rs | 2 +- util/rlp/src/rlpin.rs | 2 +- util/rlp/src/rlpstream.rs | 2 +- util/rlp/src/rlptraits.rs | 2 +- util/rlp/src/tests.rs | 2 +- util/rlp/src/untrusted_rlp.rs | 2 +- util/sha3/Cargo.toml | 4 +- util/sha3/build.rs | 2 +- util/sha3/src/lib.rs | 2 +- util/src/bloom.rs | 2 +- util/src/bytes.rs | 2 +- util/src/cache.rs | 2 +- util/src/common.rs | 2 +- util/src/error.rs | 2 +- util/src/from_json.rs | 2 +- util/src/hashdb.rs | 2 +- util/src/journaldb/archivedb.rs | 2 +- util/src/journaldb/earlymergedb.rs | 2 +- util/src/journaldb/mod.rs | 2 +- util/src/journaldb/overlayrecentdb.rs | 2 +- util/src/journaldb/refcounteddb.rs | 2 +- util/src/journaldb/traits.rs | 2 +- util/src/kvdb.rs | 2 +- util/src/lib.rs | 2 +- util/src/log.rs | 2 +- util/src/memorydb.rs | 2 +- util/src/migration/mod.rs | 2 +- util/src/migration/tests.rs | 2 +- util/src/misc.rs | 2 +- util/src/nibbleslice.rs | 2 +- util/src/nibblevec.rs | 2 +- util/src/overlaydb.rs | 2 +- util/src/path.rs | 2 +- util/src/semantic_version.rs | 2 +- util/src/sha3.rs | 2 +- util/src/snappy.rs | 2 +- util/src/standard.rs | 2 +- util/src/stats.rs | 2 +- util/src/timer.rs | 2 +- util/src/trie/fatdb.rs | 2 +- util/src/trie/fatdbmut.rs | 2 +- util/src/trie/journal.rs | 2 +- util/src/trie/mod.rs | 2 +- util/src/trie/node.rs | 2 +- util/src/trie/recorder.rs | 2 +- util/src/trie/sectriedb.rs | 2 +- util/src/trie/sectriedbmut.rs | 2 +- util/src/trie/standardmap.rs | 2 +- util/src/trie/triedb.rs | 2 +- util/src/trie/triedbmut.rs | 2 +- util/src/triehash.rs | 2 +- util/src/vector.rs | 2 +- util/table/Cargo.toml | 2 +- util/table/src/lib.rs | 2 +- util/using_queue/Cargo.toml | 2 +- util/using_queue/src/lib.rs | 2 +- windows/ptray/ptray.cpp | 2 +- 1466 files changed, 1513 insertions(+), 2855 deletions(-) delete mode 100644 ethcore/hash-fetch/Cargo.toml delete mode 100644 ethcore/hash-fetch/res/registrar.json delete mode 100644 ethcore/hash-fetch/res/urlhint.json delete mode 100644 ethcore/hash-fetch/src/client.rs delete mode 100644 ethcore/hash-fetch/src/lib.rs delete mode 100644 ethcore/hash-fetch/src/urlhint.rs delete mode 100644 parity/operations.rs delete mode 100644 parity/updater.rs diff --git a/Cargo.lock b/Cargo.lock index 13e9bc51fad..821128afa81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,11 +8,9 @@ dependencies = [ "daemonize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.5.0", "ethcore-dapps 1.5.0", "ethcore-devtools 1.5.0", - "ethcore-hash-fetch 1.5.0", "ethcore-io 1.5.0", "ethcore-ipc 1.5.0", "ethcore-ipc-codegen 1.5.0", @@ -33,6 +31,8 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-hash-fetch 1.5.0", + "parity-updater 1.5.0", "regex 0.1.68 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.1.0", "rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -347,7 +347,6 @@ dependencies = [ "clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-devtools 1.5.0", - "ethcore-hash-fetch 1.5.0", "ethcore-rpc 1.5.0", "ethcore-util 1.5.0", "fetch 0.1.0", @@ -359,6 +358,7 @@ dependencies = [ "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-hash-fetch 1.5.0", "parity-ui 1.5.0", "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)", @@ -378,18 +378,6 @@ dependencies = [ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ethcore-hash-fetch" -version = "1.5.0" -dependencies = [ - "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ethcore-util 1.5.0", - "fetch 0.1.0", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ethcore-io" version = "1.5.0" @@ -774,6 +762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "https-fetch" version = "0.1.0" dependencies = [ + "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.5.1 (git+https://github.com/ethcore/mio?branch=v0.5.x)", "rustls 0.1.2 (git+https://github.com/ctz/rustls)", @@ -1274,6 +1263,18 @@ dependencies = [ "syntex_syntax 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parity-hash-fetch" +version = "1.5.0" +dependencies = [ + "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore-util 1.5.0", + "fetch 0.1.0", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parity-ui" version = "1.5.0" @@ -1298,6 +1299,17 @@ dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parity-updater" +version = "1.5.0" +dependencies = [ + "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ethcore 1.5.0", + "ethcore-util 1.5.0", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-hash-fetch 1.5.0", +] + [[package]] name = "parking_lot" version = "0.2.8" diff --git a/Cargo.toml b/Cargo.toml index beab0717724..6f3f50f782f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] -description = "Ethcore client." +description = "Parity Ethereum client" name = "parity" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] @@ -31,24 +31,24 @@ serde_json = "0.8.0" hyper = { version = "0.9", default-features = false } ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" } fdlimit = "0.1" +clippy = { version = "0.0.103", optional = true} +rlp = { path = "util/rlp" } +ethsync = { path = "sync" } ethcore = { path = "ethcore" } ethcore-util = { path = "util" } -ethsync = { path = "sync" } ethcore-io = { path = "util/io" } ethcore-devtools = { path = "devtools" } ethcore-rpc = { path = "rpc" } ethcore-signer = { path = "signer" } -ethcore-ipc-nano = { path = "ipc/nano" } ethcore-ipc = { path = "ipc/rpc" } +ethcore-ipc-nano = { path = "ipc/nano" } ethcore-ipc-hypervisor = { path = "ipc/hypervisor" } ethcore-logger = { path = "logger" } -ethcore-hash-fetch = { path = "ethcore/hash-fetch" } -rlp = { path = "util/rlp" } ethcore-stratum = { path = "stratum" } ethcore-dapps = { path = "dapps", optional = true } -clippy = { version = "0.0.103", optional = true} ethcore-light = { path = "ethcore/light" } -ethabi = "0.2.2" +parity-hash-fetch = { path = "hash-fetch" } +parity-updater = { path = "updater" } [target.'cfg(windows)'.dependencies] winapi = "0.2" diff --git a/build.rs b/build.rs index 41b9a1b3eca..28cd9ef697c 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/Cargo.toml b/dapps/Cargo.toml index bbab8420e1c..75e8e346c06 100644 --- a/dapps/Cargo.toml +++ b/dapps/Cargo.toml @@ -3,7 +3,7 @@ description = "Parity Dapps crate" name = "ethcore-dapps" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] build = "build.rs" [lib] @@ -30,9 +30,9 @@ zip = { version = "0.1", default-features = false } ethcore-devtools = { path = "../devtools" } ethcore-rpc = { path = "../rpc" } ethcore-util = { path = "../util" } -ethcore-hash-fetch = { path = "../ethcore/hash-fetch" } fetch = { path = "../util/fetch" } parity-ui = { path = "./ui" } +parity-hash-fetch = { path = "../hash-fetch" } clippy = { version = "0.0.103", optional = true} diff --git a/dapps/build.rs b/dapps/build.rs index b178027ae5b..d2a7919db0c 100644 --- a/dapps/build.rs +++ b/dapps/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/Cargo.toml b/dapps/js-glue/Cargo.toml index 827c67ef5c6..8832624a82c 100644 --- a/dapps/js-glue/Cargo.toml +++ b/dapps/js-glue/Cargo.toml @@ -3,7 +3,7 @@ description = "Base Package for all Parity built-in dapps" name = "parity-dapps-glue" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] build = "build.rs" [build-dependencies] diff --git a/dapps/js-glue/build.rs b/dapps/js-glue/build.rs index 82f99018857..b81724774b0 100644 --- a/dapps/js-glue/build.rs +++ b/dapps/js-glue/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/codegen.rs b/dapps/js-glue/src/codegen.rs index 1a6b6fc7ebd..e51a8333df1 100644 --- a/dapps/js-glue/src/codegen.rs +++ b/dapps/js-glue/src/codegen.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/js.rs b/dapps/js-glue/src/js.rs index 39c33689c81..31946fc58fd 100644 --- a/dapps/js-glue/src/js.rs +++ b/dapps/js-glue/src/js.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/lib.rs b/dapps/js-glue/src/lib.rs index 28ac8d71201..70cba4e9aef 100644 --- a/dapps/js-glue/src/lib.rs +++ b/dapps/js-glue/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/js-glue/src/lib.rs.in b/dapps/js-glue/src/lib.rs.in index 07c57705f2d..1abf6a3e6d4 100644 --- a/dapps/js-glue/src/lib.rs.in +++ b/dapps/js-glue/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/api.rs b/dapps/src/api/api.rs index 90ab837f52d..44039689885 100644 --- a/dapps/src/api/api.rs +++ b/dapps/src/api/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/mod.rs b/dapps/src/api/mod.rs index 402e8425722..fa0b1f01b6a 100644 --- a/dapps/src/api/mod.rs +++ b/dapps/src/api/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/response.rs b/dapps/src/api/response.rs index 3e8f196ecd2..bb1be24487a 100644 --- a/dapps/src/api/response.rs +++ b/dapps/src/api/response.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/types.rs b/dapps/src/api/types.rs index 64697123ba7..a6815105f4e 100644 --- a/dapps/src/api/types.rs +++ b/dapps/src/api/types.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/api/types.rs.in b/dapps/src/api/types.rs.in index a95a0d446b9..48fd00e39cf 100644 --- a/dapps/src/api/types.rs.in +++ b/dapps/src/api/types.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/cache.rs b/dapps/src/apps/cache.rs index 9d1642fb086..3f531fe419a 100644 --- a/dapps/src/apps/cache.rs +++ b/dapps/src/apps/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/fetcher.rs b/dapps/src/apps/fetcher.rs index e7f36d14494..2430af03561 100644 --- a/dapps/src/apps/fetcher.rs +++ b/dapps/src/apps/fetcher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/fs.rs b/dapps/src/apps/fs.rs index f0b4ddfa88e..b7188b0b48d 100644 --- a/dapps/src/apps/fs.rs +++ b/dapps/src/apps/fs.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/manifest.rs b/dapps/src/apps/manifest.rs index 6d9874b8621..62571d71d70 100644 --- a/dapps/src/apps/manifest.rs +++ b/dapps/src/apps/manifest.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/apps/mod.rs b/dapps/src/apps/mod.rs index 4c9270aa5f2..3f3b1aabad8 100644 --- a/dapps/src/apps/mod.rs +++ b/dapps/src/apps/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/endpoint.rs b/dapps/src/endpoint.rs index eea7a872fd2..ccf71664493 100644 --- a/dapps/src/endpoint.rs +++ b/dapps/src/endpoint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/auth.rs b/dapps/src/handlers/auth.rs index 7f72f7cf8af..797fdf29f3a 100644 --- a/dapps/src/handlers/auth.rs +++ b/dapps/src/handlers/auth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/content.rs b/dapps/src/handlers/content.rs index fde5fbcf0ca..42bb2fc488f 100644 --- a/dapps/src/handlers/content.rs +++ b/dapps/src/handlers/content.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/echo.rs b/dapps/src/handlers/echo.rs index 165ceb17173..afe67994478 100644 --- a/dapps/src/handlers/echo.rs +++ b/dapps/src/handlers/echo.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/fetch.rs b/dapps/src/handlers/fetch.rs index a34b58fa7a9..6fb524293f8 100644 --- a/dapps/src/handlers/fetch.rs +++ b/dapps/src/handlers/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/mod.rs b/dapps/src/handlers/mod.rs index 1299a9c1207..bb292ad4dd3 100644 --- a/dapps/src/handlers/mod.rs +++ b/dapps/src/handlers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/handlers/redirect.rs b/dapps/src/handlers/redirect.rs index e43d32e24f0..d97f559b777 100644 --- a/dapps/src/handlers/redirect.rs +++ b/dapps/src/handlers/redirect.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/lib.rs b/dapps/src/lib.rs index 9bb3be4a7c8..72a2465968f 100644 --- a/dapps/src/lib.rs +++ b/dapps/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -57,7 +57,7 @@ extern crate mime_guess; extern crate rustc_serialize; extern crate ethcore_rpc; extern crate ethcore_util as util; -extern crate ethcore_hash_fetch as hash_fetch; +extern crate parity_hash_fetch as hash_fetch; extern crate linked_hash_map; extern crate fetch; extern crate parity_dapps_glue as parity_dapps; diff --git a/dapps/src/page/builtin.rs b/dapps/src/page/builtin.rs index 40c0e23a603..3fbfcff1634 100644 --- a/dapps/src/page/builtin.rs +++ b/dapps/src/page/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/handler.rs b/dapps/src/page/handler.rs index 1494a04c7e6..382dfa5d1a7 100644 --- a/dapps/src/page/handler.rs +++ b/dapps/src/page/handler.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/local.rs b/dapps/src/page/local.rs index ec24cac3699..77c91019db7 100644 --- a/dapps/src/page/local.rs +++ b/dapps/src/page/local.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/page/mod.rs b/dapps/src/page/mod.rs index 92c066df338..9619f1b10d9 100644 --- a/dapps/src/page/mod.rs +++ b/dapps/src/page/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/proxypac.rs b/dapps/src/proxypac.rs index 88ecb6ab310..8ca87a1e29d 100644 --- a/dapps/src/proxypac.rs +++ b/dapps/src/proxypac.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/router/auth.rs b/dapps/src/router/auth.rs index a220e2ab065..e6b781f3d26 100644 --- a/dapps/src/router/auth.rs +++ b/dapps/src/router/auth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/router/host_validation.rs b/dapps/src/router/host_validation.rs index 802466efde0..57634e07a89 100644 --- a/dapps/src/router/host_validation.rs +++ b/dapps/src/router/host_validation.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/router/mod.rs b/dapps/src/router/mod.rs index c0a33f2eba7..b444b1526ff 100644 --- a/dapps/src/router/mod.rs +++ b/dapps/src/router/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/rpc.rs b/dapps/src/rpc.rs index c47777bee58..f7d988ce8df 100644 --- a/dapps/src/rpc.rs +++ b/dapps/src/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/api.rs b/dapps/src/tests/api.rs index ea4c08c60f2..5edfa20f5f2 100644 --- a/dapps/src/tests/api.rs +++ b/dapps/src/tests/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/authorization.rs b/dapps/src/tests/authorization.rs index 86fe4d20720..3c16f6296c9 100644 --- a/dapps/src/tests/authorization.rs +++ b/dapps/src/tests/authorization.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/fetch.rs b/dapps/src/tests/fetch.rs index d50b2bddee3..8540a407f6f 100644 --- a/dapps/src/tests/fetch.rs +++ b/dapps/src/tests/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/helpers.rs b/dapps/src/tests/helpers.rs index 289753dbfee..87edd00e000 100644 --- a/dapps/src/tests/helpers.rs +++ b/dapps/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/mod.rs b/dapps/src/tests/mod.rs index cc0e693c965..d936bf848d2 100644 --- a/dapps/src/tests/mod.rs +++ b/dapps/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/redirection.rs b/dapps/src/tests/redirection.rs index b0a5ca9a2c8..b676616a431 100644 --- a/dapps/src/tests/redirection.rs +++ b/dapps/src/tests/redirection.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/tests/validation.rs b/dapps/src/tests/validation.rs index ae02a6c2ccc..6124542c770 100644 --- a/dapps/src/tests/validation.rs +++ b/dapps/src/tests/validation.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/src/url.rs b/dapps/src/url.rs index c9eb2f78fd2..b8b8393cc62 100644 --- a/dapps/src/url.rs +++ b/dapps/src/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/dapps/ui/Cargo.toml b/dapps/ui/Cargo.toml index de8207b883a..e835bd820a5 100644 --- a/dapps/ui/Cargo.toml +++ b/dapps/ui/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore Parity UI" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "parity-ui" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [build-dependencies] rustc_version = "0.1" diff --git a/dapps/ui/src/lib.rs b/dapps/ui/src/lib.rs index 6a69a503df2..286007451e8 100644 --- a/dapps/ui/src/lib.rs +++ b/dapps/ui/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/Cargo.toml b/db/Cargo.toml index 2a327e5e3d1..d0e45a4895c 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore Database" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-db" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/db/build.rs b/db/build.rs index 239185d84ed..a5e55eed507 100644 --- a/db/build.rs +++ b/db/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/database.rs b/db/src/database.rs index 6504900e68d..36f349e323d 100644 --- a/db/src/database.rs +++ b/db/src/database.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/lib.rs b/db/src/lib.rs index 1daaf55c95f..a46e34487ed 100644 --- a/db/src/lib.rs +++ b/db/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/lib.rs.in b/db/src/lib.rs.in index 54fccb097da..31dbfd71ce2 100644 --- a/db/src/lib.rs.in +++ b/db/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/db/src/traits.rs b/db/src/traits.rs index fe4cd5d440d..ee4e502ac6b 100644 --- a/db/src/traits.rs +++ b/db/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/Cargo.toml b/devtools/Cargo.toml index 3b648c450c5..163bd7baf43 100644 --- a/devtools/Cargo.toml +++ b/devtools/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore development/test/build tools" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-devtools" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] rand = "0.3" diff --git a/devtools/src/http_client.rs b/devtools/src/http_client.rs index 2440a7cda84..bb3b896af54 100644 --- a/devtools/src/http_client.rs +++ b/devtools/src/http_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/lib.rs b/devtools/src/lib.rs index 87457f7f323..25d27a9e7e3 100644 --- a/devtools/src/lib.rs +++ b/devtools/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/random_path.rs b/devtools/src/random_path.rs index 9c6c261a27f..ee8c39ad327 100644 --- a/devtools/src/random_path.rs +++ b/devtools/src/random_path.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/stop_guard.rs b/devtools/src/stop_guard.rs index f1db5972528..8745f704857 100644 --- a/devtools/src/stop_guard.rs +++ b/devtools/src/stop_guard.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/devtools/src/test_socket.rs b/devtools/src/test_socket.rs index 0d38e66a5e8..33bb862abd1 100644 --- a/devtools/src/test_socket.rs +++ b/devtools/src/test_socket.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethash/Cargo.toml b/ethash/Cargo.toml index bf1ba990e2b..98ba22f5bfc 100644 --- a/ethash/Cargo.toml +++ b/ethash/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethash" version = "1.5.0" -authors = ["arkpar "] [lib] diff --git a/ethash/src/compute.rs b/ethash/src/compute.rs index 6fcf17cf1c6..269c3d8639d 100644 --- a/ethash/src/compute.rs +++ b/ethash/src/compute.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethash/src/lib.rs b/ethash/src/lib.rs index a04e2486b4f..06182bc50ed 100644 --- a/ethash/src/lib.rs +++ b/ethash/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index c6823952951..a815bddd6d9 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/ethcore/build.rs b/ethcore/build.rs index 5a3a3f0ba2b..fc93b1035e5 100644 --- a/ethcore/build.rs +++ b/ethcore/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/hash-fetch/Cargo.toml b/ethcore/hash-fetch/Cargo.toml deleted file mode 100644 index 4fb724c085d..00000000000 --- a/ethcore/hash-fetch/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -description = "Fetching hash-addressed content." -homepage = "https://ethcore.io" -license = "GPL-3.0" -name = "ethcore-hash-fetch" -version = "1.5.0" -authors = ["Ethcore "] - -[dependencies] -log = "0.3" -rustc-serialize = "0.3" -ethabi = "0.2.2" -mime_guess = "1.6.1" -fetch = { path = "../../util/fetch" } -ethcore-util = { path = "../../util" } diff --git a/ethcore/hash-fetch/res/registrar.json b/ethcore/hash-fetch/res/registrar.json deleted file mode 100644 index 38edcc7877f..00000000000 --- a/ethcore/hash-fetch/res/registrar.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - {"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"confirmReverse","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"bytes32"}],"name":"set","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"drop","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getAddress","outputs":[{"name":"","type":"address"}],"type":"function"}, - {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"setFee","outputs":[],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_to","type":"address"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"}, - {"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserved","outputs":[{"name":"reserved","type":"bool"}],"type":"function"}, - {"constant":false,"inputs":[],"name":"drain","outputs":[],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_who","type":"address"}],"name":"proposeReverse","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getUint","outputs":[{"name":"","type":"uint256"}],"type":"function"}, - {"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"get","outputs":[{"name":"","type":"bytes32"}],"type":"function"}, - {"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"type":"function"}, - {"constant":true,"inputs":[{"name":"","type":"address"}],"name":"reverse","outputs":[{"name":"","type":"string"}],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"uint256"}],"name":"setUint","outputs":[{"name":"success","type":"bool"}],"type":"function"}, - {"constant":false,"inputs":[],"name":"removeReverse","outputs":[],"type":"function"}, - {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"address"}],"name":"setAddress","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Drained","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Reserved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Dropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"key","type":"string"}],"name":"DataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"} -] diff --git a/ethcore/hash-fetch/res/urlhint.json b/ethcore/hash-fetch/res/urlhint.json deleted file mode 100644 index 629f166bbb1..00000000000 --- a/ethcore/hash-fetch/res/urlhint.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - {"constant":false,"inputs":[{"name":"_content","type":"bytes32"},{"name":"_url","type":"string"}],"name":"hintURL","outputs":[],"type":"function"}, - {"constant":false,"inputs":[{"name":"_content","type":"bytes32"},{"name":"_accountSlashRepo","type":"string"},{"name":"_commit","type":"bytes20"}],"name":"hint","outputs":[],"type":"function"}, - {"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"entries","outputs":[{"name":"accountSlashRepo","type":"string"},{"name":"commit","type":"bytes20"},{"name":"owner","type":"address"}],"type":"function"}, - {"constant":false,"inputs":[{"name":"_content","type":"bytes32"}],"name":"unhint","outputs":[],"type":"function"} -] diff --git a/ethcore/hash-fetch/src/client.rs b/ethcore/hash-fetch/src/client.rs deleted file mode 100644 index 20bde788d38..00000000000 --- a/ethcore/hash-fetch/src/client.rs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -//! Hash-addressed content resolver & fetcher. - -use std::{io, fs}; -use std::sync::Arc; -use std::path::PathBuf; - -use util::{Mutex, H256, sha3}; -use fetch::{Fetch, FetchError, Client as FetchClient}; - -use urlhint::{ContractClient, URLHintContract, URLHint, URLHintResult}; - -/// API for fetching by hash. -pub trait HashFetch: Send + Sync + 'static { - /// Fetch hash-addressed content. - /// Parameters: - /// 1. `hash` - content hash - /// 2. `on_done` - callback function invoked when the content is ready (or there was error during fetch) - /// - /// This function may fail immediately when fetch cannot be initialized or content cannot be resolved. - fn fetch(&self, hash: H256, on_done: Box) + Send>) -> Result<(), Error>; -} - -/// Hash-fetching error. -#[derive(Debug)] -pub enum Error { - /// Hash could not be resolved to a valid content address. - NoResolution, - /// Downloaded content hash does not match. - HashMismatch { - /// Expected hash - expected: H256, - /// Computed hash - got: H256, - }, - /// IO Error while validating hash. - IO(io::Error), - /// Error during fetch. - Fetch(FetchError), -} - -impl From for Error { - fn from(error: FetchError) -> Self { - Error::Fetch(error) - } -} - -impl From for Error { - fn from(error: io::Error) -> Self { - Error::IO(error) - } -} - -/// Default Hash-fetching client using on-chain contract to resolve hashes to URLs. -pub struct Client { - contract: URLHintContract, - fetch: Mutex, -} - -impl Client { - /// Creates new instance of the `Client` given on-chain contract client. - pub fn new(contract: Arc) -> Self { - Client { - contract: URLHintContract::new(contract), - fetch: Mutex::new(FetchClient::default()), - } - } -} - -impl HashFetch for Client { - fn fetch(&self, hash: H256, on_done: Box) + Send>) -> Result<(), Error> { - debug!(target: "fetch", "Fetching: {:?}", hash); - - let url = try!( - self.contract.resolve(hash.to_vec()).map(|content| match content { - URLHintResult::Dapp(dapp) => { - dapp.url() - }, - URLHintResult::Content(content) => { - content.url - }, - }).ok_or_else(|| Error::NoResolution) - ); - - debug!(target: "fetch", "Resolved {:?} to {:?}. Fetching...", hash, url); - - self.fetch.lock().request_async(&url, Default::default(), Box::new(move |result| { - fn validate_hash(hash: H256, result: Result) -> Result { - let path = try!(result); - let mut file_reader = io::BufReader::new(try!(fs::File::open(&path))); - let content_hash = try!(sha3(&mut file_reader)); - - if content_hash != hash { - Err(Error::HashMismatch{ got: content_hash, expected: hash }) - } else { - Ok(path) - } - } - - debug!(target: "fetch", "Content fetched, validating hash ({:?})", hash); - on_done(validate_hash(hash, result)) - })).map_err(Into::into) - } -} diff --git a/ethcore/hash-fetch/src/lib.rs b/ethcore/hash-fetch/src/lib.rs deleted file mode 100644 index b566121f54e..00000000000 --- a/ethcore/hash-fetch/src/lib.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -//! Hash-addressed content resolver & fetcher. - -#![warn(missing_docs)] - -#[macro_use] -extern crate log; -extern crate rustc_serialize; -extern crate mime_guess; -extern crate ethabi; -extern crate ethcore_util as util; -extern crate fetch; - -mod client; - -pub mod urlhint; - -pub use client::{HashFetch, Client, Error}; diff --git a/ethcore/hash-fetch/src/urlhint.rs b/ethcore/hash-fetch/src/urlhint.rs deleted file mode 100644 index 9cbd13b1e2b..00000000000 --- a/ethcore/hash-fetch/src/urlhint.rs +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -//! URLHint Contract - -use std::fmt; -use std::sync::Arc; -use rustc_serialize::hex::ToHex; -use mime_guess; - -use ethabi::{Interface, Contract, Token}; -use util::{Address, Bytes, Hashable}; - -const COMMIT_LEN: usize = 20; - -/// RAW Contract interface. -/// Should execute transaction using current blockchain state. -pub trait ContractClient: Send + Sync { - /// Get registrar address - fn registrar(&self) -> Result; - /// Call Contract - fn call(&self, address: Address, data: Bytes) -> Result; -} - -/// Github-hosted dapp. -#[derive(Debug, PartialEq)] -pub struct GithubApp { - /// Github Account - pub account: String, - /// Github Repository - pub repo: String, - /// Commit on Github - pub commit: [u8;COMMIT_LEN], - /// Dapp owner address - pub owner: Address, -} - -impl GithubApp { - /// Returns URL of this Github-hosted dapp package. - pub fn url(&self) -> String { - // Since https fetcher doesn't support redirections we use direct link - // format!("https://github.com/{}/{}/archive/{}.zip", self.account, self.repo, self.commit.to_hex()) - format!("https://codeload.github.com/{}/{}/zip/{}", self.account, self.repo, self.commit.to_hex()) - } - - fn commit(bytes: &[u8]) -> Option<[u8;COMMIT_LEN]> { - if bytes.len() < COMMIT_LEN { - return None; - } - - let mut commit = [0; COMMIT_LEN]; - for i in 0..COMMIT_LEN { - commit[i] = bytes[i]; - } - - Some(commit) - } -} - -/// Hash-Addressed Content -#[derive(Debug, PartialEq)] -pub struct Content { - /// URL of the content - pub url: String, - /// MIME type of the content - pub mime: String, - /// Content owner address - pub owner: Address, -} - -/// Result of resolving id to URL -#[derive(Debug, PartialEq)] -pub enum URLHintResult { - /// Dapp - Dapp(GithubApp), - /// Content - Content(Content), -} - -/// URLHint Contract interface -pub trait URLHint { - /// Resolves given id to registrar entry. - fn resolve(&self, id: Bytes) -> Option; -} - -/// `URLHintContract` API -pub struct URLHintContract { - urlhint: Contract, - registrar: Contract, - client: Arc, -} - -impl URLHintContract { - /// Creates new `URLHintContract` - pub fn new(client: Arc) -> Self { - let urlhint = Interface::load(include_bytes!("../res/urlhint.json")).expect("urlhint.json is valid ABI"); - let registrar = Interface::load(include_bytes!("../res/registrar.json")).expect("registrar.json is valid ABI"); - - URLHintContract { - urlhint: Contract::new(urlhint), - registrar: Contract::new(registrar), - client: client, - } - } - - fn urlhint_address(&self) -> Option
{ - let res = || { - let get_address = try!(self.registrar.function("getAddress".into()).map_err(as_string)); - let params = try!(get_address.encode_call( - vec![Token::FixedBytes((*"githubhint".sha3()).to_vec()), Token::String("A".into())] - ).map_err(as_string)); - let output = try!(self.client.call(try!(self.client.registrar()), params)); - let result = try!(get_address.decode_output(output).map_err(as_string)); - - match result.get(0) { - Some(&Token::Address(address)) if address != *Address::default() => Ok(address.into()), - Some(&Token::Address(_)) => Err(format!("Contract not found.")), - e => Err(format!("Invalid result: {:?}", e)), - } - }; - - match res() { - Ok(res) => Some(res), - Err(e) => { - warn!(target: "dapps", "Error while calling registrar: {:?}", e); - None - } - } - } - - fn encode_urlhint_call(&self, id: Bytes) -> Option { - let call = self.urlhint - .function("entries".into()) - .and_then(|f| f.encode_call(vec![Token::FixedBytes(id)])); - - match call { - Ok(res) => { - Some(res) - }, - Err(e) => { - warn!(target: "dapps", "Error while encoding urlhint call: {:?}", e); - None - } - } - } - - fn decode_urlhint_output(&self, output: Bytes) -> Option { - trace!(target: "dapps", "Output: {:?}", output.to_hex()); - let output = self.urlhint - .function("entries".into()) - .and_then(|f| f.decode_output(output)); - - if let Ok(vec) = output { - if vec.len() != 3 { - warn!(target: "dapps", "Invalid contract output: {:?}", vec); - return None; - } - - let mut it = vec.into_iter(); - let account_slash_repo = it.next().expect("element 0 of 3-len vector known to exist; qed"); - let commit = it.next().expect("element 1 of 3-len vector known to exist; qed"); - let owner = it.next().expect("element 2 of 3-len vector known to exist qed"); - - match (account_slash_repo, commit, owner) { - (Token::String(account_slash_repo), Token::FixedBytes(commit), Token::Address(owner)) => { - let owner = owner.into(); - if owner == Address::default() { - return None; - } - - let commit = GithubApp::commit(&commit); - if commit == Some(Default::default()) { - let mime = guess_mime_type(&account_slash_repo).unwrap_or("application/octet-stream".into()); - return Some(URLHintResult::Content(Content { - url: account_slash_repo, - mime: mime, - owner: owner, - })); - } - - let (account, repo) = { - let mut it = account_slash_repo.split('/'); - match (it.next(), it.next()) { - (Some(account), Some(repo)) => (account.into(), repo.into()), - _ => return None, - } - }; - - commit.map(|commit| URLHintResult::Dapp(GithubApp { - account: account, - repo: repo, - commit: commit, - owner: owner, - })) - }, - e => { - warn!(target: "dapps", "Invalid contract output parameters: {:?}", e); - None - }, - } - } else { - warn!(target: "dapps", "Invalid contract output: {:?}", output); - None - } - } -} - -impl URLHint for URLHintContract { - fn resolve(&self, id: Bytes) -> Option { - self.urlhint_address().and_then(|address| { - // Prepare contract call - self.encode_urlhint_call(id) - .and_then(|data| { - let call = self.client.call(address, data); - if let Err(ref e) = call { - warn!(target: "dapps", "Error while calling urlhint: {:?}", e); - } - call.ok() - }) - .and_then(|output| self.decode_urlhint_output(output)) - }) - } -} - -fn guess_mime_type(url: &str) -> Option { - const CONTENT_TYPE: &'static str = "content-type="; - - let mut it = url.split('#'); - // skip url - let url = it.next(); - // get meta headers - let metas = it.next(); - if let Some(metas) = metas { - for meta in metas.split('&') { - let meta = meta.to_lowercase(); - if meta.starts_with(CONTENT_TYPE) { - return Some(meta[CONTENT_TYPE.len()..].to_owned()); - } - } - } - url.and_then(|url| { - url.split('.').last() - }).and_then(|extension| { - mime_guess::get_mime_type_str(extension).map(Into::into) - }) -} - -fn as_string(e: T) -> String { - format!("{:?}", e) -} - -#[cfg(test)] -mod tests { - use std::sync::Arc; - use std::str::FromStr; - use rustc_serialize::hex::FromHex; - - use super::*; - use super::guess_mime_type; - use util::{Bytes, Address, Mutex, ToPretty}; - - struct FakeRegistrar { - pub calls: Arc>>, - pub responses: Mutex>>, - } - - const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2"; - const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000"; - - impl FakeRegistrar { - fn new() -> Self { - FakeRegistrar { - calls: Arc::new(Mutex::new(Vec::new())), - responses: Mutex::new( - vec![ - Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), - Ok(Vec::new()) - ] - ), - } - } - } - - impl ContractClient for FakeRegistrar { - - fn registrar(&self) -> Result { - Ok(REGISTRAR.parse().unwrap()) - } - - fn call(&self, address: Address, data: Bytes) -> Result { - self.calls.lock().push((address.to_hex(), data.to_hex())); - self.responses.lock().remove(0) - } - } - - #[test] - fn should_call_registrar_and_urlhint_contracts() { - // given - let registrar = FakeRegistrar::new(); - let calls = registrar.calls.clone(); - let urlhint = URLHintContract::new(Arc::new(registrar)); - - // when - let res = urlhint.resolve("test".bytes().collect()); - let calls = calls.lock(); - let call0 = calls.get(0).expect("Registrar resolve called"); - let call1 = calls.get(1).expect("URLHint Resolve called"); - - // then - assert!(res.is_none()); - assert_eq!(call0.0, REGISTRAR); - assert_eq!(call0.1, - "6795dbcd058740ee9a5a3fb9f1cfa10752baec87e09cc45cd7027fd54708271aca300c75000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000014100000000000000000000000000000000000000000000000000000000000000".to_owned() - ); - assert_eq!(call1.0, URLHINT); - assert_eq!(call1.1, - "267b69227465737400000000000000000000000000000000000000000000000000000000".to_owned() - ); - } - - #[test] - fn should_decode_urlhint_output() { - // given - let mut registrar = FakeRegistrar::new(); - registrar.responses = Mutex::new(vec![ - Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), - Ok("0000000000000000000000000000000000000000000000000000000000000060ec4c1fe06c808fe3739858c347109b1f5f1ed4b5000000000000000000000000000000000000000000000000deadcafebeefbeefcafedeaddeedfeedffffffff0000000000000000000000000000000000000000000000000000000000000011657468636f72652f64616f2e636c61696d000000000000000000000000000000".from_hex().unwrap()), - ]); - let urlhint = URLHintContract::new(Arc::new(registrar)); - - // when - let res = urlhint.resolve("test".bytes().collect()); - - // then - assert_eq!(res, Some(URLHintResult::Dapp(GithubApp { - account: "ethcore".into(), - repo: "dao.claim".into(), - commit: GithubApp::commit(&"ec4c1fe06c808fe3739858c347109b1f5f1ed4b5".from_hex().unwrap()).unwrap(), - owner: Address::from_str("deadcafebeefbeefcafedeaddeedfeedffffffff").unwrap(), - }))) - } - - #[test] - fn should_decode_urlhint_content_output() { - // given - let mut registrar = FakeRegistrar::new(); - registrar.responses = Mutex::new(vec![ - Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), - Ok("00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000deadcafebeefbeefcafedeaddeedfeedffffffff000000000000000000000000000000000000000000000000000000000000003d68747470733a2f2f657468636f72652e696f2f6173736574732f696d616765732f657468636f72652d626c61636b2d686f72697a6f6e74616c2e706e67000000".from_hex().unwrap()), - ]); - let urlhint = URLHintContract::new(Arc::new(registrar)); - - // when - let res = urlhint.resolve("test".bytes().collect()); - - // then - assert_eq!(res, Some(URLHintResult::Content(Content { - url: "https://ethcore.io/assets/images/ethcore-black-horizontal.png".into(), - mime: "image/png".into(), - owner: Address::from_str("deadcafebeefbeefcafedeaddeedfeedffffffff").unwrap(), - }))) - } - - #[test] - fn should_return_valid_url() { - // given - let app = GithubApp { - account: "test".into(), - repo: "xyz".into(), - commit: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], - owner: Address::default(), - }; - - // when - let url = app.url(); - - // then - assert_eq!(url, "https://codeload.github.com/test/xyz/zip/000102030405060708090a0b0c0d0e0f10111213".to_owned()); - } - - #[test] - fn should_guess_mime_type_from_url() { - let url1 = "https://ethcore.io/parity"; - let url2 = "https://ethcore.io/parity#content-type=image/png"; - let url3 = "https://ethcore.io/parity#something&content-type=image/png"; - let url4 = "https://ethcore.io/parity.png#content-type=image/jpeg"; - let url5 = "https://ethcore.io/parity.png"; - - - assert_eq!(guess_mime_type(url1), None); - assert_eq!(guess_mime_type(url2), Some("image/png".into())); - assert_eq!(guess_mime_type(url3), Some("image/png".into())); - assert_eq!(guess_mime_type(url4), Some("image/jpeg".into())); - assert_eq!(guess_mime_type(url5), Some("image/png".into())); - } -} diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index c89bbc74f3e..e3f9bfff747 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -4,7 +4,7 @@ homepage = "https://ethcore.io" license = "GPL-3.0" name = "ethcore-light" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/ethcore/light/build.rs b/ethcore/light/build.rs index 7d4e0064c4e..2995d28ad97 100644 --- a/ethcore/light/build.rs +++ b/ethcore/light/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/client.rs b/ethcore/light/src/client.rs index fcfff81e6fb..73e85b31c20 100644 --- a/ethcore/light/src/client.rs +++ b/ethcore/light/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/lib.rs b/ethcore/light/src/lib.rs index f9008ac7c38..d59066b82e0 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/buffer_flow.rs b/ethcore/light/src/net/buffer_flow.rs index 2371c6ea4c1..61866f6860c 100644 --- a/ethcore/light/src/net/buffer_flow.rs +++ b/ethcore/light/src/net/buffer_flow.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/context.rs b/ethcore/light/src/net/context.rs index 96c2178956b..e58bca7f3b8 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/error.rs b/ethcore/light/src/net/error.rs index 01a15928bf1..42d038679d4 100644 --- a/ethcore/light/src/net/error.rs +++ b/ethcore/light/src/net/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index e5bf0cb2b88..491e1d0ac7e 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/status.rs b/ethcore/light/src/net/status.rs index 59981b88d51..90b8640cd7c 100644 --- a/ethcore/light/src/net/status.rs +++ b/ethcore/light/src/net/status.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 7c0928cdd9b..24ce4250ae3 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index ed2f49f5d5a..d820ee6d0c4 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/types/les_request.rs b/ethcore/light/src/types/les_request.rs index 2c7bfb380f4..864f2d4f8fa 100644 --- a/ethcore/light/src/types/les_request.rs +++ b/ethcore/light/src/types/les_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/types/mod.rs b/ethcore/light/src/types/mod.rs index d7f4735531b..86d269766ec 100644 --- a/ethcore/light/src/types/mod.rs +++ b/ethcore/light/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/light/src/types/mod.rs.in b/ethcore/light/src/types/mod.rs.in index 2b7386b5b5e..48ef2da90c3 100644 --- a/ethcore/light/src/types/mod.rs.in +++ b/ethcore/light/src/types/mod.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/account_db.rs b/ethcore/src/account_db.rs index 63524a44210..a42399073a9 100644 --- a/ethcore/src/account_db.rs +++ b/ethcore/src/account_db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/account_provider/mod.rs b/ethcore/src/account_provider/mod.rs index 59fbda04587..1175f2d0240 100644 --- a/ethcore/src/account_provider/mod.rs +++ b/ethcore/src/account_provider/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/account_provider/stores.rs b/ethcore/src/account_provider/stores.rs index 8bf555d6874..d7e96243c3b 100644 --- a/ethcore/src/account_provider/stores.rs +++ b/ethcore/src/account_provider/stores.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/action_params.rs b/ethcore/src/action_params.rs index 8b863c6256b..3d15c7392c6 100644 --- a/ethcore/src/action_params.rs +++ b/ethcore/src/action_params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/basic_types.rs b/ethcore/src/basic_types.rs index 79f009fd1c9..b49a93c443e 100644 --- a/ethcore/src/basic_types.rs +++ b/ethcore/src/basic_types.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index d37920c3edf..743167a7594 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/best_block.rs b/ethcore/src/blockchain/best_block.rs index d5a6c06b2df..e748a9556c4 100644 --- a/ethcore/src/blockchain/best_block.rs +++ b/ethcore/src/blockchain/best_block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/block_info.rs b/ethcore/src/blockchain/block_info.rs index fee0e825b1f..fa8310c037d 100644 --- a/ethcore/src/blockchain/block_info.rs +++ b/ethcore/src/blockchain/block_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/blockchain.rs b/ethcore/src/blockchain/blockchain.rs index c69cf3336a1..47f3a38c41e 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/cache.rs b/ethcore/src/blockchain/cache.rs index 819676ca572..88a0727a07e 100644 --- a/ethcore/src/blockchain/cache.rs +++ b/ethcore/src/blockchain/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/config.rs b/ethcore/src/blockchain/config.rs index 324474958a3..8075355730e 100644 --- a/ethcore/src/blockchain/config.rs +++ b/ethcore/src/blockchain/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/extras.rs b/ethcore/src/blockchain/extras.rs index 6dc7aef9863..bf32258f9f8 100644 --- a/ethcore/src/blockchain/extras.rs +++ b/ethcore/src/blockchain/extras.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/block.rs b/ethcore/src/blockchain/generator/block.rs index 6b8aa78f28c..e2ad5181876 100644 --- a/ethcore/src/blockchain/generator/block.rs +++ b/ethcore/src/blockchain/generator/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/bloom.rs b/ethcore/src/blockchain/generator/bloom.rs index f61c9d1ff61..21fa59f45ef 100644 --- a/ethcore/src/blockchain/generator/bloom.rs +++ b/ethcore/src/blockchain/generator/bloom.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/complete.rs b/ethcore/src/blockchain/generator/complete.rs index 39bd587a0eb..1d24b32c7e3 100644 --- a/ethcore/src/blockchain/generator/complete.rs +++ b/ethcore/src/blockchain/generator/complete.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/fork.rs b/ethcore/src/blockchain/generator/fork.rs index f3a4eb26760..a6953d536ee 100644 --- a/ethcore/src/blockchain/generator/fork.rs +++ b/ethcore/src/blockchain/generator/fork.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/generator.rs b/ethcore/src/blockchain/generator/generator.rs index ebe9e22c017..eb00f0dfbca 100644 --- a/ethcore/src/blockchain/generator/generator.rs +++ b/ethcore/src/blockchain/generator/generator.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/mod.rs b/ethcore/src/blockchain/generator/mod.rs index 683ab7dfb22..941c1d47042 100644 --- a/ethcore/src/blockchain/generator/mod.rs +++ b/ethcore/src/blockchain/generator/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/generator/transaction.rs b/ethcore/src/blockchain/generator/transaction.rs index aa1d3bdd3e1..12cf549fe3f 100644 --- a/ethcore/src/blockchain/generator/transaction.rs +++ b/ethcore/src/blockchain/generator/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/import_route.rs b/ethcore/src/blockchain/import_route.rs index 02469bb9035..8063416d923 100644 --- a/ethcore/src/blockchain/import_route.rs +++ b/ethcore/src/blockchain/import_route.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blockchain/mod.rs b/ethcore/src/blockchain/mod.rs index 7b9ae0e6004..44dea3055eb 100644 --- a/ethcore/src/blockchain/mod.rs +++ b/ethcore/src/blockchain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/bloom.rs b/ethcore/src/blooms/bloom.rs index b535bcb2186..ae6315aa0d1 100644 --- a/ethcore/src/blooms/bloom.rs +++ b/ethcore/src/blooms/bloom.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/bloom_group.rs b/ethcore/src/blooms/bloom_group.rs index 9e3b53f18a1..2dbc4e45507 100644 --- a/ethcore/src/blooms/bloom_group.rs +++ b/ethcore/src/blooms/bloom_group.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/group_position.rs b/ethcore/src/blooms/group_position.rs index 3a6cc8e8393..9952d1508df 100644 --- a/ethcore/src/blooms/group_position.rs +++ b/ethcore/src/blooms/group_position.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/blooms/mod.rs b/ethcore/src/blooms/mod.rs index 9d8a71d71ab..b962387faa6 100644 --- a/ethcore/src/blooms/mod.rs +++ b/ethcore/src/blooms/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/builtin.rs b/ethcore/src/builtin.rs index e8eb0ed68db..7c1bbb2c65e 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/cache_manager.rs b/ethcore/src/cache_manager.rs index 6ad01b45332..afc77f683b7 100644 --- a/ethcore/src/cache_manager.rs +++ b/ethcore/src/cache_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/chain_notify.rs b/ethcore/src/client/chain_notify.rs index e0282d4603a..d9ebac2992e 100644 --- a/ethcore/src/client/chain_notify.rs +++ b/ethcore/src/client/chain_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index f07f7328d06..98754fb14fc 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 045b8ee05ca..575d5ac319c 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/error.rs b/ethcore/src/client/error.rs index 86297a26c1d..e532ec7edb9 100644 --- a/ethcore/src/client/error.rs +++ b/ethcore/src/client/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 8d516d846b1..d8e5f19e562 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index ba2b0f11bf3..df9c90dc02e 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 8c36ac3825a..27f16922b7e 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/db.rs b/ethcore/src/db.rs index 92c0f1b3991..16d538f4e00 100644 --- a/ethcore/src/db.rs +++ b/ethcore/src/db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 98190c1eaf4..9f78d8cecf4 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/basic_authority.rs b/ethcore/src/engines/basic_authority.rs index 1070d3a3dbf..5676365daad 100644 --- a/ethcore/src/engines/basic_authority.rs +++ b/ethcore/src/engines/basic_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/instant_seal.rs b/ethcore/src/engines/instant_seal.rs index 83335fb03c8..f15ccba815b 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 1aab5f8f4af..5e5c5530f56 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/engines/null_engine.rs b/ethcore/src/engines/null_engine.rs index bd5a4474ad2..4272060a579 100644 --- a/ethcore/src/engines/null_engine.rs +++ b/ethcore/src/engines/null_engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/env_info.rs b/ethcore/src/env_info.rs index ddef7160880..bdefeefcebb 100644 --- a/ethcore/src/env_info.rs +++ b/ethcore/src/env_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/error.rs b/ethcore/src/error.rs index 261eab26888..4afbe25b884 100644 --- a/ethcore/src/error.rs +++ b/ethcore/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/ethereum/denominations.rs b/ethcore/src/ethereum/denominations.rs index a8ac2c44c37..6df11fd49c3 100644 --- a/ethcore/src/ethereum/denominations.rs +++ b/ethcore/src/ethereum/denominations.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index ae768e5d309..97508027b56 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs index 3916e5ccc71..3a20f1e4333 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/benches/mod.rs b/ethcore/src/evm/benches/mod.rs index cbed7d88131..de7f318c481 100644 --- a/ethcore/src/evm/benches/mod.rs +++ b/ethcore/src/evm/benches/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/evm.rs b/ethcore/src/evm/evm.rs index 8d220248016..3270b06e41f 100644 --- a/ethcore/src/evm/evm.rs +++ b/ethcore/src/evm/evm.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/ext.rs b/ethcore/src/evm/ext.rs index 1c340b5b19f..38c2d9fedca 100644 --- a/ethcore/src/evm/ext.rs +++ b/ethcore/src/evm/ext.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/factory.rs b/ethcore/src/evm/factory.rs index a3d94bde83c..e84acb4a498 100644 --- a/ethcore/src/evm/factory.rs +++ b/ethcore/src/evm/factory.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/instructions.rs b/ethcore/src/evm/instructions.rs index e609bf542e5..b2a3ae5fb73 100644 --- a/ethcore/src/evm/instructions.rs +++ b/ethcore/src/evm/instructions.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/gasometer.rs b/ethcore/src/evm/interpreter/gasometer.rs index 886120880cf..28a2ee9b42b 100644 --- a/ethcore/src/evm/interpreter/gasometer.rs +++ b/ethcore/src/evm/interpreter/gasometer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/informant.rs b/ethcore/src/evm/interpreter/informant.rs index 200b0152635..e16267174ef 100644 --- a/ethcore/src/evm/interpreter/informant.rs +++ b/ethcore/src/evm/interpreter/informant.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/memory.rs b/ethcore/src/evm/interpreter/memory.rs index 8195a0da33e..7a564ee6d58 100644 --- a/ethcore/src/evm/interpreter/memory.rs +++ b/ethcore/src/evm/interpreter/memory.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/mod.rs b/ethcore/src/evm/interpreter/mod.rs index bb9791abe16..7b31ec28db4 100644 --- a/ethcore/src/evm/interpreter/mod.rs +++ b/ethcore/src/evm/interpreter/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/shared_cache.rs b/ethcore/src/evm/interpreter/shared_cache.rs index cacc4dde393..25a64f1006a 100644 --- a/ethcore/src/evm/interpreter/shared_cache.rs +++ b/ethcore/src/evm/interpreter/shared_cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/interpreter/stack.rs b/ethcore/src/evm/interpreter/stack.rs index 0d7ef4dbb19..187d7db18bd 100644 --- a/ethcore/src/evm/interpreter/stack.rs +++ b/ethcore/src/evm/interpreter/stack.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/jit.rs b/ethcore/src/evm/jit.rs index 6fa617396dc..a40c6eac3f7 100644 --- a/ethcore/src/evm/jit.rs +++ b/ethcore/src/evm/jit.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/mod.rs b/ethcore/src/evm/mod.rs index bfead60c103..36931220ca8 100644 --- a/ethcore/src/evm/mod.rs +++ b/ethcore/src/evm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/schedule.rs b/ethcore/src/evm/schedule.rs index 773708956ef..d49c1afcd86 100644 --- a/ethcore/src/evm/schedule.rs +++ b/ethcore/src/evm/schedule.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/evm/tests.rs b/ethcore/src/evm/tests.rs index 6cfc9a43ebd..36a767265c3 100644 --- a/ethcore/src/evm/tests.rs +++ b/ethcore/src/evm/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index 1dfd987c161..a6c66b06798 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index 3704ead679a..7a8f60b79c5 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/factory.rs b/ethcore/src/factory.rs index dec341820f9..da22d56ee4a 100644 --- a/ethcore/src/factory.rs +++ b/ethcore/src/factory.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/header.rs b/ethcore/src/header.rs index 228933570cd..666ed3ec211 100644 --- a/ethcore/src/header.rs +++ b/ethcore/src/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/chain.rs b/ethcore/src/json_tests/chain.rs index b50241199e7..5d79aab56d7 100644 --- a/ethcore/src/json_tests/chain.rs +++ b/ethcore/src/json_tests/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/eip150_state.rs b/ethcore/src/json_tests/eip150_state.rs index 9076286eb46..cda1b64b44b 100644 --- a/ethcore/src/json_tests/eip150_state.rs +++ b/ethcore/src/json_tests/eip150_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/eip161_state.rs b/ethcore/src/json_tests/eip161_state.rs index da7997fa102..10c863793cc 100644 --- a/ethcore/src/json_tests/eip161_state.rs +++ b/ethcore/src/json_tests/eip161_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index 60321f971de..ffaf36d5ef1 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/homestead_chain.rs b/ethcore/src/json_tests/homestead_chain.rs index 37a9d0a21a1..7a4fe212170 100644 --- a/ethcore/src/json_tests/homestead_chain.rs +++ b/ethcore/src/json_tests/homestead_chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/homestead_state.rs b/ethcore/src/json_tests/homestead_state.rs index 0b611dad706..d824e2b0bef 100644 --- a/ethcore/src/json_tests/homestead_state.rs +++ b/ethcore/src/json_tests/homestead_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/mod.rs b/ethcore/src/json_tests/mod.rs index 13d3fb5bb1d..833b4027046 100644 --- a/ethcore/src/json_tests/mod.rs +++ b/ethcore/src/json_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/state.rs b/ethcore/src/json_tests/state.rs index bf84d50ee88..53cff80b041 100644 --- a/ethcore/src/json_tests/state.rs +++ b/ethcore/src/json_tests/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/test_common.rs b/ethcore/src/json_tests/test_common.rs index e77b3df93f2..f794cfcb374 100644 --- a/ethcore/src/json_tests/test_common.rs +++ b/ethcore/src/json_tests/test_common.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/transaction.rs b/ethcore/src/json_tests/transaction.rs index 12e82bca2ab..7f873134315 100644 --- a/ethcore/src/json_tests/transaction.rs +++ b/ethcore/src/json_tests/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/json_tests/trie.rs b/ethcore/src/json_tests/trie.rs index 4090ec76222..065985b0aee 100644 --- a/ethcore/src/json_tests/trie.rs +++ b/ethcore/src/json_tests/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 26db147442b..df85ca4c741 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/blocks/mod.rs b/ethcore/src/migrations/blocks/mod.rs index 7253208bbd0..172e6df4394 100644 --- a/ethcore/src/migrations/blocks/mod.rs +++ b/ethcore/src/migrations/blocks/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/blocks/v8.rs b/ethcore/src/migrations/blocks/v8.rs index 21024f93d50..b58e66ea3a7 100644 --- a/ethcore/src/migrations/blocks/v8.rs +++ b/ethcore/src/migrations/blocks/v8.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/extras/mod.rs b/ethcore/src/migrations/extras/mod.rs index 0635596ea31..d91691b560e 100644 --- a/ethcore/src/migrations/extras/mod.rs +++ b/ethcore/src/migrations/extras/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/extras/v6.rs b/ethcore/src/migrations/extras/v6.rs index 9b746b9d24c..f80394dc751 100644 --- a/ethcore/src/migrations/extras/v6.rs +++ b/ethcore/src/migrations/extras/v6.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/mod.rs b/ethcore/src/migrations/mod.rs index 7ccafac7434..32b7048e06c 100644 --- a/ethcore/src/migrations/mod.rs +++ b/ethcore/src/migrations/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/state/mod.rs b/ethcore/src/migrations/state/mod.rs index 9a6b9e086b9..f48b4c24797 100644 --- a/ethcore/src/migrations/state/mod.rs +++ b/ethcore/src/migrations/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/state/v7.rs b/ethcore/src/migrations/state/v7.rs index 49df041eb64..69178188b62 100644 --- a/ethcore/src/migrations/state/v7.rs +++ b/ethcore/src/migrations/state/v7.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/v10.rs b/ethcore/src/migrations/v10.rs index 77531eb0830..3726d2e9742 100644 --- a/ethcore/src/migrations/v10.rs +++ b/ethcore/src/migrations/v10.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/migrations/v9.rs b/ethcore/src/migrations/v9.rs index 83729dc5525..b99de0f51bc 100644 --- a/ethcore/src/migrations/v9.rs +++ b/ethcore/src/migrations/v9.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/banning_queue.rs b/ethcore/src/miner/banning_queue.rs index 0fdea2ac3aa..d8b038c1561 100644 --- a/ethcore/src/miner/banning_queue.rs +++ b/ethcore/src/miner/banning_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/external.rs b/ethcore/src/miner/external.rs index c3fcf723fc4..199e795fd44 100644 --- a/ethcore/src/miner/external.rs +++ b/ethcore/src/miner/external.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/local_transactions.rs b/ethcore/src/miner/local_transactions.rs index c8afcc0d510..62cec7151fe 100644 --- a/ethcore/src/miner/local_transactions.rs +++ b/ethcore/src/miner/local_transactions.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 83a96837f56..a6a63ccaf0b 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 8c466581b8c..814953c81a1 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/price_info.rs b/ethcore/src/miner/price_info.rs index 77bc1ce0f6e..e1cf82f9908 100644 --- a/ethcore/src/miner/price_info.rs +++ b/ethcore/src/miner/price_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index b4cc93a9cfc..28b39c7e6c2 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/miner/work_notify.rs b/ethcore/src/miner/work_notify.rs index 557f02f316b..1b2ce67b1a2 100644 --- a/ethcore/src/miner/work_notify.rs +++ b/ethcore/src/miner/work_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/pod_account.rs b/ethcore/src/pod_account.rs index 92a78cebd2c..20a9a46d40b 100644 --- a/ethcore/src/pod_account.rs +++ b/ethcore/src/pod_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/pod_state.rs b/ethcore/src/pod_state.rs index d9f44680ef5..18045c51042 100644 --- a/ethcore/src/pod_state.rs +++ b/ethcore/src/pod_state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/service.rs b/ethcore/src/service.rs index 36b5e715729..bf346e707c1 100644 --- a/ethcore/src/service.rs +++ b/ethcore/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/account.rs b/ethcore/src/snapshot/account.rs index 327979ce369..9d5385d92c6 100644 --- a/ethcore/src/snapshot/account.rs +++ b/ethcore/src/snapshot/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/block.rs b/ethcore/src/snapshot/block.rs index 4f7f912cabb..94b7a4289dd 100644 --- a/ethcore/src/snapshot/block.rs +++ b/ethcore/src/snapshot/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/error.rs b/ethcore/src/snapshot/error.rs index cc84d8e489e..46ef6f41b24 100644 --- a/ethcore/src/snapshot/error.rs +++ b/ethcore/src/snapshot/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/io.rs b/ethcore/src/snapshot/io.rs index cd57b35d393..2d581d5718d 100644 --- a/ethcore/src/snapshot/io.rs +++ b/ethcore/src/snapshot/io.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 9b45f2687b8..1e646effcaf 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/service.rs b/ethcore/src/snapshot/service.rs index 05c4c1f9f74..b433108fd29 100644 --- a/ethcore/src/snapshot/service.rs +++ b/ethcore/src/snapshot/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/snapshot_service_trait.rs b/ethcore/src/snapshot/snapshot_service_trait.rs index 42223f8784c..aa2782a5a3b 100644 --- a/ethcore/src/snapshot/snapshot_service_trait.rs +++ b/ethcore/src/snapshot/snapshot_service_trait.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/blocks.rs b/ethcore/src/snapshot/tests/blocks.rs index 3d9390d2ef5..058d311e2bc 100644 --- a/ethcore/src/snapshot/tests/blocks.rs +++ b/ethcore/src/snapshot/tests/blocks.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/helpers.rs b/ethcore/src/snapshot/tests/helpers.rs index c97f138d72f..164f991213e 100644 --- a/ethcore/src/snapshot/tests/helpers.rs +++ b/ethcore/src/snapshot/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/mod.rs b/ethcore/src/snapshot/tests/mod.rs index d9c0abc73ac..d63abec5321 100644 --- a/ethcore/src/snapshot/tests/mod.rs +++ b/ethcore/src/snapshot/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/service.rs b/ethcore/src/snapshot/tests/service.rs index efdb12323d8..b460d580630 100644 --- a/ethcore/src/snapshot/tests/service.rs +++ b/ethcore/src/snapshot/tests/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/tests/state.rs b/ethcore/src/snapshot/tests/state.rs index 36c268f73dc..380e9fb0dba 100644 --- a/ethcore/src/snapshot/tests/state.rs +++ b/ethcore/src/snapshot/tests/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/snapshot/watcher.rs b/ethcore/src/snapshot/watcher.rs index ab4dde13433..2ee1860206e 100644 --- a/ethcore/src/snapshot/watcher.rs +++ b/ethcore/src/snapshot/watcher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/genesis.rs b/ethcore/src/spec/genesis.rs index 380c48aba98..be3b7c808dc 100644 --- a/ethcore/src/spec/genesis.rs +++ b/ethcore/src/spec/genesis.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/mod.rs b/ethcore/src/spec/mod.rs index 356f3b21965..b7288c26876 100644 --- a/ethcore/src/spec/mod.rs +++ b/ethcore/src/spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/seal.rs b/ethcore/src/spec/seal.rs index f3e5dca9561..eaf951189ce 100644 --- a/ethcore/src/spec/seal.rs +++ b/ethcore/src/spec/seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index e14ea3949c1..5d0cc836070 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state/account.rs b/ethcore/src/state/account.rs index c3d812c46b6..d778412c4b1 100644 --- a/ethcore/src/state/account.rs +++ b/ethcore/src/state/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 8a52b62ff50..76bb7164541 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state/substate.rs b/ethcore/src/state/substate.rs index c11f802a1c7..0f1ac2ecd3f 100644 --- a/ethcore/src/state/substate.rs +++ b/ethcore/src/state/substate.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/state_db.rs b/ethcore/src/state_db.rs index eafa4022ebc..79c1a4a2c5d 100644 --- a/ethcore/src/state_db.rs +++ b/ethcore/src/state_db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 0b688345d47..51c7086b6ff 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/helpers.rs b/ethcore/src/tests/helpers.rs index e952fe27a0c..602217d8831 100644 --- a/ethcore/src/tests/helpers.rs +++ b/ethcore/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/mod.rs b/ethcore/src/tests/mod.rs index 4157e486dfe..e9eb39c88a5 100644 --- a/ethcore/src/tests/mod.rs +++ b/ethcore/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/tests/rpc.rs b/ethcore/src/tests/rpc.rs index 2da94b3d0bb..9e4d3db7ba7 100644 --- a/ethcore/src/tests/rpc.rs +++ b/ethcore/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/config.rs b/ethcore/src/trace/config.rs index 9dab7524d99..01b1c60e147 100644 --- a/ethcore/src/trace/config.rs +++ b/ethcore/src/trace/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/db.rs b/ethcore/src/trace/db.rs index 174c9b386a0..c55bd074864 100644 --- a/ethcore/src/trace/db.rs +++ b/ethcore/src/trace/db.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/error.rs b/ethcore/src/trace/error.rs index 32c372f7e54..e8c10359481 100644 --- a/ethcore/src/trace/error.rs +++ b/ethcore/src/trace/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/executive_tracer.rs b/ethcore/src/trace/executive_tracer.rs index bb18c61a842..f3cabf83299 100644 --- a/ethcore/src/trace/executive_tracer.rs +++ b/ethcore/src/trace/executive_tracer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/import.rs b/ethcore/src/trace/import.rs index 7da3e5fe27a..2fea9429ee3 100644 --- a/ethcore/src/trace/import.rs +++ b/ethcore/src/trace/import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/mod.rs b/ethcore/src/trace/mod.rs index da3bbc02be3..d5c0d361f69 100644 --- a/ethcore/src/trace/mod.rs +++ b/ethcore/src/trace/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/trace/noop_tracer.rs b/ethcore/src/trace/noop_tracer.rs index f126d85aa63..a1b99455001 100644 --- a/ethcore/src/trace/noop_tracer.rs +++ b/ethcore/src/trace/noop_tracer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/account_diff.rs b/ethcore/src/types/account_diff.rs index e4766d7f1e7..c8d5c9eecc2 100644 --- a/ethcore/src/types/account_diff.rs +++ b/ethcore/src/types/account_diff.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/block_import_error.rs b/ethcore/src/types/block_import_error.rs index 355f29152f5..e229db6d2a5 100644 --- a/ethcore/src/types/block_import_error.rs +++ b/ethcore/src/types/block_import_error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/block_status.rs b/ethcore/src/types/block_status.rs index 857daae1018..d1c6c7d5bbb 100644 --- a/ethcore/src/types/block_status.rs +++ b/ethcore/src/types/block_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/blockchain_info.rs b/ethcore/src/types/blockchain_info.rs index ff6aa8ddec3..6757acf641b 100644 --- a/ethcore/src/types/blockchain_info.rs +++ b/ethcore/src/types/blockchain_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/call_analytics.rs b/ethcore/src/types/call_analytics.rs index d38be0cc721..9da2d11aed5 100644 --- a/ethcore/src/types/call_analytics.rs +++ b/ethcore/src/types/call_analytics.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/executed.rs b/ethcore/src/types/executed.rs index b4328b75d07..3ce8d26342d 100644 --- a/ethcore/src/types/executed.rs +++ b/ethcore/src/types/executed.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/filter.rs b/ethcore/src/types/filter.rs index ecc997f7155..8aecef43bec 100644 --- a/ethcore/src/types/filter.rs +++ b/ethcore/src/types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/ids.rs b/ethcore/src/types/ids.rs index 2c3c777b4da..2828c479821 100644 --- a/ethcore/src/types/ids.rs +++ b/ethcore/src/types/ids.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/log_entry.rs b/ethcore/src/types/log_entry.rs index 0e5f7d5316c..19531a9e96a 100644 --- a/ethcore/src/types/log_entry.rs +++ b/ethcore/src/types/log_entry.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/mod.rs b/ethcore/src/types/mod.rs index d01829ea0b0..959ff694a82 100644 --- a/ethcore/src/types/mod.rs +++ b/ethcore/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/mod.rs.in b/ethcore/src/types/mod.rs.in index d462d3cb99c..47a4b6a84a3 100644 --- a/ethcore/src/types/mod.rs.in +++ b/ethcore/src/types/mod.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/mode.rs b/ethcore/src/types/mode.rs index dff75e1585b..a1df3c76fbb 100644 --- a/ethcore/src/types/mode.rs +++ b/ethcore/src/types/mode.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/pruning_info.rs b/ethcore/src/types/pruning_info.rs index 40564f488b1..fd5689d2dd4 100644 --- a/ethcore/src/types/pruning_info.rs +++ b/ethcore/src/types/pruning_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/receipt.rs b/ethcore/src/types/receipt.rs index deefeb38310..c15f039bc75 100644 --- a/ethcore/src/types/receipt.rs +++ b/ethcore/src/types/receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/restoration_status.rs b/ethcore/src/types/restoration_status.rs index ddf4cf1db7c..507659d5be0 100644 --- a/ethcore/src/types/restoration_status.rs +++ b/ethcore/src/types/restoration_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/snapshot_manifest.rs b/ethcore/src/types/snapshot_manifest.rs index 859ec016f56..dac164b0b0c 100644 --- a/ethcore/src/types/snapshot_manifest.rs +++ b/ethcore/src/types/snapshot_manifest.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/state_diff.rs b/ethcore/src/types/state_diff.rs index ee416d1d051..6b8242db6cf 100644 --- a/ethcore/src/types/state_diff.rs +++ b/ethcore/src/types/state_diff.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_filter.rs b/ethcore/src/types/trace_filter.rs index af9d7c3eefd..5a7ed842913 100644 --- a/ethcore/src/types/trace_filter.rs +++ b/ethcore/src/types/trace_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/error.rs b/ethcore/src/types/trace_types/error.rs index 5b2510c81fc..72b873fc9fb 100644 --- a/ethcore/src/types/trace_types/error.rs +++ b/ethcore/src/types/trace_types/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/filter.rs b/ethcore/src/types/trace_types/filter.rs index 1c1be54e734..b12112acdc0 100644 --- a/ethcore/src/types/trace_types/filter.rs +++ b/ethcore/src/types/trace_types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/flat.rs b/ethcore/src/types/trace_types/flat.rs index d0c7cbe9b85..8a949c210a0 100644 --- a/ethcore/src/types/trace_types/flat.rs +++ b/ethcore/src/types/trace_types/flat.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/localized.rs b/ethcore/src/types/trace_types/localized.rs index f276e9b2596..57abea362d9 100644 --- a/ethcore/src/types/trace_types/localized.rs +++ b/ethcore/src/types/trace_types/localized.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/mod.rs b/ethcore/src/types/trace_types/mod.rs index f940263b202..df5c803bb13 100644 --- a/ethcore/src/types/trace_types/mod.rs +++ b/ethcore/src/types/trace_types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/trace_types/trace.rs b/ethcore/src/types/trace_types/trace.rs index 2571805a622..7f5149905c4 100644 --- a/ethcore/src/types/trace_types/trace.rs +++ b/ethcore/src/types/trace_types/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/transaction.rs b/ethcore/src/types/transaction.rs index 1c6ef92e3b9..6388120c3f9 100644 --- a/ethcore/src/types/transaction.rs +++ b/ethcore/src/types/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/transaction_import.rs b/ethcore/src/types/transaction_import.rs index e53313df7a7..cfd3d524327 100644 --- a/ethcore/src/types/transaction_import.rs +++ b/ethcore/src/types/transaction_import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/tree_route.rs b/ethcore/src/types/tree_route.rs index 5d08f560109..7a97cac0328 100644 --- a/ethcore/src/types/tree_route.rs +++ b/ethcore/src/types/tree_route.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/types/verification_queue_info.rs b/ethcore/src/types/verification_queue_info.rs index 35954e7a942..3361155dfa9 100644 --- a/ethcore/src/types/verification_queue_info.rs +++ b/ethcore/src/types/verification_queue_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/canon_verifier.rs b/ethcore/src/verification/canon_verifier.rs index b5b01279ec5..75b0943eab2 100644 --- a/ethcore/src/verification/canon_verifier.rs +++ b/ethcore/src/verification/canon_verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/mod.rs b/ethcore/src/verification/mod.rs index 55663052b77..5dc28634c1a 100644 --- a/ethcore/src/verification/mod.rs +++ b/ethcore/src/verification/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/noop_verifier.rs b/ethcore/src/verification/noop_verifier.rs index 7db688a8595..83ca11efd8e 100644 --- a/ethcore/src/verification/noop_verifier.rs +++ b/ethcore/src/verification/noop_verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/queue/kind.rs b/ethcore/src/verification/queue/kind.rs index 17b9974903d..5d4bb745118 100644 --- a/ethcore/src/verification/queue/kind.rs +++ b/ethcore/src/verification/queue/kind.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/queue/mod.rs b/ethcore/src/verification/queue/mod.rs index adc93484c2c..d268b1cff0d 100644 --- a/ethcore/src/verification/queue/mod.rs +++ b/ethcore/src/verification/queue/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 7e42e8881b2..661c40c96b4 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/verification/verifier.rs b/ethcore/src/verification/verifier.rs index 05d488f95ed..f3cea1a78fd 100644 --- a/ethcore/src/verification/verifier.rs +++ b/ethcore/src/verification/verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/block.rs b/ethcore/src/views/block.rs index 97cf26441cb..ede5b19850f 100644 --- a/ethcore/src/views/block.rs +++ b/ethcore/src/views/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/body.rs b/ethcore/src/views/body.rs index 989acd46566..c6168f6d8ec 100644 --- a/ethcore/src/views/body.rs +++ b/ethcore/src/views/body.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/header.rs b/ethcore/src/views/header.rs index 6c3b14b15e5..e20d7f7c9c3 100644 --- a/ethcore/src/views/header.rs +++ b/ethcore/src/views/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/mod.rs b/ethcore/src/views/mod.rs index e8267e15a2a..d827f8fb001 100644 --- a/ethcore/src/views/mod.rs +++ b/ethcore/src/views/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/views/transaction.rs b/ethcore/src/views/transaction.rs index df861d9fdb2..1256d98d51e 100644 --- a/ethcore/src/views/transaction.rs +++ b/ethcore/src/views/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcrypto/Cargo.toml b/ethcrypto/Cargo.toml index 5c638b555c6..16d91988a37 100644 --- a/ethcrypto/Cargo.toml +++ b/ethcrypto/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcrypto" version = "0.1.0" -authors = ["debris "] +authors = ["Parity Technologies "] [dependencies] rust-crypto = "0.2.36" diff --git a/ethcrypto/src/lib.rs b/ethcrypto/src/lib.rs index c98d1402780..4cb08636533 100644 --- a/ethcrypto/src/lib.rs +++ b/ethcrypto/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/Cargo.toml b/ethkey/Cargo.toml index 319a38b20a6..d9d1c7efa72 100644 --- a/ethkey/Cargo.toml +++ b/ethkey/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethkey" version = "0.2.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] rand = "0.3.14" diff --git a/ethkey/src/bin/ethkey.rs b/ethkey/src/bin/ethkey.rs index 778ae39c93b..af301732bb5 100644 --- a/ethkey/src/bin/ethkey.rs +++ b/ethkey/src/bin/ethkey.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/bin/main.rs b/ethkey/src/bin/main.rs index 7c7512a9768..ac795b3352b 100644 --- a/ethkey/src/bin/main.rs +++ b/ethkey/src/bin/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/brain.rs b/ethkey/src/brain.rs index dd8913c66ff..2db460812b6 100644 --- a/ethkey/src/brain.rs +++ b/ethkey/src/brain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/error.rs b/ethkey/src/error.rs index 2597e882701..530ffe0f156 100644 --- a/ethkey/src/error.rs +++ b/ethkey/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/keccak.rs b/ethkey/src/keccak.rs index 18b31a8684d..8e8e5fb8fe4 100644 --- a/ethkey/src/keccak.rs +++ b/ethkey/src/keccak.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/keypair.rs b/ethkey/src/keypair.rs index fa7c1a85e03..2b9c1a204bd 100644 --- a/ethkey/src/keypair.rs +++ b/ethkey/src/keypair.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/lib.rs b/ethkey/src/lib.rs index 1f345b2ff65..79faf0ef9ab 100644 --- a/ethkey/src/lib.rs +++ b/ethkey/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/prefix.rs b/ethkey/src/prefix.rs index ad5e02c4aba..59e64abdad0 100644 --- a/ethkey/src/prefix.rs +++ b/ethkey/src/prefix.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/random.rs b/ethkey/src/random.rs index ea4cdaec662..8b0c98c6478 100644 --- a/ethkey/src/random.rs +++ b/ethkey/src/random.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethkey/src/signature.rs b/ethkey/src/signature.rs index e1afb3940a9..97a2e071512 100644 --- a/ethkey/src/signature.rs +++ b/ethkey/src/signature.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index 03347cbd753..f47d9171f57 100644 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethstore" version = "0.1.0" -authors = ["debris "] +authors = ["Parity Technologies "] build = "build.rs" [dependencies] diff --git a/ethstore/build.rs b/ethstore/build.rs index 65606cab936..d0aeb8837d3 100644 --- a/ethstore/build.rs +++ b/ethstore/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/cipher.rs b/ethstore/src/account/cipher.rs index 1b9d49b26ea..c6688252d04 100644 --- a/ethstore/src/account/cipher.rs +++ b/ethstore/src/account/cipher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/kdf.rs b/ethstore/src/account/kdf.rs index 0cabce625e4..3fa0a8f8a78 100644 --- a/ethstore/src/account/kdf.rs +++ b/ethstore/src/account/kdf.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/mod.rs b/ethstore/src/account/mod.rs index b4c3e1113dd..9e3b927ed24 100644 --- a/ethstore/src/account/mod.rs +++ b/ethstore/src/account/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/safe_account.rs b/ethstore/src/account/safe_account.rs index 336e72875f3..133e6eeacc1 100644 --- a/ethstore/src/account/safe_account.rs +++ b/ethstore/src/account/safe_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/account/version.rs b/ethstore/src/account/version.rs index 465ce4e1b85..a6a48bbe406 100644 --- a/ethstore/src/account/version.rs +++ b/ethstore/src/account/version.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/bin/ethstore.rs b/ethstore/src/bin/ethstore.rs index 9d499723b3f..954be2aa95e 100644 --- a/ethstore/src/bin/ethstore.rs +++ b/ethstore/src/bin/ethstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/bin/main.rs b/ethstore/src/bin/main.rs index eee1fa39cc0..e33fc1c23f7 100644 --- a/ethstore/src/bin/main.rs +++ b/ethstore/src/bin/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/disk.rs b/ethstore/src/dir/disk.rs index c86123d1a48..80e95fb66ee 100644 --- a/ethstore/src/dir/disk.rs +++ b/ethstore/src/dir/disk.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/geth.rs b/ethstore/src/dir/geth.rs index f63ebbea2cc..40c3d938abe 100644 --- a/ethstore/src/dir/geth.rs +++ b/ethstore/src/dir/geth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/mod.rs b/ethstore/src/dir/mod.rs index e29bd1ec4b0..8f5a8a7adac 100644 --- a/ethstore/src/dir/mod.rs +++ b/ethstore/src/dir/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/dir/parity.rs b/ethstore/src/dir/parity.rs index 7aa50c80bf6..8c5e9c2d60d 100644 --- a/ethstore/src/dir/parity.rs +++ b/ethstore/src/dir/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/error.rs b/ethstore/src/error.rs index cee689b24e4..8c77e7a7f7b 100644 --- a/ethstore/src/error.rs +++ b/ethstore/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/ethkey.rs b/ethstore/src/ethkey.rs index 9d8858b79c8..d635d34a03b 100644 --- a/ethstore/src/ethkey.rs +++ b/ethstore/src/ethkey.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/ethstore.rs b/ethstore/src/ethstore.rs index 3747431fbfc..ec1f8262653 100644 --- a/ethstore/src/ethstore.rs +++ b/ethstore/src/ethstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/import.rs b/ethstore/src/import.rs index 63cc9311149..b112bce75be 100644 --- a/ethstore/src/import.rs +++ b/ethstore/src/import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/cipher.rs b/ethstore/src/json/cipher.rs index 1190244377a..05628cdeda6 100644 --- a/ethstore/src/json/cipher.rs +++ b/ethstore/src/json/cipher.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/crypto.rs b/ethstore/src/json/crypto.rs index 739a2fea91b..99ef026b38f 100644 --- a/ethstore/src/json/crypto.rs +++ b/ethstore/src/json/crypto.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/error.rs b/ethstore/src/json/error.rs index a3ea4d326fa..fdec03c5065 100644 --- a/ethstore/src/json/error.rs +++ b/ethstore/src/json/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/hash.rs b/ethstore/src/json/hash.rs index 25bf51130b5..3496a034ccd 100644 --- a/ethstore/src/json/hash.rs +++ b/ethstore/src/json/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/id.rs b/ethstore/src/json/id.rs index 664716d95a2..cf098c83f56 100644 --- a/ethstore/src/json/id.rs +++ b/ethstore/src/json/id.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/kdf.rs b/ethstore/src/json/kdf.rs index 676df1f95b4..af751ad3348 100644 --- a/ethstore/src/json/kdf.rs +++ b/ethstore/src/json/kdf.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/key_file.rs b/ethstore/src/json/key_file.rs index 093479b3ae3..323086fa0fb 100644 --- a/ethstore/src/json/key_file.rs +++ b/ethstore/src/json/key_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/mod.rs b/ethstore/src/json/mod.rs index 208d474df08..5a28a69328e 100644 --- a/ethstore/src/json/mod.rs +++ b/ethstore/src/json/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/json/version.rs b/ethstore/src/json/version.rs index f394f61c2ee..be03795ed28 100644 --- a/ethstore/src/json/version.rs +++ b/ethstore/src/json/version.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/lib.rs b/ethstore/src/lib.rs index f8619ff192c..a55ad207a2a 100644 --- a/ethstore/src/lib.rs +++ b/ethstore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/random.rs b/ethstore/src/random.rs index 954ec500f98..6140f0fae2d 100644 --- a/ethstore/src/random.rs +++ b/ethstore/src/random.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/src/secret_store.rs b/ethstore/src/secret_store.rs index bf0a4ec4465..2b3afb2ea87 100644 --- a/ethstore/src/secret_store.rs +++ b/ethstore/src/secret_store.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/api.rs b/ethstore/tests/api.rs index e1667607bd3..0b3e3ca23c5 100644 --- a/ethstore/tests/api.rs +++ b/ethstore/tests/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/cli.rs b/ethstore/tests/cli.rs index d4ebdc4487a..50fed6b27f3 100644 --- a/ethstore/tests/cli.rs +++ b/ethstore/tests/cli.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/util/mod.rs b/ethstore/tests/util/mod.rs index 73c47ee615e..c1bad398d10 100644 --- a/ethstore/tests/util/mod.rs +++ b/ethstore/tests/util/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethstore/tests/util/transient_dir.rs b/ethstore/tests/util/transient_dir.rs index 23523e48c88..839e9722dd5 100644 --- a/ethstore/tests/util/transient_dir.rs +++ b/ethstore/tests/util/transient_dir.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmbin/Cargo.toml b/evmbin/Cargo.toml index 479e7e7ecb9..ad2d69d5723 100644 --- a/evmbin/Cargo.toml +++ b/evmbin/Cargo.toml @@ -2,7 +2,7 @@ name = "evm" description = "Parity's EVM implementation" version = "0.1.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [lib] name = "evm" diff --git a/evmbin/benches/mod.rs b/evmbin/benches/mod.rs index 3013dca5447..424ed481593 100644 --- a/evmbin/benches/mod.rs +++ b/evmbin/benches/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmbin/src/ext.rs b/evmbin/src/ext.rs index cac89d76ca2..af0836ad06d 100644 --- a/evmbin/src/ext.rs +++ b/evmbin/src/ext.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index aa9faa1dac5..8a08bd16386 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/evmjit/Cargo.toml b/evmjit/Cargo.toml index 12c57a769c9..a849b93238b 100644 --- a/evmjit/Cargo.toml +++ b/evmjit/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "evmjit" version = "1.5.0" -authors = ["debris "] +authors = ["Parity Technologies "] [lib] crate-type = ["dylib"] diff --git a/evmjit/src/lib.rs b/evmjit/src/lib.rs index d916906b6bd..16bb7ab0d5e 100644 --- a/evmjit/src/lib.rs +++ b/evmjit/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/Cargo.toml b/ipc/codegen/Cargo.toml index 2867609d6af..5717453efad 100644 --- a/ipc/codegen/Cargo.toml +++ b/ipc/codegen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-codegen" version = "1.5.0" -authors = ["Nikolay Volf"] +authors = ["Parity Technologies "] license = "GPL-3.0" description = "Macros to auto-generate implementations for ipc call" build = "build.rs" diff --git a/ipc/codegen/build.rs b/ipc/codegen/build.rs index 82f99018857..b81724774b0 100644 --- a/ipc/codegen/build.rs +++ b/ipc/codegen/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/codegen.rs b/ipc/codegen/src/codegen.rs index 9caa436bc51..27eb8fb0bc2 100644 --- a/ipc/codegen/src/codegen.rs +++ b/ipc/codegen/src/codegen.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/lib.rs b/ipc/codegen/src/lib.rs index dc58c6a8a91..caa0228fc0d 100644 --- a/ipc/codegen/src/lib.rs +++ b/ipc/codegen/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/lib.rs.in b/ipc/codegen/src/lib.rs.in index 169bd2a8207..afd3f92c0ac 100644 --- a/ipc/codegen/src/lib.rs.in +++ b/ipc/codegen/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/codegen/src/serialization.rs b/ipc/codegen/src/serialization.rs index c7adf1011c7..c7d2880105b 100644 --- a/ipc/codegen/src/serialization.rs +++ b/ipc/codegen/src/serialization.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/Cargo.toml b/ipc/hypervisor/Cargo.toml index cd0fb456197..21955bdf3cb 100644 --- a/ipc/hypervisor/Cargo.toml +++ b/ipc/hypervisor/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-hypervisor" version = "1.2.0" -authors = ["Nikolay Volf "] +authors = ["Parity Technologies "] license = "GPL-3.0" build = "build.rs" diff --git a/ipc/hypervisor/build.rs b/ipc/hypervisor/build.rs index 391ac648dba..57f9297021e 100644 --- a/ipc/hypervisor/build.rs +++ b/ipc/hypervisor/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/src/lib.rs b/ipc/hypervisor/src/lib.rs index c7543ca91b3..0900c741072 100644 --- a/ipc/hypervisor/src/lib.rs +++ b/ipc/hypervisor/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/src/service.rs b/ipc/hypervisor/src/service.rs index ffc83dc7c20..b19c581a025 100644 --- a/ipc/hypervisor/src/service.rs +++ b/ipc/hypervisor/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/hypervisor/src/service.rs.in b/ipc/hypervisor/src/service.rs.in index e80a1ec30b1..2f3a1ebac41 100644 --- a/ipc/hypervisor/src/service.rs.in +++ b/ipc/hypervisor/src/service.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/nano/Cargo.toml b/ipc/nano/Cargo.toml index 32171bbf4fc..7d559dbabc5 100644 --- a/ipc/nano/Cargo.toml +++ b/ipc/nano/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-nano" version = "1.5.0" -authors = ["Nikolay Volf "] +authors = ["Parity Technologies "] license = "GPL-3.0" [features] diff --git a/ipc/nano/src/lib.rs b/ipc/nano/src/lib.rs index 1157e75d336..ce40183e989 100644 --- a/ipc/nano/src/lib.rs +++ b/ipc/nano/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/rpc/Cargo.toml b/ipc/rpc/Cargo.toml index f9d39054707..a89d1a9ee42 100644 --- a/ipc/rpc/Cargo.toml +++ b/ipc/rpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc" version = "1.5.0" -authors = ["Nikolay Volf "] +authors = ["Parity Technologies "] license = "GPL-3.0" [features] diff --git a/ipc/rpc/src/binary.rs b/ipc/rpc/src/binary.rs index e974626d0e2..3c7060260f2 100644 --- a/ipc/rpc/src/binary.rs +++ b/ipc/rpc/src/binary.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/rpc/src/interface.rs b/ipc/rpc/src/interface.rs index a3c170c2be2..5e2718a77b1 100644 --- a/ipc/rpc/src/interface.rs +++ b/ipc/rpc/src/interface.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/rpc/src/lib.rs b/ipc/rpc/src/lib.rs index a7832034367..c17acff98ba 100644 --- a/ipc/rpc/src/lib.rs +++ b/ipc/rpc/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/Cargo.toml b/ipc/tests/Cargo.toml index 7f10edaa72f..1e29c5c35bf 100644 --- a/ipc/tests/Cargo.toml +++ b/ipc/tests/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethcore-ipc-tests" version = "0.1.0" -authors = ["Nikolay Volf"] +authors = ["Parity Technologies "] build = "build.rs" [lib] diff --git a/ipc/tests/binary.rs b/ipc/tests/binary.rs index c8d100c6eeb..3d9d454e02d 100644 --- a/ipc/tests/binary.rs +++ b/ipc/tests/binary.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/binary.rs.in b/ipc/tests/binary.rs.in index 1498a45e0c3..34e33609fb5 100644 --- a/ipc/tests/binary.rs.in +++ b/ipc/tests/binary.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/build.rs b/ipc/tests/build.rs index 688d139be2a..a62815e7218 100644 --- a/ipc/tests/build.rs +++ b/ipc/tests/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/examples.rs b/ipc/tests/examples.rs index a27c0637aaf..b635b012c52 100644 --- a/ipc/tests/examples.rs +++ b/ipc/tests/examples.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/nested.rs b/ipc/tests/nested.rs index 6e6e3942fbb..c8116c4e7f4 100644 --- a/ipc/tests/nested.rs +++ b/ipc/tests/nested.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/nested.rs.in b/ipc/tests/nested.rs.in index df0c9bde39e..a12371ecf86 100644 --- a/ipc/tests/nested.rs.in +++ b/ipc/tests/nested.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/over_nano.rs b/ipc/tests/over_nano.rs index bdeaec3d54d..9dbf2454ec6 100644 --- a/ipc/tests/over_nano.rs +++ b/ipc/tests/over_nano.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/run.rs b/ipc/tests/run.rs index 522f566cf92..369f8f4b193 100644 --- a/ipc/tests/run.rs +++ b/ipc/tests/run.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/service.rs b/ipc/tests/service.rs index 3d5159a9b73..8b8b27c146d 100644 --- a/ipc/tests/service.rs +++ b/ipc/tests/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/service.rs.in b/ipc/tests/service.rs.in index cd9a5a6b291..9bfe93cb36c 100644 --- a/ipc/tests/service.rs.in +++ b/ipc/tests/service.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/with_attrs.rs b/ipc/tests/with_attrs.rs index bda7343688b..0a48f1cd975 100644 --- a/ipc/tests/with_attrs.rs +++ b/ipc/tests/with_attrs.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipc/tests/with_attrs.rs.in b/ipc/tests/with_attrs.rs.in index f65627fce2e..afaa4a138f3 100644 --- a/ipc/tests/with_attrs.rs.in +++ b/ipc/tests/with_attrs.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/Cargo.precompiled.toml b/js/Cargo.precompiled.toml index b8175e4f7a3..5de65203707 100644 --- a/js/Cargo.precompiled.toml +++ b/js/Cargo.precompiled.toml @@ -3,7 +3,7 @@ description = "Parity built-in dapps." name = "parity-ui-precompiled" version = "1.4.0" license = "GPL-3.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [features] diff --git a/js/Cargo.toml b/js/Cargo.toml index e52bfec9e25..231f5fa24ec 100644 --- a/js/Cargo.toml +++ b/js/Cargo.toml @@ -3,7 +3,7 @@ description = "Parity built-in dapps." name = "parity-ui-dev" version = "1.4.0" license = "GPL-3.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [features] diff --git a/js/build.rs b/js/build.rs index 82bf1ac93f3..57086451200 100644 --- a/js/build.rs +++ b/js/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/npm/parity/test/smoke.spec.js b/js/npm/parity/test/smoke.spec.js index 9920b10d2b3..56ae4210bb5 100644 --- a/js/npm/parity/test/smoke.spec.js +++ b/js/npm/parity/test/smoke.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/npm/test/mocha.config.js b/js/npm/test/mocha.config.js index 2b871f51815..9de832978ff 100644 --- a/js/npm/test/mocha.config.js +++ b/js/npm/test/mocha.config.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/abi.js b/js/src/abi/abi.js index cdf3b1f6395..457f5e416d0 100644 --- a/js/src/abi/abi.js +++ b/js/src/abi/abi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/bytesTaken.js b/js/src/abi/decoder/bytesTaken.js index 49b443d2137..5a32ca52355 100644 --- a/js/src/abi/decoder/bytesTaken.js +++ b/js/src/abi/decoder/bytesTaken.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/bytesTaken.spec.js b/js/src/abi/decoder/bytesTaken.spec.js index 65bb9e1b6f1..a5e078d7e1f 100644 --- a/js/src/abi/decoder/bytesTaken.spec.js +++ b/js/src/abi/decoder/bytesTaken.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decodeResult.js b/js/src/abi/decoder/decodeResult.js index 8595642dfb9..3fe455f616d 100644 --- a/js/src/abi/decoder/decodeResult.js +++ b/js/src/abi/decoder/decodeResult.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decodeResult.spec.js b/js/src/abi/decoder/decodeResult.spec.js index 892836d07aa..c30928d4dd4 100644 --- a/js/src/abi/decoder/decodeResult.spec.js +++ b/js/src/abi/decoder/decodeResult.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decoder.js b/js/src/abi/decoder/decoder.js index 0d218312220..c1cac60349d 100644 --- a/js/src/abi/decoder/decoder.js +++ b/js/src/abi/decoder/decoder.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/decoder.spec.js b/js/src/abi/decoder/decoder.spec.js index eeaf716c894..cb8f69173d2 100644 --- a/js/src/abi/decoder/decoder.spec.js +++ b/js/src/abi/decoder/decoder.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/decoder/index.js b/js/src/abi/decoder/index.js index f9839c10d8a..123acf28fca 100644 --- a/js/src/abi/decoder/index.js +++ b/js/src/abi/decoder/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/encoder.js b/js/src/abi/encoder/encoder.js index bb3a17d264e..8634b9511d9 100644 --- a/js/src/abi/encoder/encoder.js +++ b/js/src/abi/encoder/encoder.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/encoder.spec.js b/js/src/abi/encoder/encoder.spec.js index 008861602d1..27592fb5447 100644 --- a/js/src/abi/encoder/encoder.spec.js +++ b/js/src/abi/encoder/encoder.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/index.js b/js/src/abi/encoder/index.js index e19ff81e674..d98637f041e 100644 --- a/js/src/abi/encoder/index.js +++ b/js/src/abi/encoder/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/mediate.js b/js/src/abi/encoder/mediate.js index cb7fce6a753..b41f7b1df16 100644 --- a/js/src/abi/encoder/mediate.js +++ b/js/src/abi/encoder/mediate.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/encoder/mediate.spec.js b/js/src/abi/encoder/mediate.spec.js index cfd0211f2f9..89783607fda 100644 --- a/js/src/abi/encoder/mediate.spec.js +++ b/js/src/abi/encoder/mediate.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/index.js b/js/src/abi/index.js index f055a69133e..a7658dbe605 100644 --- a/js/src/abi/index.js +++ b/js/src/abi/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/constructor.js b/js/src/abi/spec/constructor.js index 89ea99610ef..a75e627f7e8 100644 --- a/js/src/abi/spec/constructor.js +++ b/js/src/abi/spec/constructor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/constructor.spec.js b/js/src/abi/spec/constructor.spec.js index e02f6cf71f1..80f3efe9028 100644 --- a/js/src/abi/spec/constructor.spec.js +++ b/js/src/abi/spec/constructor.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLog.js b/js/src/abi/spec/event/decodedLog.js index 3993b527b57..735ff09721f 100644 --- a/js/src/abi/spec/event/decodedLog.js +++ b/js/src/abi/spec/event/decodedLog.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLog.spec.js b/js/src/abi/spec/event/decodedLog.spec.js index e6ed1a02294..d90560d28dc 100644 --- a/js/src/abi/spec/event/decodedLog.spec.js +++ b/js/src/abi/spec/event/decodedLog.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLogParam.js b/js/src/abi/spec/event/decodedLogParam.js index ed456fcce8b..6740f85f625 100644 --- a/js/src/abi/spec/event/decodedLogParam.js +++ b/js/src/abi/spec/event/decodedLogParam.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/decodedLogParam.spec.js b/js/src/abi/spec/event/decodedLogParam.spec.js index a031282ad87..8e824258a5f 100644 --- a/js/src/abi/spec/event/decodedLogParam.spec.js +++ b/js/src/abi/spec/event/decodedLogParam.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/event.js b/js/src/abi/spec/event/event.js index f64fe0498b4..a17de1e642b 100644 --- a/js/src/abi/spec/event/event.js +++ b/js/src/abi/spec/event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/event.spec.js b/js/src/abi/spec/event/event.spec.js index f7252a9d2d7..4f27e152535 100644 --- a/js/src/abi/spec/event/event.spec.js +++ b/js/src/abi/spec/event/event.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/eventParam.js b/js/src/abi/spec/event/eventParam.js index d8a3b585d87..d991dd55a6b 100644 --- a/js/src/abi/spec/event/eventParam.js +++ b/js/src/abi/spec/event/eventParam.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/eventParam.spec.js b/js/src/abi/spec/event/eventParam.spec.js index 6858e980017..e285707f2e6 100644 --- a/js/src/abi/spec/event/eventParam.spec.js +++ b/js/src/abi/spec/event/eventParam.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/event/index.js b/js/src/abi/spec/event/index.js index 0925882d3e3..a6d44701a76 100644 --- a/js/src/abi/spec/event/index.js +++ b/js/src/abi/spec/event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/function.js b/js/src/abi/spec/function.js index 0c91a9b6f98..68a6ca34216 100644 --- a/js/src/abi/spec/function.js +++ b/js/src/abi/spec/function.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/function.spec.js b/js/src/abi/spec/function.spec.js index 1650bd31464..6ad755d70ae 100644 --- a/js/src/abi/spec/function.spec.js +++ b/js/src/abi/spec/function.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/index.js b/js/src/abi/spec/index.js index 89354d49b5b..5855a888a15 100644 --- a/js/src/abi/spec/index.js +++ b/js/src/abi/spec/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/interface.js b/js/src/abi/spec/interface.js index 1ea32e9a9c4..9116f5ca3de 100644 --- a/js/src/abi/spec/interface.js +++ b/js/src/abi/spec/interface.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/interface.spec.js b/js/src/abi/spec/interface.spec.js index ba5c38a28a0..8dda460d87f 100644 --- a/js/src/abi/spec/interface.spec.js +++ b/js/src/abi/spec/interface.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/param.js b/js/src/abi/spec/param.js index 95c3b9d18f5..88696ceedf2 100644 --- a/js/src/abi/spec/param.js +++ b/js/src/abi/spec/param.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/param.spec.js b/js/src/abi/spec/param.spec.js index bd172e4a6cb..9957df909f1 100644 --- a/js/src/abi/spec/param.spec.js +++ b/js/src/abi/spec/param.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/format.js b/js/src/abi/spec/paramType/format.js index 459eb15f43f..7bac85cf446 100644 --- a/js/src/abi/spec/paramType/format.js +++ b/js/src/abi/spec/paramType/format.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/format.spec.js b/js/src/abi/spec/paramType/format.spec.js index 90e5229d5bb..c2825a24328 100644 --- a/js/src/abi/spec/paramType/format.spec.js +++ b/js/src/abi/spec/paramType/format.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/index.js b/js/src/abi/spec/paramType/index.js index 23bb83f067c..eb1756b60b4 100644 --- a/js/src/abi/spec/paramType/index.js +++ b/js/src/abi/spec/paramType/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/paramType.js b/js/src/abi/spec/paramType/paramType.js index 99a2915d65c..d5bd0010ff3 100644 --- a/js/src/abi/spec/paramType/paramType.js +++ b/js/src/abi/spec/paramType/paramType.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/paramType.spec.js b/js/src/abi/spec/paramType/paramType.spec.js index e8d8c32540c..05b41a42b6b 100644 --- a/js/src/abi/spec/paramType/paramType.spec.js +++ b/js/src/abi/spec/paramType/paramType.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/spec/paramType/types.js b/js/src/abi/spec/paramType/types.js index d789a6ed803..768552befe2 100644 --- a/js/src/abi/spec/paramType/types.js +++ b/js/src/abi/spec/paramType/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/token/index.js b/js/src/abi/token/index.js index 4b822b4bdf7..50ef7b2275a 100644 --- a/js/src/abi/token/index.js +++ b/js/src/abi/token/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/token/token.js b/js/src/abi/token/token.js index 84c675ee63e..1d8bc6c8acc 100644 --- a/js/src/abi/token/token.js +++ b/js/src/abi/token/token.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/token/token.spec.js b/js/src/abi/token/token.spec.js index 2abaad6ac90..da4ba15ee4b 100644 --- a/js/src/abi/token/token.spec.js +++ b/js/src/abi/token/token.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/address.js b/js/src/abi/util/address.js index f0e188f2c37..a961e70356a 100644 --- a/js/src/abi/util/address.js +++ b/js/src/abi/util/address.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/address.spec.js b/js/src/abi/util/address.spec.js index 9b0ec38cbbb..6048d229495 100644 --- a/js/src/abi/util/address.spec.js +++ b/js/src/abi/util/address.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/pad.js b/js/src/abi/util/pad.js index 5a6751a4f6b..ce877797420 100644 --- a/js/src/abi/util/pad.js +++ b/js/src/abi/util/pad.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/pad.spec.js b/js/src/abi/util/pad.spec.js index 96c73368248..578083b6fd4 100644 --- a/js/src/abi/util/pad.spec.js +++ b/js/src/abi/util/pad.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/signature.js b/js/src/abi/util/signature.js index 10aedf13f98..f192e576b4f 100644 --- a/js/src/abi/util/signature.js +++ b/js/src/abi/util/signature.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/signature.spec.js b/js/src/abi/util/signature.spec.js index 61664b8fcad..144c1c7aa98 100644 --- a/js/src/abi/util/signature.spec.js +++ b/js/src/abi/util/signature.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/slice.js b/js/src/abi/util/slice.js index f4bdf38e28a..00c9c1b35b0 100644 --- a/js/src/abi/util/slice.js +++ b/js/src/abi/util/slice.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/slice.spec.js b/js/src/abi/util/slice.spec.js index d653c690125..330e570c4ef 100644 --- a/js/src/abi/util/slice.spec.js +++ b/js/src/abi/util/slice.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/sliceAs.js b/js/src/abi/util/sliceAs.js index 47c3e9758de..bec5ea87f6a 100644 --- a/js/src/abi/util/sliceAs.js +++ b/js/src/abi/util/sliceAs.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/sliceAs.spec.js b/js/src/abi/util/sliceAs.spec.js index af68860089f..9ad4cf8318d 100644 --- a/js/src/abi/util/sliceAs.spec.js +++ b/js/src/abi/util/sliceAs.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/types.js b/js/src/abi/util/types.js index 649f26db6cd..d18357f5dc3 100644 --- a/js/src/abi/util/types.js +++ b/js/src/abi/util/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/abi/util/types.spec.js b/js/src/abi/util/types.spec.js index 2e1a538a6a6..3a82d7fa18c 100644 --- a/js/src/abi/util/types.spec.js +++ b/js/src/abi/util/types.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/api.js b/js/src/api/api.js index 75d4392d01c..9e0ad11b843 100644 --- a/js/src/api/api.js +++ b/js/src/api/api.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/api.spec.js b/js/src/api/api.spec.js index 16831ea6610..1cad5b5303a 100644 --- a/js/src/api/api.spec.js +++ b/js/src/api/api.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index bfe7cabc410..95dcf2e72cc 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/contract/contract.spec.js b/js/src/api/contract/contract.spec.js index 970dd606d9c..87a7cf55867 100644 --- a/js/src/api/contract/contract.spec.js +++ b/js/src/api/contract/contract.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/contract/index.js b/js/src/api/contract/index.js index 18051a69f91..3ab8765b027 100644 --- a/js/src/api/contract/index.js +++ b/js/src/api/contract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/input.js b/js/src/api/format/input.js index 16fbd4d2ec4..4cbcbdce442 100644 --- a/js/src/api/format/input.js +++ b/js/src/api/format/input.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/input.spec.js b/js/src/api/format/input.spec.js index a22c8d1315b..27d200b938f 100644 --- a/js/src/api/format/input.spec.js +++ b/js/src/api/format/input.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/output.js b/js/src/api/format/output.js index 1094cdb8312..632ab6f28f1 100644 --- a/js/src/api/format/output.js +++ b/js/src/api/format/output.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/format/output.spec.js b/js/src/api/format/output.spec.js index aac433d701e..b440476106f 100644 --- a/js/src/api/format/output.spec.js +++ b/js/src/api/format/output.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/index.js b/js/src/api/index.js index b03419eacc6..49de886747e 100644 --- a/js/src/api/index.js +++ b/js/src/api/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/db/db.js b/js/src/api/rpc/db/db.js index 9b20316006e..ba8f3a049d0 100644 --- a/js/src/api/rpc/db/db.js +++ b/js/src/api/rpc/db/db.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/db/db.spec.js b/js/src/api/rpc/db/db.spec.js index 4a11fc416d3..afeab3c49e9 100644 --- a/js/src/api/rpc/db/db.spec.js +++ b/js/src/api/rpc/db/db.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/db/index.js b/js/src/api/rpc/db/index.js index cd7c2b0b84a..4a0be931c42 100644 --- a/js/src/api/rpc/db/index.js +++ b/js/src/api/rpc/db/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/eth.e2e.js b/js/src/api/rpc/eth/eth.e2e.js index 973ea1c517a..b385b647178 100644 --- a/js/src/api/rpc/eth/eth.e2e.js +++ b/js/src/api/rpc/eth/eth.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/eth.js b/js/src/api/rpc/eth/eth.js index 8148f938591..b435ea1ba39 100644 --- a/js/src/api/rpc/eth/eth.js +++ b/js/src/api/rpc/eth/eth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/eth.spec.js b/js/src/api/rpc/eth/eth.spec.js index 85d22f4bd33..f01e35c51b0 100644 --- a/js/src/api/rpc/eth/eth.spec.js +++ b/js/src/api/rpc/eth/eth.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/eth/index.js b/js/src/api/rpc/eth/index.js index 0d0e8c5570c..4f8450b5fc3 100644 --- a/js/src/api/rpc/eth/index.js +++ b/js/src/api/rpc/eth/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/index.js b/js/src/api/rpc/index.js index 7961da81ca4..d70f3054443 100644 --- a/js/src/api/rpc/index.js +++ b/js/src/api/rpc/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/index.js b/js/src/api/rpc/net/index.js index 0739111e6af..ee2ab2d415d 100644 --- a/js/src/api/rpc/net/index.js +++ b/js/src/api/rpc/net/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/net.e2e.js b/js/src/api/rpc/net/net.e2e.js index 51d84f7a107..9cb6635d95c 100644 --- a/js/src/api/rpc/net/net.e2e.js +++ b/js/src/api/rpc/net/net.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/net.js b/js/src/api/rpc/net/net.js index 96e99dc51f2..924e52669c0 100644 --- a/js/src/api/rpc/net/net.js +++ b/js/src/api/rpc/net/net.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/net/net.spec.js b/js/src/api/rpc/net/net.spec.js index 4903a0cde44..154e08f5c58 100644 --- a/js/src/api/rpc/net/net.spec.js +++ b/js/src/api/rpc/net/net.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/index.js b/js/src/api/rpc/parity/index.js index 38f08f72557..c76208e927d 100644 --- a/js/src/api/rpc/parity/index.js +++ b/js/src/api/rpc/parity/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/parity.e2e.js b/js/src/api/rpc/parity/parity.e2e.js index 91e01ab6a4b..22082cde03c 100644 --- a/js/src/api/rpc/parity/parity.e2e.js +++ b/js/src/api/rpc/parity/parity.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js index 7dd5b7eb3ff..2c1d04d935e 100644 --- a/js/src/api/rpc/parity/parity.js +++ b/js/src/api/rpc/parity/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/parity/parity.spec.js b/js/src/api/rpc/parity/parity.spec.js index 557314e5cd3..d0d97cd0b75 100644 --- a/js/src/api/rpc/parity/parity.spec.js +++ b/js/src/api/rpc/parity/parity.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/index.js b/js/src/api/rpc/personal/index.js index a9ed260f255..5bd5f7e5b59 100644 --- a/js/src/api/rpc/personal/index.js +++ b/js/src/api/rpc/personal/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/personal.e2e.js b/js/src/api/rpc/personal/personal.e2e.js index f7fe42c54b9..fd1bd08b1a2 100644 --- a/js/src/api/rpc/personal/personal.e2e.js +++ b/js/src/api/rpc/personal/personal.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/personal.js b/js/src/api/rpc/personal/personal.js index db9a71d2371..61022bdb46c 100644 --- a/js/src/api/rpc/personal/personal.js +++ b/js/src/api/rpc/personal/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/personal/personal.spec.js b/js/src/api/rpc/personal/personal.spec.js index 70c8cf4c2ae..b7673672dc1 100644 --- a/js/src/api/rpc/personal/personal.spec.js +++ b/js/src/api/rpc/personal/personal.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/shh/index.js b/js/src/api/rpc/shh/index.js index 7b323aeed69..e637987b292 100644 --- a/js/src/api/rpc/shh/index.js +++ b/js/src/api/rpc/shh/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/shh/shh.js b/js/src/api/rpc/shh/shh.js index ad545cac598..106b321b8be 100644 --- a/js/src/api/rpc/shh/shh.js +++ b/js/src/api/rpc/shh/shh.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/signer/index.js b/js/src/api/rpc/signer/index.js index 6426bdc0678..3653313a7d7 100644 --- a/js/src/api/rpc/signer/index.js +++ b/js/src/api/rpc/signer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/signer/signer.js b/js/src/api/rpc/signer/signer.js index 126ce651ada..6783e660a5c 100644 --- a/js/src/api/rpc/signer/signer.js +++ b/js/src/api/rpc/signer/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/index.js b/js/src/api/rpc/trace/index.js index a1408770931..2518eebd1d8 100644 --- a/js/src/api/rpc/trace/index.js +++ b/js/src/api/rpc/trace/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/trace.e2e.js b/js/src/api/rpc/trace/trace.e2e.js index 88c0988f63c..262d708f81c 100644 --- a/js/src/api/rpc/trace/trace.e2e.js +++ b/js/src/api/rpc/trace/trace.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/trace.js b/js/src/api/rpc/trace/trace.js index 5c693c0b5ff..4926153ad6d 100644 --- a/js/src/api/rpc/trace/trace.js +++ b/js/src/api/rpc/trace/trace.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/trace/trace.spec.js b/js/src/api/rpc/trace/trace.spec.js index f36e5537c7f..6d0610c842d 100644 --- a/js/src/api/rpc/trace/trace.spec.js +++ b/js/src/api/rpc/trace/trace.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/index.js b/js/src/api/rpc/web3/index.js index d0bb22941d5..23ed549d5c3 100644 --- a/js/src/api/rpc/web3/index.js +++ b/js/src/api/rpc/web3/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/web3.e2e.js b/js/src/api/rpc/web3/web3.e2e.js index 15cc1934fbf..7040d5307a0 100644 --- a/js/src/api/rpc/web3/web3.e2e.js +++ b/js/src/api/rpc/web3/web3.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/web3.js b/js/src/api/rpc/web3/web3.js index eb52a8bb72a..838ec6c4c01 100644 --- a/js/src/api/rpc/web3/web3.js +++ b/js/src/api/rpc/web3/web3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/rpc/web3/web3.spec.js b/js/src/api/rpc/web3/web3.spec.js index b933e805b95..071feb8518e 100644 --- a/js/src/api/rpc/web3/web3.spec.js +++ b/js/src/api/rpc/web3/web3.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/eth.js b/js/src/api/subscriptions/eth.js index 28d9cc6ff99..f36d9dc73a9 100644 --- a/js/src/api/subscriptions/eth.js +++ b/js/src/api/subscriptions/eth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/eth.spec.js b/js/src/api/subscriptions/eth.spec.js index 24398483e46..87cc76d0346 100644 --- a/js/src/api/subscriptions/eth.spec.js +++ b/js/src/api/subscriptions/eth.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/index.js b/js/src/api/subscriptions/index.js index 3e627e62a1e..b94b3326146 100644 --- a/js/src/api/subscriptions/index.js +++ b/js/src/api/subscriptions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/logging.js b/js/src/api/subscriptions/logging.js index b03558207f3..e75710637c9 100644 --- a/js/src/api/subscriptions/logging.js +++ b/js/src/api/subscriptions/logging.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/logging.spec.js b/js/src/api/subscriptions/logging.spec.js index 2a1cabb46c9..4b28bf890f2 100644 --- a/js/src/api/subscriptions/logging.spec.js +++ b/js/src/api/subscriptions/logging.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/manager.js b/js/src/api/subscriptions/manager.js index 25e6e6129f7..6485a665cde 100644 --- a/js/src/api/subscriptions/manager.js +++ b/js/src/api/subscriptions/manager.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/manager.spec.js b/js/src/api/subscriptions/manager.spec.js index 5e434efec4e..56594487704 100644 --- a/js/src/api/subscriptions/manager.spec.js +++ b/js/src/api/subscriptions/manager.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/personal.js b/js/src/api/subscriptions/personal.js index 82671184e06..e00169b6a32 100644 --- a/js/src/api/subscriptions/personal.js +++ b/js/src/api/subscriptions/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/personal.spec.js b/js/src/api/subscriptions/personal.spec.js index d6fd2b20314..c7d8da2b9ac 100644 --- a/js/src/api/subscriptions/personal.spec.js +++ b/js/src/api/subscriptions/personal.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/subscriptions/signer.js b/js/src/api/subscriptions/signer.js index 4413fe432ce..3fe32f4d65a 100644 --- a/js/src/api/subscriptions/signer.js +++ b/js/src/api/subscriptions/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/error.js b/js/src/api/transport/error.js index 6cb0dac1705..5fe9aac06a7 100644 --- a/js/src/api/transport/error.js +++ b/js/src/api/transport/error.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/http.e2e.js b/js/src/api/transport/http/http.e2e.js index 8f0aa48adc5..3a8a4172727 100644 --- a/js/src/api/transport/http/http.e2e.js +++ b/js/src/api/transport/http/http.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/http.js b/js/src/api/transport/http/http.js index 591b9a6277e..17d428e75ec 100644 --- a/js/src/api/transport/http/http.js +++ b/js/src/api/transport/http/http.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/http.spec.js b/js/src/api/transport/http/http.spec.js index 718a7e66b68..d67f113078c 100644 --- a/js/src/api/transport/http/http.spec.js +++ b/js/src/api/transport/http/http.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/http/index.js b/js/src/api/transport/http/index.js index 5ce7a652ea5..b73500a61ed 100644 --- a/js/src/api/transport/http/index.js +++ b/js/src/api/transport/http/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/index.js b/js/src/api/transport/index.js index 84fbac826a7..41b809525d8 100644 --- a/js/src/api/transport/index.js +++ b/js/src/api/transport/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/jsonRpcBase.js b/js/src/api/transport/jsonRpcBase.js index dc2f9bc8e9b..76f3809358d 100644 --- a/js/src/api/transport/jsonRpcBase.js +++ b/js/src/api/transport/jsonRpcBase.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/jsonRpcBase.spec.js b/js/src/api/transport/jsonRpcBase.spec.js index 78fc6549c2f..a27bca019fe 100644 --- a/js/src/api/transport/jsonRpcBase.spec.js +++ b/js/src/api/transport/jsonRpcBase.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/index.js b/js/src/api/transport/ws/index.js index 7b6e3593467..ea1bd191b1e 100644 --- a/js/src/api/transport/ws/index.js +++ b/js/src/api/transport/ws/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/ws.e2e.js b/js/src/api/transport/ws/ws.e2e.js index 19e4ab8eb4a..3ad7eb70810 100644 --- a/js/src/api/transport/ws/ws.e2e.js +++ b/js/src/api/transport/ws/ws.e2e.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/ws.js b/js/src/api/transport/ws/ws.js index 53600b6d3a7..2de50030947 100644 --- a/js/src/api/transport/ws/ws.js +++ b/js/src/api/transport/ws/ws.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/transport/ws/ws.spec.js b/js/src/api/transport/ws/ws.spec.js index c417e89110c..9303803bf4a 100644 --- a/js/src/api/transport/ws/ws.spec.js +++ b/js/src/api/transport/ws/ws.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/decode.js b/js/src/api/util/decode.js index 2d6eee75ba2..a6a2ddda4d4 100644 --- a/js/src/api/util/decode.js +++ b/js/src/api/util/decode.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/decode.spec.js b/js/src/api/util/decode.spec.js index 70bc44bc571..4652c7c5b63 100644 --- a/js/src/api/util/decode.spec.js +++ b/js/src/api/util/decode.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/format.js b/js/src/api/util/format.js index d8cf74a8f97..531dfc54999 100644 --- a/js/src/api/util/format.js +++ b/js/src/api/util/format.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/format.spec.js b/js/src/api/util/format.spec.js index c779d71efd3..cfb07dee752 100644 --- a/js/src/api/util/format.spec.js +++ b/js/src/api/util/format.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/index.js b/js/src/api/util/index.js index 2058cd011e4..e33bb92734b 100644 --- a/js/src/api/util/index.js +++ b/js/src/api/util/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/sha3.js b/js/src/api/util/sha3.js index fcbda091a23..93b01d8dd7a 100644 --- a/js/src/api/util/sha3.js +++ b/js/src/api/util/sha3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/sha3.spec.js b/js/src/api/util/sha3.spec.js index bede8bd600d..20cd0e7d564 100644 --- a/js/src/api/util/sha3.spec.js +++ b/js/src/api/util/sha3.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/types.js b/js/src/api/util/types.js index a34f30649f6..6fe442e93d6 100644 --- a/js/src/api/util/types.js +++ b/js/src/api/util/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/types.spec.js b/js/src/api/util/types.spec.js index 252876be39e..df9bf2f1f5c 100644 --- a/js/src/api/util/types.spec.js +++ b/js/src/api/util/types.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/wei.js b/js/src/api/util/wei.js index d04e73921f9..43cba764314 100644 --- a/js/src/api/util/wei.js +++ b/js/src/api/util/wei.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/api/util/wei.spec.js b/js/src/api/util/wei.spec.js index 8d0b1f09c7d..b5ab91e72af 100644 --- a/js/src/api/util/wei.spec.js +++ b/js/src/api/util/wei.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/abi/index.js b/js/src/contracts/abi/index.js index f15765b1aaa..35f96b92475 100644 --- a/js/src/contracts/abi/index.js +++ b/js/src/contracts/abi/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/badgereg.js b/js/src/contracts/badgereg.js index 45760b277f4..6cf3d8bc9c7 100644 --- a/js/src/contracts/badgereg.js +++ b/js/src/contracts/badgereg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/code/index.js b/js/src/contracts/code/index.js index ff6d218eb02..4ebc53d69f1 100644 --- a/js/src/contracts/code/index.js +++ b/js/src/contracts/code/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/code/wallet.js b/js/src/contracts/code/wallet.js index 92bcf8795b7..8e7c5f19ad4 100644 --- a/js/src/contracts/code/wallet.js +++ b/js/src/contracts/code/wallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/contracts.js b/js/src/contracts/contracts.js index a8020b82566..8cab3252d20 100644 --- a/js/src/contracts/contracts.js +++ b/js/src/contracts/contracts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/dappreg.js b/js/src/contracts/dappreg.js index ae982af5681..b9ee1576424 100644 --- a/js/src/contracts/dappreg.js +++ b/js/src/contracts/dappreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/githubhint.js b/js/src/contracts/githubhint.js index 47d7eca6e32..0ccaf01f61e 100644 --- a/js/src/contracts/githubhint.js +++ b/js/src/contracts/githubhint.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/index.js b/js/src/contracts/index.js index 075837ce651..ccf6cf5f1cd 100644 --- a/js/src/contracts/index.js +++ b/js/src/contracts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/registry.js b/js/src/contracts/registry.js index 9354a59e566..04c562f5049 100644 --- a/js/src/contracts/registry.js +++ b/js/src/contracts/registry.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/signaturereg.js b/js/src/contracts/signaturereg.js index 459f165b1d2..905530cbf78 100644 --- a/js/src/contracts/signaturereg.js +++ b/js/src/contracts/signaturereg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/sms-verification.js b/js/src/contracts/sms-verification.js index 34a6bad7620..05b7ea35fab 100644 --- a/js/src/contracts/sms-verification.js +++ b/js/src/contracts/sms-verification.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/contracts/tokenreg.js b/js/src/contracts/tokenreg.js index 5e317880b33..6c2ce66fcf7 100644 --- a/js/src/contracts/tokenreg.js +++ b/js/src/contracts/tokenreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin.js b/js/src/dapps/basiccoin.js index eb3213c79a8..6cbf2a4b26f 100644 --- a/js/src/dapps/basiccoin.js +++ b/js/src/dapps/basiccoin.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/AddressSelect/addressSelect.js b/js/src/dapps/basiccoin/AddressSelect/addressSelect.js index 529e7753d98..d29d078fea5 100644 --- a/js/src/dapps/basiccoin/AddressSelect/addressSelect.js +++ b/js/src/dapps/basiccoin/AddressSelect/addressSelect.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/AddressSelect/index.js b/js/src/dapps/basiccoin/AddressSelect/index.js index 58059cd2e1e..3caaa526d76 100644 --- a/js/src/dapps/basiccoin/AddressSelect/index.js +++ b/js/src/dapps/basiccoin/AddressSelect/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Header/header.js b/js/src/dapps/basiccoin/Application/Header/header.js index 90fa909ef06..31674bd0fa6 100644 --- a/js/src/dapps/basiccoin/Application/Header/header.js +++ b/js/src/dapps/basiccoin/Application/Header/header.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Header/index.js b/js/src/dapps/basiccoin/Application/Header/index.js index 4a51219067e..ba1f0b63c99 100644 --- a/js/src/dapps/basiccoin/Application/Header/index.js +++ b/js/src/dapps/basiccoin/Application/Header/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Loading/index.js b/js/src/dapps/basiccoin/Application/Loading/index.js index 0468cab37df..55611075bb3 100644 --- a/js/src/dapps/basiccoin/Application/Loading/index.js +++ b/js/src/dapps/basiccoin/Application/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/Loading/loading.js b/js/src/dapps/basiccoin/Application/Loading/loading.js index e698a0e80b3..b0202b633dc 100644 --- a/js/src/dapps/basiccoin/Application/Loading/loading.js +++ b/js/src/dapps/basiccoin/Application/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/application.js b/js/src/dapps/basiccoin/Application/application.js index a05ab6436cf..2863258da11 100644 --- a/js/src/dapps/basiccoin/Application/application.js +++ b/js/src/dapps/basiccoin/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/index.js b/js/src/dapps/basiccoin/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/basiccoin/Application/index.js +++ b/js/src/dapps/basiccoin/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Application/pages.js b/js/src/dapps/basiccoin/Application/pages.js index 5ab422ee4aa..49210fc5f55 100644 --- a/js/src/dapps/basiccoin/Application/pages.js +++ b/js/src/dapps/basiccoin/Application/pages.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Container/container.js b/js/src/dapps/basiccoin/Container/container.js index 82805e71b57..afab04f7d22 100644 --- a/js/src/dapps/basiccoin/Container/container.js +++ b/js/src/dapps/basiccoin/Container/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Container/index.js b/js/src/dapps/basiccoin/Container/index.js index 87fbc567ef2..5ad84166188 100644 --- a/js/src/dapps/basiccoin/Container/index.js +++ b/js/src/dapps/basiccoin/Container/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js b/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js index be08d616d9d..33beb4a9472 100644 --- a/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js +++ b/js/src/dapps/basiccoin/Deploy/Deployment/deployment.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Deployment/index.js b/js/src/dapps/basiccoin/Deploy/Deployment/index.js index 927cff5691f..89ca9681b1f 100644 --- a/js/src/dapps/basiccoin/Deploy/Deployment/index.js +++ b/js/src/dapps/basiccoin/Deploy/Deployment/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Event/event.js b/js/src/dapps/basiccoin/Deploy/Event/event.js index b32795f7e47..56b14bf237f 100644 --- a/js/src/dapps/basiccoin/Deploy/Event/event.js +++ b/js/src/dapps/basiccoin/Deploy/Event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Event/index.js b/js/src/dapps/basiccoin/Deploy/Event/index.js index 0925882d3e3..a6d44701a76 100644 --- a/js/src/dapps/basiccoin/Deploy/Event/index.js +++ b/js/src/dapps/basiccoin/Deploy/Event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Events/events.js b/js/src/dapps/basiccoin/Deploy/Events/events.js index 4b51afb59b6..915f110ccfa 100644 --- a/js/src/dapps/basiccoin/Deploy/Events/events.js +++ b/js/src/dapps/basiccoin/Deploy/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/Events/index.js b/js/src/dapps/basiccoin/Deploy/Events/index.js index 88ad6d407c9..d2c722d816a 100644 --- a/js/src/dapps/basiccoin/Deploy/Events/index.js +++ b/js/src/dapps/basiccoin/Deploy/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/deploy.js b/js/src/dapps/basiccoin/Deploy/deploy.js index 34c7eed8a32..539a8e8ca6c 100644 --- a/js/src/dapps/basiccoin/Deploy/deploy.js +++ b/js/src/dapps/basiccoin/Deploy/deploy.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Deploy/index.js b/js/src/dapps/basiccoin/Deploy/index.js index 53b4dbcfe55..6935d126630 100644 --- a/js/src/dapps/basiccoin/Deploy/index.js +++ b/js/src/dapps/basiccoin/Deploy/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js b/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js index ee1374f7ec9..b22f62923fe 100644 --- a/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js +++ b/js/src/dapps/basiccoin/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/IdentityIcon/index.js b/js/src/dapps/basiccoin/IdentityIcon/index.js index 76c107bfb75..90e9c1909bf 100644 --- a/js/src/dapps/basiccoin/IdentityIcon/index.js +++ b/js/src/dapps/basiccoin/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Owner/index.js b/js/src/dapps/basiccoin/Overview/Owner/index.js index 4f38b38b9cc..b497b66383a 100644 --- a/js/src/dapps/basiccoin/Overview/Owner/index.js +++ b/js/src/dapps/basiccoin/Overview/Owner/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Owner/owner.js b/js/src/dapps/basiccoin/Overview/Owner/owner.js index a86a275445a..35bac6160c8 100644 --- a/js/src/dapps/basiccoin/Overview/Owner/owner.js +++ b/js/src/dapps/basiccoin/Overview/Owner/owner.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Token/index.js b/js/src/dapps/basiccoin/Overview/Token/index.js index 4b822b4bdf7..50ef7b2275a 100644 --- a/js/src/dapps/basiccoin/Overview/Token/index.js +++ b/js/src/dapps/basiccoin/Overview/Token/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/Token/token.js b/js/src/dapps/basiccoin/Overview/Token/token.js index b0d4a965a67..8d2921ae598 100644 --- a/js/src/dapps/basiccoin/Overview/Token/token.js +++ b/js/src/dapps/basiccoin/Overview/Token/token.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/index.js b/js/src/dapps/basiccoin/Overview/index.js index d61fb3fb440..2e87466018a 100644 --- a/js/src/dapps/basiccoin/Overview/index.js +++ b/js/src/dapps/basiccoin/Overview/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Overview/overview.js b/js/src/dapps/basiccoin/Overview/overview.js index 46831d782ff..ecbf4e412df 100644 --- a/js/src/dapps/basiccoin/Overview/overview.js +++ b/js/src/dapps/basiccoin/Overview/overview.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Event/event.js b/js/src/dapps/basiccoin/Transfer/Event/event.js index 190035b1d43..54fe69c3495 100644 --- a/js/src/dapps/basiccoin/Transfer/Event/event.js +++ b/js/src/dapps/basiccoin/Transfer/Event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Event/index.js b/js/src/dapps/basiccoin/Transfer/Event/index.js index 0925882d3e3..a6d44701a76 100644 --- a/js/src/dapps/basiccoin/Transfer/Event/index.js +++ b/js/src/dapps/basiccoin/Transfer/Event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Events/events.js b/js/src/dapps/basiccoin/Transfer/Events/events.js index 101c77f73a3..0bdca084f9f 100644 --- a/js/src/dapps/basiccoin/Transfer/Events/events.js +++ b/js/src/dapps/basiccoin/Transfer/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Events/index.js b/js/src/dapps/basiccoin/Transfer/Events/index.js index 88ad6d407c9..d2c722d816a 100644 --- a/js/src/dapps/basiccoin/Transfer/Events/index.js +++ b/js/src/dapps/basiccoin/Transfer/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Send/index.js b/js/src/dapps/basiccoin/Transfer/Send/index.js index ad3107789e7..5e373a846bb 100644 --- a/js/src/dapps/basiccoin/Transfer/Send/index.js +++ b/js/src/dapps/basiccoin/Transfer/Send/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/Send/send.js b/js/src/dapps/basiccoin/Transfer/Send/send.js index f10807b2ef7..daec42ac7da 100644 --- a/js/src/dapps/basiccoin/Transfer/Send/send.js +++ b/js/src/dapps/basiccoin/Transfer/Send/send.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/index.js b/js/src/dapps/basiccoin/Transfer/index.js index 24d36d79637..4a82b5b7d20 100644 --- a/js/src/dapps/basiccoin/Transfer/index.js +++ b/js/src/dapps/basiccoin/Transfer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/Transfer/transfer.js b/js/src/dapps/basiccoin/Transfer/transfer.js index 842d4b7bcfb..58a317a84b9 100644 --- a/js/src/dapps/basiccoin/Transfer/transfer.js +++ b/js/src/dapps/basiccoin/Transfer/transfer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/parity.js b/js/src/dapps/basiccoin/parity.js index f6d59f44d57..450ac31b1dd 100644 --- a/js/src/dapps/basiccoin/parity.js +++ b/js/src/dapps/basiccoin/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/basiccoin/services.js b/js/src/dapps/basiccoin/services.js index f76b7fb61f6..f87259f309b 100644 --- a/js/src/dapps/basiccoin/services.js +++ b/js/src/dapps/basiccoin/services.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg.js b/js/src/dapps/dappreg.js index 9bd96f1a75b..7adfaf1b307 100644 --- a/js/src/dapps/dappreg.js +++ b/js/src/dapps/dappreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Application/application.js b/js/src/dapps/dappreg/Application/application.js index b5e4d5a9724..1722f398850 100644 --- a/js/src/dapps/dappreg/Application/application.js +++ b/js/src/dapps/dappreg/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Application/index.js b/js/src/dapps/dappreg/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/dappreg/Application/index.js +++ b/js/src/dapps/dappreg/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Button/button.js b/js/src/dapps/dappreg/Button/button.js index 1f3b67b4cda..f37a9fa4719 100644 --- a/js/src/dapps/dappreg/Button/button.js +++ b/js/src/dapps/dappreg/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Button/index.js b/js/src/dapps/dappreg/Button/index.js index f69a65e3d53..95f33d38c48 100644 --- a/js/src/dapps/dappreg/Button/index.js +++ b/js/src/dapps/dappreg/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ButtonBar/buttonBar.js b/js/src/dapps/dappreg/ButtonBar/buttonBar.js index 074c527d087..f885acb0fd3 100644 --- a/js/src/dapps/dappreg/ButtonBar/buttonBar.js +++ b/js/src/dapps/dappreg/ButtonBar/buttonBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ButtonBar/index.js b/js/src/dapps/dappreg/ButtonBar/index.js index d48f63208f5..aef56ea6e8c 100644 --- a/js/src/dapps/dappreg/ButtonBar/index.js +++ b/js/src/dapps/dappreg/ButtonBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Dapp/dapp.js b/js/src/dapps/dappreg/Dapp/dapp.js index 2e07f6ba055..0b2d4551d1e 100644 --- a/js/src/dapps/dappreg/Dapp/dapp.js +++ b/js/src/dapps/dappreg/Dapp/dapp.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Dapp/index.js b/js/src/dapps/dappreg/Dapp/index.js index 6fbb5df2738..f32a03d0e3c 100644 --- a/js/src/dapps/dappreg/Dapp/index.js +++ b/js/src/dapps/dappreg/Dapp/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Input/index.js b/js/src/dapps/dappreg/Input/index.js index 3d9d9293e5a..4a4d166742e 100644 --- a/js/src/dapps/dappreg/Input/index.js +++ b/js/src/dapps/dappreg/Input/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Input/input.js b/js/src/dapps/dappreg/Input/input.js index 72e046afb0f..ed52835d53c 100644 --- a/js/src/dapps/dappreg/Input/input.js +++ b/js/src/dapps/dappreg/Input/input.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Modal/index.js b/js/src/dapps/dappreg/Modal/index.js index 1e75d9fd896..f1fcd684848 100644 --- a/js/src/dapps/dappreg/Modal/index.js +++ b/js/src/dapps/dappreg/Modal/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Modal/modal.js b/js/src/dapps/dappreg/Modal/modal.js index 7701695d712..1456e23c65b 100644 --- a/js/src/dapps/dappreg/Modal/modal.js +++ b/js/src/dapps/dappreg/Modal/modal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalDelete/index.js b/js/src/dapps/dappreg/ModalDelete/index.js index bb321ce2c38..99cf1bd97a1 100644 --- a/js/src/dapps/dappreg/ModalDelete/index.js +++ b/js/src/dapps/dappreg/ModalDelete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalDelete/modalDelete.js b/js/src/dapps/dappreg/ModalDelete/modalDelete.js index 3a3a8ee5250..5513b7fe30f 100644 --- a/js/src/dapps/dappreg/ModalDelete/modalDelete.js +++ b/js/src/dapps/dappreg/ModalDelete/modalDelete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalRegister/index.js b/js/src/dapps/dappreg/ModalRegister/index.js index aae13fd7d4b..7b6eaf852e5 100644 --- a/js/src/dapps/dappreg/ModalRegister/index.js +++ b/js/src/dapps/dappreg/ModalRegister/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalRegister/modalRegister.js b/js/src/dapps/dappreg/ModalRegister/modalRegister.js index 53d1806e1d0..a16514ed8b6 100644 --- a/js/src/dapps/dappreg/ModalRegister/modalRegister.js +++ b/js/src/dapps/dappreg/ModalRegister/modalRegister.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalUpdate/index.js b/js/src/dapps/dappreg/ModalUpdate/index.js index 8533843ffe5..624ed4adc8b 100644 --- a/js/src/dapps/dappreg/ModalUpdate/index.js +++ b/js/src/dapps/dappreg/ModalUpdate/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js b/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js index 591fb59fddf..ba577380286 100644 --- a/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js +++ b/js/src/dapps/dappreg/ModalUpdate/modalUpdate.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectAccount/index.js b/js/src/dapps/dappreg/SelectAccount/index.js index f8c684ee250..5d7e05bd924 100644 --- a/js/src/dapps/dappreg/SelectAccount/index.js +++ b/js/src/dapps/dappreg/SelectAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectAccount/selectAccount.js b/js/src/dapps/dappreg/SelectAccount/selectAccount.js index 0269a4370ef..f06064ffec8 100644 --- a/js/src/dapps/dappreg/SelectAccount/selectAccount.js +++ b/js/src/dapps/dappreg/SelectAccount/selectAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectDapp/index.js b/js/src/dapps/dappreg/SelectDapp/index.js index 0ab133b574e..b41a4abcc11 100644 --- a/js/src/dapps/dappreg/SelectDapp/index.js +++ b/js/src/dapps/dappreg/SelectDapp/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/SelectDapp/selectDapp.js b/js/src/dapps/dappreg/SelectDapp/selectDapp.js index 8c0e846f37e..61e1d16bef6 100644 --- a/js/src/dapps/dappreg/SelectDapp/selectDapp.js +++ b/js/src/dapps/dappreg/SelectDapp/selectDapp.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Warning/index.js b/js/src/dapps/dappreg/Warning/index.js index 6097861be8b..9b67b7d8ac6 100644 --- a/js/src/dapps/dappreg/Warning/index.js +++ b/js/src/dapps/dappreg/Warning/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/Warning/warning.js b/js/src/dapps/dappreg/Warning/warning.js index 966c5d3e6d5..cdf6a129cf2 100644 --- a/js/src/dapps/dappreg/Warning/warning.js +++ b/js/src/dapps/dappreg/Warning/warning.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/dappsStore.js b/js/src/dapps/dappreg/dappsStore.js index 382f5cdc4ad..94913a2eb14 100644 --- a/js/src/dapps/dappreg/dappsStore.js +++ b/js/src/dapps/dappreg/dappsStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/modalStore.js b/js/src/dapps/dappreg/modalStore.js index 374011fc3e4..8d78c9ef9ef 100644 --- a/js/src/dapps/dappreg/modalStore.js +++ b/js/src/dapps/dappreg/modalStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/dappreg/parity.js b/js/src/dapps/dappreg/parity.js index fe8de6e9737..a4651214a2d 100644 --- a/js/src/dapps/dappreg/parity.js +++ b/js/src/dapps/dappreg/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint.js b/js/src/dapps/githubhint.js index ab807a44ba2..ea7d7b55822 100644 --- a/js/src/dapps/githubhint.js +++ b/js/src/dapps/githubhint.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Application/application.js b/js/src/dapps/githubhint/Application/application.js index 1690bf1c4e7..630a36a684f 100644 --- a/js/src/dapps/githubhint/Application/application.js +++ b/js/src/dapps/githubhint/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Application/index.js b/js/src/dapps/githubhint/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/githubhint/Application/index.js +++ b/js/src/dapps/githubhint/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Button/button.js b/js/src/dapps/githubhint/Button/button.js index 42fca1af7d4..e98963cb894 100644 --- a/js/src/dapps/githubhint/Button/button.js +++ b/js/src/dapps/githubhint/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Button/index.js b/js/src/dapps/githubhint/Button/index.js index f69a65e3d53..95f33d38c48 100644 --- a/js/src/dapps/githubhint/Button/index.js +++ b/js/src/dapps/githubhint/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Events/events.js b/js/src/dapps/githubhint/Events/events.js index ba74ceaea79..c9991acd57d 100644 --- a/js/src/dapps/githubhint/Events/events.js +++ b/js/src/dapps/githubhint/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Events/index.js b/js/src/dapps/githubhint/Events/index.js index 88ad6d407c9..d2c722d816a 100644 --- a/js/src/dapps/githubhint/Events/index.js +++ b/js/src/dapps/githubhint/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/IdentityIcon/identityIcon.js b/js/src/dapps/githubhint/IdentityIcon/identityIcon.js index 0bc86731d45..60012bc5d09 100644 --- a/js/src/dapps/githubhint/IdentityIcon/identityIcon.js +++ b/js/src/dapps/githubhint/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/IdentityIcon/index.js b/js/src/dapps/githubhint/IdentityIcon/index.js index 76c107bfb75..90e9c1909bf 100644 --- a/js/src/dapps/githubhint/IdentityIcon/index.js +++ b/js/src/dapps/githubhint/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Loading/index.js b/js/src/dapps/githubhint/Loading/index.js index 0468cab37df..55611075bb3 100644 --- a/js/src/dapps/githubhint/Loading/index.js +++ b/js/src/dapps/githubhint/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/Loading/loading.js b/js/src/dapps/githubhint/Loading/loading.js index b884597d763..c058b583eea 100644 --- a/js/src/dapps/githubhint/Loading/loading.js +++ b/js/src/dapps/githubhint/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/parity.js b/js/src/dapps/githubhint/parity.js index acee4dee06d..df80b13b302 100644 --- a/js/src/dapps/githubhint/parity.js +++ b/js/src/dapps/githubhint/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/githubhint/services.js b/js/src/dapps/githubhint/services.js index fc889b7f66a..ed143968f68 100644 --- a/js/src/dapps/githubhint/services.js +++ b/js/src/dapps/githubhint/services.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/index.js b/js/src/dapps/index.js index 9cba6970129..584fbb319bc 100644 --- a/js/src/dapps/index.js +++ b/js/src/dapps/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx.js b/js/src/dapps/localtx.js index 3e848ede9e2..5525e1a9f08 100644 --- a/js/src/dapps/localtx.js +++ b/js/src/dapps/localtx.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Application/application.js b/js/src/dapps/localtx/Application/application.js index da435b57d77..33c5d0558c3 100644 --- a/js/src/dapps/localtx/Application/application.js +++ b/js/src/dapps/localtx/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Application/application.spec.js b/js/src/dapps/localtx/Application/application.spec.js index 3ffee343dd0..f8b19e69054 100644 --- a/js/src/dapps/localtx/Application/application.spec.js +++ b/js/src/dapps/localtx/Application/application.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Application/index.js b/js/src/dapps/localtx/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/localtx/Application/index.js +++ b/js/src/dapps/localtx/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Transaction/index.js b/js/src/dapps/localtx/Transaction/index.js index 56854f4126e..7259964b7fd 100644 --- a/js/src/dapps/localtx/Transaction/index.js +++ b/js/src/dapps/localtx/Transaction/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Transaction/transaction.js b/js/src/dapps/localtx/Transaction/transaction.js index 17a45ecd60a..fab5bf152e7 100644 --- a/js/src/dapps/localtx/Transaction/transaction.js +++ b/js/src/dapps/localtx/Transaction/transaction.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/Transaction/transaction.spec.js b/js/src/dapps/localtx/Transaction/transaction.spec.js index 04f2f8de841..70fb4a08bb8 100644 --- a/js/src/dapps/localtx/Transaction/transaction.spec.js +++ b/js/src/dapps/localtx/Transaction/transaction.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/localtx/parity.js b/js/src/dapps/localtx/parity.js index acee4dee06d..df80b13b302 100644 --- a/js/src/dapps/localtx/parity.js +++ b/js/src/dapps/localtx/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry.js b/js/src/dapps/registry.js index d132da3d83d..0b8a8be5576 100644 --- a/js/src/dapps/registry.js +++ b/js/src/dapps/registry.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Accounts/accounts.js b/js/src/dapps/registry/Accounts/accounts.js index e8d8c2bd20e..076a8bfa441 100644 --- a/js/src/dapps/registry/Accounts/accounts.js +++ b/js/src/dapps/registry/Accounts/accounts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Accounts/actions.js b/js/src/dapps/registry/Accounts/actions.js index 4f2bd3c7078..2abaddd4889 100644 --- a/js/src/dapps/registry/Accounts/actions.js +++ b/js/src/dapps/registry/Accounts/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Accounts/index.js b/js/src/dapps/registry/Accounts/index.js index e9be1d55733..c1e7c91a0a2 100644 --- a/js/src/dapps/registry/Accounts/index.js +++ b/js/src/dapps/registry/Accounts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Application/application.js b/js/src/dapps/registry/Application/application.js index 45290937ea4..0d1f7e50a41 100644 --- a/js/src/dapps/registry/Application/application.js +++ b/js/src/dapps/registry/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Application/index.js b/js/src/dapps/registry/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/registry/Application/index.js +++ b/js/src/dapps/registry/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Container.js b/js/src/dapps/registry/Container.js index e379038faa6..2de04112630 100644 --- a/js/src/dapps/registry/Container.js +++ b/js/src/dapps/registry/Container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/actions.js b/js/src/dapps/registry/Events/actions.js index e12c98c4f67..aa48947e805 100644 --- a/js/src/dapps/registry/Events/actions.js +++ b/js/src/dapps/registry/Events/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/events.js b/js/src/dapps/registry/Events/events.js index cb433068fef..77a985def2c 100644 --- a/js/src/dapps/registry/Events/events.js +++ b/js/src/dapps/registry/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/index.js b/js/src/dapps/registry/Events/index.js index 15d43c375c1..d058c814dad 100644 --- a/js/src/dapps/registry/Events/index.js +++ b/js/src/dapps/registry/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Events/reducers.js b/js/src/dapps/registry/Events/reducers.js index 6ff0011d34f..8bca205ac35 100644 --- a/js/src/dapps/registry/Events/reducers.js +++ b/js/src/dapps/registry/Events/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/IdentityIcon/identityIcon.js b/js/src/dapps/registry/IdentityIcon/identityIcon.js index e4baf27057d..873c2eb88d5 100644 --- a/js/src/dapps/registry/IdentityIcon/identityIcon.js +++ b/js/src/dapps/registry/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/IdentityIcon/index.js b/js/src/dapps/registry/IdentityIcon/index.js index 76c107bfb75..90e9c1909bf 100644 --- a/js/src/dapps/registry/IdentityIcon/index.js +++ b/js/src/dapps/registry/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/actions.js b/js/src/dapps/registry/Lookup/actions.js index a7df875854f..7cd1ee57a18 100644 --- a/js/src/dapps/registry/Lookup/actions.js +++ b/js/src/dapps/registry/Lookup/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/index.js b/js/src/dapps/registry/Lookup/index.js index f4ade7c001e..5e278c07ebb 100644 --- a/js/src/dapps/registry/Lookup/index.js +++ b/js/src/dapps/registry/Lookup/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/lookup.js b/js/src/dapps/registry/Lookup/lookup.js index b8b6207cc29..a743219f2cc 100644 --- a/js/src/dapps/registry/Lookup/lookup.js +++ b/js/src/dapps/registry/Lookup/lookup.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Lookup/reducers.js b/js/src/dapps/registry/Lookup/reducers.js index f96e784bdbe..d6807c71368 100644 --- a/js/src/dapps/registry/Lookup/reducers.js +++ b/js/src/dapps/registry/Lookup/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/actions.js b/js/src/dapps/registry/Names/actions.js index 48814533132..f6ffec729ab 100644 --- a/js/src/dapps/registry/Names/actions.js +++ b/js/src/dapps/registry/Names/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/index.js b/js/src/dapps/registry/Names/index.js index 26195de8848..9bfa8232a74 100644 --- a/js/src/dapps/registry/Names/index.js +++ b/js/src/dapps/registry/Names/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/names.js b/js/src/dapps/registry/Names/names.js index 369d9690ce8..c0c4badf0de 100644 --- a/js/src/dapps/registry/Names/names.js +++ b/js/src/dapps/registry/Names/names.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Names/reducers.js b/js/src/dapps/registry/Names/reducers.js index fcd2ce48ec2..2b43c8b3e5f 100644 --- a/js/src/dapps/registry/Names/reducers.js +++ b/js/src/dapps/registry/Names/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/Records/records.js b/js/src/dapps/registry/Records/records.js index 4837290a326..085a7015249 100644 --- a/js/src/dapps/registry/Records/records.js +++ b/js/src/dapps/registry/Records/records.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/actions.js b/js/src/dapps/registry/actions.js index dd6652d76e5..0526802b96c 100644 --- a/js/src/dapps/registry/actions.js +++ b/js/src/dapps/registry/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/addresses/accounts-reducer.js b/js/src/dapps/registry/addresses/accounts-reducer.js index 20981877d65..926536be022 100644 --- a/js/src/dapps/registry/addresses/accounts-reducer.js +++ b/js/src/dapps/registry/addresses/accounts-reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/addresses/actions.js b/js/src/dapps/registry/addresses/actions.js index 05936617359..d53df1c7f54 100644 --- a/js/src/dapps/registry/addresses/actions.js +++ b/js/src/dapps/registry/addresses/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/addresses/contacts-reducer.js b/js/src/dapps/registry/addresses/contacts-reducer.js index 6b0572e5495..401302520fc 100644 --- a/js/src/dapps/registry/addresses/contacts-reducer.js +++ b/js/src/dapps/registry/addresses/contacts-reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/parity.js b/js/src/dapps/registry/parity.js index cf9819b60eb..739e9d4f253 100644 --- a/js/src/dapps/registry/parity.js +++ b/js/src/dapps/registry/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/reducers.js b/js/src/dapps/registry/reducers.js index e0f620b7084..06b8f024b47 100644 --- a/js/src/dapps/registry/reducers.js +++ b/js/src/dapps/registry/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/store.js b/js/src/dapps/registry/store.js index 5fb7d4b6a4e..94117fbf40f 100644 --- a/js/src/dapps/registry/store.js +++ b/js/src/dapps/registry/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/address.js b/js/src/dapps/registry/ui/address.js index f0b9d65da08..f19894b482e 100644 --- a/js/src/dapps/registry/ui/address.js +++ b/js/src/dapps/registry/ui/address.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/hash.js b/js/src/dapps/registry/ui/hash.js index 4035a9bbe24..7a586b2563e 100644 --- a/js/src/dapps/registry/ui/hash.js +++ b/js/src/dapps/registry/ui/hash.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/image.js b/js/src/dapps/registry/ui/image.js index e0101e1f204..c66e3412801 100644 --- a/js/src/dapps/registry/ui/image.js +++ b/js/src/dapps/registry/ui/image.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/registry/ui/record-type-select.js b/js/src/dapps/registry/ui/record-type-select.js index 2cfbdf54067..e146dbf7d09 100644 --- a/js/src/dapps/registry/ui/record-type-select.js +++ b/js/src/dapps/registry/ui/record-type-select.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg.js b/js/src/dapps/signaturereg.js index d0d0cd423e0..dd60878150b 100644 --- a/js/src/dapps/signaturereg.js +++ b/js/src/dapps/signaturereg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Application/application.js b/js/src/dapps/signaturereg/Application/application.js index 3878af4cfb1..afddbfcaf99 100644 --- a/js/src/dapps/signaturereg/Application/application.js +++ b/js/src/dapps/signaturereg/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Application/index.js b/js/src/dapps/signaturereg/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/signaturereg/Application/index.js +++ b/js/src/dapps/signaturereg/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Button/button.js b/js/src/dapps/signaturereg/Button/button.js index 9cbbcf478ee..238ef4f8821 100644 --- a/js/src/dapps/signaturereg/Button/button.js +++ b/js/src/dapps/signaturereg/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Button/index.js b/js/src/dapps/signaturereg/Button/index.js index f69a65e3d53..95f33d38c48 100644 --- a/js/src/dapps/signaturereg/Button/index.js +++ b/js/src/dapps/signaturereg/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Events/events.js b/js/src/dapps/signaturereg/Events/events.js index 302b5125041..067b3ead602 100644 --- a/js/src/dapps/signaturereg/Events/events.js +++ b/js/src/dapps/signaturereg/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Events/index.js b/js/src/dapps/signaturereg/Events/index.js index 88ad6d407c9..d2c722d816a 100644 --- a/js/src/dapps/signaturereg/Events/index.js +++ b/js/src/dapps/signaturereg/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Header/header.js b/js/src/dapps/signaturereg/Header/header.js index 8dd7cd578a5..87044733884 100644 --- a/js/src/dapps/signaturereg/Header/header.js +++ b/js/src/dapps/signaturereg/Header/header.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Header/index.js b/js/src/dapps/signaturereg/Header/index.js index 37b5835f054..c73d890cce4 100644 --- a/js/src/dapps/signaturereg/Header/index.js +++ b/js/src/dapps/signaturereg/Header/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js b/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js index 0bc86731d45..60012bc5d09 100644 --- a/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js +++ b/js/src/dapps/signaturereg/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/IdentityIcon/index.js b/js/src/dapps/signaturereg/IdentityIcon/index.js index 76c107bfb75..90e9c1909bf 100644 --- a/js/src/dapps/signaturereg/IdentityIcon/index.js +++ b/js/src/dapps/signaturereg/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Import/import.js b/js/src/dapps/signaturereg/Import/import.js index 55f7d933413..1281bfc9306 100644 --- a/js/src/dapps/signaturereg/Import/import.js +++ b/js/src/dapps/signaturereg/Import/import.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Import/index.js b/js/src/dapps/signaturereg/Import/index.js index d2f352cf3db..f6a1b16e198 100644 --- a/js/src/dapps/signaturereg/Import/index.js +++ b/js/src/dapps/signaturereg/Import/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Loading/index.js b/js/src/dapps/signaturereg/Loading/index.js index 0468cab37df..55611075bb3 100644 --- a/js/src/dapps/signaturereg/Loading/index.js +++ b/js/src/dapps/signaturereg/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/Loading/loading.js b/js/src/dapps/signaturereg/Loading/loading.js index b884597d763..c058b583eea 100644 --- a/js/src/dapps/signaturereg/Loading/loading.js +++ b/js/src/dapps/signaturereg/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/format.js b/js/src/dapps/signaturereg/format.js index 24b6428f48d..6e28a61a457 100644 --- a/js/src/dapps/signaturereg/format.js +++ b/js/src/dapps/signaturereg/format.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/parity.js b/js/src/dapps/signaturereg/parity.js index f6d59f44d57..450ac31b1dd 100644 --- a/js/src/dapps/signaturereg/parity.js +++ b/js/src/dapps/signaturereg/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/signaturereg/services.js b/js/src/dapps/signaturereg/services.js index 82dba383b1a..cd0fd59c768 100644 --- a/js/src/dapps/signaturereg/services.js +++ b/js/src/dapps/signaturereg/services.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg.js b/js/src/dapps/tokenreg.js index 1bc76e12357..c359dd07215 100644 --- a/js/src/dapps/tokenreg.js +++ b/js/src/dapps/tokenreg.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js b/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js index 4d29a6692a7..5cb84f5a9a1 100644 --- a/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js +++ b/js/src/dapps/tokenreg/Accounts/AccountSelector/account-selector.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js b/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js index 6438d1dff7c..6cd0dcc3a83 100644 --- a/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js +++ b/js/src/dapps/tokenreg/Accounts/AccountSelector/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js b/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js index 87fbc567ef2..5ad84166188 100644 --- a/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js +++ b/js/src/dapps/tokenreg/Accounts/AccountSelector/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/actions.js b/js/src/dapps/tokenreg/Accounts/actions.js index 5f92280beec..85e4aacebc0 100644 --- a/js/src/dapps/tokenreg/Accounts/actions.js +++ b/js/src/dapps/tokenreg/Accounts/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Accounts/reducer.js b/js/src/dapps/tokenreg/Accounts/reducer.js index 091df4c8a66..899a03b53f2 100644 --- a/js/src/dapps/tokenreg/Accounts/reducer.js +++ b/js/src/dapps/tokenreg/Accounts/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Query/index.js b/js/src/dapps/tokenreg/Actions/Query/index.js index 83bc6a337ca..0273a5f8e00 100644 --- a/js/src/dapps/tokenreg/Actions/Query/index.js +++ b/js/src/dapps/tokenreg/Actions/Query/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Query/query.js b/js/src/dapps/tokenreg/Actions/Query/query.js index 5a3c7d5f672..fd680769c7c 100644 --- a/js/src/dapps/tokenreg/Actions/Query/query.js +++ b/js/src/dapps/tokenreg/Actions/Query/query.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Register/index.js b/js/src/dapps/tokenreg/Actions/Register/index.js index 3099d1f42f3..ff135192e72 100644 --- a/js/src/dapps/tokenreg/Actions/Register/index.js +++ b/js/src/dapps/tokenreg/Actions/Register/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/Register/register.js b/js/src/dapps/tokenreg/Actions/Register/register.js index a008ce84fcc..54df411c714 100644 --- a/js/src/dapps/tokenreg/Actions/Register/register.js +++ b/js/src/dapps/tokenreg/Actions/Register/register.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/actions.js b/js/src/dapps/tokenreg/Actions/actions.js index df5b41e6bd5..5c1faf985b9 100644 --- a/js/src/dapps/tokenreg/Actions/actions.js +++ b/js/src/dapps/tokenreg/Actions/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/component.js b/js/src/dapps/tokenreg/Actions/component.js index 43acc27aba5..c79f2563a86 100644 --- a/js/src/dapps/tokenreg/Actions/component.js +++ b/js/src/dapps/tokenreg/Actions/component.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/container.js b/js/src/dapps/tokenreg/Actions/container.js index 1d3d8fe3112..2a4800a671b 100644 --- a/js/src/dapps/tokenreg/Actions/container.js +++ b/js/src/dapps/tokenreg/Actions/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/index.js b/js/src/dapps/tokenreg/Actions/index.js index 9007217b714..a442bf3c53f 100644 --- a/js/src/dapps/tokenreg/Actions/index.js +++ b/js/src/dapps/tokenreg/Actions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Actions/reducer.js b/js/src/dapps/tokenreg/Actions/reducer.js index 7b7f8341a32..1768cbe6fa5 100644 --- a/js/src/dapps/tokenreg/Actions/reducer.js +++ b/js/src/dapps/tokenreg/Actions/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Application/application.js b/js/src/dapps/tokenreg/Application/application.js index 6a94f5c9c52..0ac78402318 100644 --- a/js/src/dapps/tokenreg/Application/application.js +++ b/js/src/dapps/tokenreg/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Application/index.js b/js/src/dapps/tokenreg/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/dapps/tokenreg/Application/index.js +++ b/js/src/dapps/tokenreg/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Chip/chip.js b/js/src/dapps/tokenreg/Chip/chip.js index ad98860259a..f26f9a0c6ac 100644 --- a/js/src/dapps/tokenreg/Chip/chip.js +++ b/js/src/dapps/tokenreg/Chip/chip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Chip/index.js b/js/src/dapps/tokenreg/Chip/index.js index 6e1ea80fba1..98f3fc5ae83 100644 --- a/js/src/dapps/tokenreg/Chip/index.js +++ b/js/src/dapps/tokenreg/Chip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Container.js b/js/src/dapps/tokenreg/Container.js index 9a8d7c63658..00f726cf9df 100644 --- a/js/src/dapps/tokenreg/Container.js +++ b/js/src/dapps/tokenreg/Container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js b/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js index 51f48d46ab3..76dfb00793b 100644 --- a/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js +++ b/js/src/dapps/tokenreg/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/IdentityIcon/index.js b/js/src/dapps/tokenreg/IdentityIcon/index.js index 76c107bfb75..90e9c1909bf 100644 --- a/js/src/dapps/tokenreg/IdentityIcon/index.js +++ b/js/src/dapps/tokenreg/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/Text/container.js b/js/src/dapps/tokenreg/Inputs/Text/container.js index 450a2b56e54..fe8ae4c2630 100644 --- a/js/src/dapps/tokenreg/Inputs/Text/container.js +++ b/js/src/dapps/tokenreg/Inputs/Text/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/Text/index.js b/js/src/dapps/tokenreg/Inputs/Text/index.js index 87fbc567ef2..5ad84166188 100644 --- a/js/src/dapps/tokenreg/Inputs/Text/index.js +++ b/js/src/dapps/tokenreg/Inputs/Text/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/Text/input-text.js b/js/src/dapps/tokenreg/Inputs/Text/input-text.js index 289c8c37f38..9a8ceca3d2d 100644 --- a/js/src/dapps/tokenreg/Inputs/Text/input-text.js +++ b/js/src/dapps/tokenreg/Inputs/Text/input-text.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Inputs/validation.js b/js/src/dapps/tokenreg/Inputs/validation.js index fd394b4ec40..3b14bd0a4b3 100644 --- a/js/src/dapps/tokenreg/Inputs/validation.js +++ b/js/src/dapps/tokenreg/Inputs/validation.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Loading/index.js b/js/src/dapps/tokenreg/Loading/index.js index 0468cab37df..55611075bb3 100644 --- a/js/src/dapps/tokenreg/Loading/index.js +++ b/js/src/dapps/tokenreg/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Loading/loading.js b/js/src/dapps/tokenreg/Loading/loading.js index bdcc98df679..507c84bf9eb 100644 --- a/js/src/dapps/tokenreg/Loading/loading.js +++ b/js/src/dapps/tokenreg/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/actions.js b/js/src/dapps/tokenreg/Status/actions.js index 76fae17e549..057a44e658b 100644 --- a/js/src/dapps/tokenreg/Status/actions.js +++ b/js/src/dapps/tokenreg/Status/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/index.js b/js/src/dapps/tokenreg/Status/index.js index 44079b22485..f966050e937 100644 --- a/js/src/dapps/tokenreg/Status/index.js +++ b/js/src/dapps/tokenreg/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/reducer.js b/js/src/dapps/tokenreg/Status/reducer.js index aee16fbe78d..ae41e6a0be2 100644 --- a/js/src/dapps/tokenreg/Status/reducer.js +++ b/js/src/dapps/tokenreg/Status/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Status/status.js b/js/src/dapps/tokenreg/Status/status.js index 4ca47a6eaef..64ebba3b6f2 100644 --- a/js/src/dapps/tokenreg/Status/status.js +++ b/js/src/dapps/tokenreg/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/add-meta.js b/js/src/dapps/tokenreg/Tokens/Token/add-meta.js index 09e65954d25..60be410e9b6 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/add-meta.js +++ b/js/src/dapps/tokenreg/Tokens/Token/add-meta.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/index.js b/js/src/dapps/tokenreg/Tokens/Token/index.js index 30ad8896f78..40e8626af05 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/index.js +++ b/js/src/dapps/tokenreg/Tokens/Token/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/token.js b/js/src/dapps/tokenreg/Tokens/Token/token.js index be14cec84bd..831be4a0d93 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/token.js +++ b/js/src/dapps/tokenreg/Tokens/Token/token.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js b/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js index 7351da524d0..84eb14270c2 100644 --- a/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js +++ b/js/src/dapps/tokenreg/Tokens/Token/tokenContainer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/actions.js b/js/src/dapps/tokenreg/Tokens/actions.js index 65ed24cd420..8ec37fd172e 100644 --- a/js/src/dapps/tokenreg/Tokens/actions.js +++ b/js/src/dapps/tokenreg/Tokens/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/container.js b/js/src/dapps/tokenreg/Tokens/container.js index 33b2de65905..84f9c18d3fb 100644 --- a/js/src/dapps/tokenreg/Tokens/container.js +++ b/js/src/dapps/tokenreg/Tokens/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/index.js b/js/src/dapps/tokenreg/Tokens/index.js index 87fbc567ef2..5ad84166188 100644 --- a/js/src/dapps/tokenreg/Tokens/index.js +++ b/js/src/dapps/tokenreg/Tokens/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/reducer.js b/js/src/dapps/tokenreg/Tokens/reducer.js index 21952105c4d..10ca67b95a2 100644 --- a/js/src/dapps/tokenreg/Tokens/reducer.js +++ b/js/src/dapps/tokenreg/Tokens/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/Tokens/tokens.js b/js/src/dapps/tokenreg/Tokens/tokens.js index 48bc88a74b4..e31c1675c9a 100644 --- a/js/src/dapps/tokenreg/Tokens/tokens.js +++ b/js/src/dapps/tokenreg/Tokens/tokens.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/constants.js b/js/src/dapps/tokenreg/constants.js index e9e7bebcab8..cc4d38fcb3b 100644 --- a/js/src/dapps/tokenreg/constants.js +++ b/js/src/dapps/tokenreg/constants.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/parity.js b/js/src/dapps/tokenreg/parity.js index f6d59f44d57..450ac31b1dd 100644 --- a/js/src/dapps/tokenreg/parity.js +++ b/js/src/dapps/tokenreg/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/reducers.js b/js/src/dapps/tokenreg/reducers.js index cf533432fd4..e2ea73e3986 100644 --- a/js/src/dapps/tokenreg/reducers.js +++ b/js/src/dapps/tokenreg/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/store.js b/js/src/dapps/tokenreg/store.js index 5fb7d4b6a4e..94117fbf40f 100644 --- a/js/src/dapps/tokenreg/store.js +++ b/js/src/dapps/tokenreg/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/dapps/tokenreg/utils.js b/js/src/dapps/tokenreg/utils.js index f156b78dd75..6461998f3b7 100644 --- a/js/src/dapps/tokenreg/utils.js +++ b/js/src/dapps/tokenreg/utils.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/index.js b/js/src/environment/index.js index 9b95bb0dada..27681198201 100644 --- a/js/src/environment/index.js +++ b/js/src/environment/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/integration-tests/fake-backend.js b/js/src/environment/integration-tests/fake-backend.js index 16fcae3adc5..3c71edaaf1f 100644 --- a/js/src/environment/integration-tests/fake-backend.js +++ b/js/src/environment/integration-tests/fake-backend.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/integration-tests/index.js b/js/src/environment/integration-tests/index.js index d62acaa324b..d8f503621c7 100644 --- a/js/src/environment/integration-tests/index.js +++ b/js/src/environment/integration-tests/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/perf-debug/index.js b/js/src/environment/perf-debug/index.js index 29f84f50fb0..6c9d70e6e54 100644 --- a/js/src/environment/perf-debug/index.js +++ b/js/src/environment/perf-debug/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/perf-debug/why-update.js b/js/src/environment/perf-debug/why-update.js index 35eef2edc36..602cf7bc039 100644 --- a/js/src/environment/perf-debug/why-update.js +++ b/js/src/environment/perf-debug/why-update.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/tests/index.js b/js/src/environment/tests/index.js index 3e6241fb114..0261a77bdb2 100644 --- a/js/src/environment/tests/index.js +++ b/js/src/environment/tests/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/environment/tests/test-utils.js b/js/src/environment/tests/test-utils.js index 785a6f3ad8e..acf7ad7ab78 100644 --- a/js/src/environment/tests/test-utils.js +++ b/js/src/environment/tests/test-utils.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/index.js b/js/src/index.js index 46d6c9c7493..b90f9c61a02 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/generator/build-json.js b/js/src/jsonrpc/generator/build-json.js index 362df7bf5fe..ddbd41c2540 100644 --- a/js/src/jsonrpc/generator/build-json.js +++ b/js/src/jsonrpc/generator/build-json.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/generator/build-markdown.js b/js/src/jsonrpc/generator/build-markdown.js index 278138d545e..101c8f3cf62 100644 --- a/js/src/jsonrpc/generator/build-markdown.js +++ b/js/src/jsonrpc/generator/build-markdown.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/index.js b/js/src/jsonrpc/index.js index 9e96922790e..2f234fea799 100644 --- a/js/src/jsonrpc/index.js +++ b/js/src/jsonrpc/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/index.spec.js b/js/src/jsonrpc/index.spec.js index 0f124747743..443cbf8bf9b 100644 --- a/js/src/jsonrpc/index.spec.js +++ b/js/src/jsonrpc/index.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/db.js b/js/src/jsonrpc/interfaces/db.js index ab4d35b34a7..557a7315664 100644 --- a/js/src/jsonrpc/interfaces/db.js +++ b/js/src/jsonrpc/interfaces/db.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/eth.js b/js/src/jsonrpc/interfaces/eth.js index d5ff471fbea..3a136ab7ef0 100644 --- a/js/src/jsonrpc/interfaces/eth.js +++ b/js/src/jsonrpc/interfaces/eth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/net.js b/js/src/jsonrpc/interfaces/net.js index 9cc3bc07666..ee8cd9069ea 100644 --- a/js/src/jsonrpc/interfaces/net.js +++ b/js/src/jsonrpc/interfaces/net.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/parity.js b/js/src/jsonrpc/interfaces/parity.js index 76886af3513..bab9ad6e321 100644 --- a/js/src/jsonrpc/interfaces/parity.js +++ b/js/src/jsonrpc/interfaces/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/personal.js b/js/src/jsonrpc/interfaces/personal.js index eb7e5fc0f71..9450570840d 100644 --- a/js/src/jsonrpc/interfaces/personal.js +++ b/js/src/jsonrpc/interfaces/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/shh.js b/js/src/jsonrpc/interfaces/shh.js index e9f727dacc4..b8d6ecfd1c6 100644 --- a/js/src/jsonrpc/interfaces/shh.js +++ b/js/src/jsonrpc/interfaces/shh.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/signer.js b/js/src/jsonrpc/interfaces/signer.js index f50bb1115a3..e4ffc1e0384 100644 --- a/js/src/jsonrpc/interfaces/signer.js +++ b/js/src/jsonrpc/interfaces/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/trace.js b/js/src/jsonrpc/interfaces/trace.js index efe45f34ebd..38fa77d892a 100644 --- a/js/src/jsonrpc/interfaces/trace.js +++ b/js/src/jsonrpc/interfaces/trace.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/interfaces/web3.js b/js/src/jsonrpc/interfaces/web3.js index 783663716ab..af35ee21875 100644 --- a/js/src/jsonrpc/interfaces/web3.js +++ b/js/src/jsonrpc/interfaces/web3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/jsonrpc/types.js b/js/src/jsonrpc/types.js index 026e010ed96..86f528a3447 100644 --- a/js/src/jsonrpc/types.js +++ b/js/src/jsonrpc/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/lib.rs b/js/src/lib.rs index 25d336fabe9..996d8db509b 100644 --- a/js/src/lib.rs +++ b/js/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/lib.rs.in b/js/src/lib.rs.in index b3f09556a2b..ddbdec10bf5 100644 --- a/js/src/lib.rs.in +++ b/js/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/library.etherscan.js b/js/src/library.etherscan.js index 59cb861d3ed..e37ab635877 100644 --- a/js/src/library.etherscan.js +++ b/js/src/library.etherscan.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/library.parity.js b/js/src/library.parity.js index 2b526c28eb5..d95a64b891c 100644 --- a/js/src/library.parity.js +++ b/js/src/library.parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/library.shapeshift.js b/js/src/library.shapeshift.js index 3f24f216bf1..e5b1b407b60 100644 --- a/js/src/library.shapeshift.js +++ b/js/src/library.shapeshift.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/main.js b/js/src/main.js index f61e3d5635c..52d8b09767f 100644 --- a/js/src/main.js +++ b/js/src/main.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddAddress/addAddress.js b/js/src/modals/AddAddress/addAddress.js index a72158cc714..17722329096 100644 --- a/js/src/modals/AddAddress/addAddress.js +++ b/js/src/modals/AddAddress/addAddress.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddAddress/index.js b/js/src/modals/AddAddress/index.js index fb891f0fef2..f873e3a9a8b 100644 --- a/js/src/modals/AddAddress/index.js +++ b/js/src/modals/AddAddress/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddContract/addContract.js b/js/src/modals/AddContract/addContract.js index b1939800131..0d04438c35a 100644 --- a/js/src/modals/AddContract/addContract.js +++ b/js/src/modals/AddContract/addContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/AddContract/index.js b/js/src/modals/AddContract/index.js index 05f53efd5b0..da84e291a86 100644 --- a/js/src/modals/AddContract/index.js +++ b/js/src/modals/AddContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetails/accountDetails.js b/js/src/modals/CreateAccount/AccountDetails/accountDetails.js index f869e3ec557..2ff143b6424 100644 --- a/js/src/modals/CreateAccount/AccountDetails/accountDetails.js +++ b/js/src/modals/CreateAccount/AccountDetails/accountDetails.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetails/index.js b/js/src/modals/CreateAccount/AccountDetails/index.js index c1911d8d8e0..bebc17eee60 100644 --- a/js/src/modals/CreateAccount/AccountDetails/index.js +++ b/js/src/modals/CreateAccount/AccountDetails/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js b/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js index d0f4ac2ff5a..4d9cde568b5 100644 --- a/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js +++ b/js/src/modals/CreateAccount/AccountDetailsGeth/accountDetailsGeth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/AccountDetailsGeth/index.js b/js/src/modals/CreateAccount/AccountDetailsGeth/index.js index 97d2ce159dd..6e5a20b0344 100644 --- a/js/src/modals/CreateAccount/AccountDetailsGeth/index.js +++ b/js/src/modals/CreateAccount/AccountDetailsGeth/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/CreationType/creationType.js b/js/src/modals/CreateAccount/CreationType/creationType.js index fe982a2979b..3c91c970167 100644 --- a/js/src/modals/CreateAccount/CreationType/creationType.js +++ b/js/src/modals/CreateAccount/CreationType/creationType.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/CreationType/index.js b/js/src/modals/CreateAccount/CreationType/index.js index cd00277c4ff..86133172b8b 100644 --- a/js/src/modals/CreateAccount/CreationType/index.js +++ b/js/src/modals/CreateAccount/CreationType/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewAccount/index.js b/js/src/modals/CreateAccount/NewAccount/index.js index f030a32d962..5d2a3e68687 100644 --- a/js/src/modals/CreateAccount/NewAccount/index.js +++ b/js/src/modals/CreateAccount/NewAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewAccount/newAccount.js b/js/src/modals/CreateAccount/NewAccount/newAccount.js index bbbf6fed315..267ed56bc3b 100644 --- a/js/src/modals/CreateAccount/NewAccount/newAccount.js +++ b/js/src/modals/CreateAccount/NewAccount/newAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewGeth/index.js b/js/src/modals/CreateAccount/NewGeth/index.js index 5801eb97008..55764c95628 100644 --- a/js/src/modals/CreateAccount/NewGeth/index.js +++ b/js/src/modals/CreateAccount/NewGeth/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewGeth/newGeth.js b/js/src/modals/CreateAccount/NewGeth/newGeth.js index 2159277c57b..2690759833e 100644 --- a/js/src/modals/CreateAccount/NewGeth/newGeth.js +++ b/js/src/modals/CreateAccount/NewGeth/newGeth.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewImport/index.js b/js/src/modals/CreateAccount/NewImport/index.js index 0b260f4267e..ff0eefc6230 100644 --- a/js/src/modals/CreateAccount/NewImport/index.js +++ b/js/src/modals/CreateAccount/NewImport/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/NewImport/newImport.js b/js/src/modals/CreateAccount/NewImport/newImport.js index e8d0bb8d6a4..84ec5b425d0 100644 --- a/js/src/modals/CreateAccount/NewImport/newImport.js +++ b/js/src/modals/CreateAccount/NewImport/newImport.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RawKey/index.js b/js/src/modals/CreateAccount/RawKey/index.js index 6e372f475c4..d52b448018d 100644 --- a/js/src/modals/CreateAccount/RawKey/index.js +++ b/js/src/modals/CreateAccount/RawKey/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RawKey/rawKey.js b/js/src/modals/CreateAccount/RawKey/rawKey.js index fed028bf9d4..c0cb846176b 100644 --- a/js/src/modals/CreateAccount/RawKey/rawKey.js +++ b/js/src/modals/CreateAccount/RawKey/rawKey.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RecoveryPhrase/index.js b/js/src/modals/CreateAccount/RecoveryPhrase/index.js index b88a8580e83..d56f99dd63e 100644 --- a/js/src/modals/CreateAccount/RecoveryPhrase/index.js +++ b/js/src/modals/CreateAccount/RecoveryPhrase/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js b/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js index 4088fac5308..2736256f193 100644 --- a/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js +++ b/js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/createAccount.js b/js/src/modals/CreateAccount/createAccount.js index d8413cee797..d7ec8487bd5 100644 --- a/js/src/modals/CreateAccount/createAccount.js +++ b/js/src/modals/CreateAccount/createAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/index.js b/js/src/modals/CreateAccount/index.js index f75cecaacf7..a66124c9b59 100644 --- a/js/src/modals/CreateAccount/index.js +++ b/js/src/modals/CreateAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateAccount/print.js b/js/src/modals/CreateAccount/print.js index 18cddeee948..1f92744d409 100644 --- a/js/src/modals/CreateAccount/print.js +++ b/js/src/modals/CreateAccount/print.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletDetails/index.js b/js/src/modals/CreateWallet/WalletDetails/index.js index 2663855118b..1170852f2fa 100644 --- a/js/src/modals/CreateWallet/WalletDetails/index.js +++ b/js/src/modals/CreateWallet/WalletDetails/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js index 314425dcf39..867f130cfc2 100644 --- a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js +++ b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletInfo/index.js b/js/src/modals/CreateWallet/WalletInfo/index.js index 975e7bd59c0..cc921634fb2 100644 --- a/js/src/modals/CreateWallet/WalletInfo/index.js +++ b/js/src/modals/CreateWallet/WalletInfo/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js index cc5c9696489..4f5ef93d528 100644 --- a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js +++ b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletType/index.js b/js/src/modals/CreateWallet/WalletType/index.js index 525e3549503..f9321ab893b 100644 --- a/js/src/modals/CreateWallet/WalletType/index.js +++ b/js/src/modals/CreateWallet/WalletType/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/WalletType/walletType.js b/js/src/modals/CreateWallet/WalletType/walletType.js index 93dd818f170..4b03f9eb7d8 100644 --- a/js/src/modals/CreateWallet/WalletType/walletType.js +++ b/js/src/modals/CreateWallet/WalletType/walletType.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/createWallet.js b/js/src/modals/CreateWallet/createWallet.js index d99ef05b409..c19d3303cfe 100644 --- a/js/src/modals/CreateWallet/createWallet.js +++ b/js/src/modals/CreateWallet/createWallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js index b28bfbd26c2..2a3f08a6bb0 100644 --- a/js/src/modals/CreateWallet/createWalletStore.js +++ b/js/src/modals/CreateWallet/createWalletStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/CreateWallet/index.js b/js/src/modals/CreateWallet/index.js index 5779fb553fa..6421a806a99 100644 --- a/js/src/modals/CreateWallet/index.js +++ b/js/src/modals/CreateWallet/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeleteAccount/deleteAccount.js b/js/src/modals/DeleteAccount/deleteAccount.js index 77f52f14176..f5b988a8e5e 100644 --- a/js/src/modals/DeleteAccount/deleteAccount.js +++ b/js/src/modals/DeleteAccount/deleteAccount.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeleteAccount/index.js b/js/src/modals/DeleteAccount/index.js index 5738c270485..9140c1b37f6 100644 --- a/js/src/modals/DeleteAccount/index.js +++ b/js/src/modals/DeleteAccount/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/DetailsStep/detailsStep.js b/js/src/modals/DeployContract/DetailsStep/detailsStep.js index 51c5d3cfb2f..d2fa869a7a8 100644 --- a/js/src/modals/DeployContract/DetailsStep/detailsStep.js +++ b/js/src/modals/DeployContract/DetailsStep/detailsStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/DetailsStep/index.js b/js/src/modals/DeployContract/DetailsStep/index.js index 5519ee8ea74..d1993c9061f 100644 --- a/js/src/modals/DeployContract/DetailsStep/index.js +++ b/js/src/modals/DeployContract/DetailsStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ErrorStep/errorStep.js b/js/src/modals/DeployContract/ErrorStep/errorStep.js index 3d97ab598dc..468d5672adf 100644 --- a/js/src/modals/DeployContract/ErrorStep/errorStep.js +++ b/js/src/modals/DeployContract/ErrorStep/errorStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ErrorStep/index.js b/js/src/modals/DeployContract/ErrorStep/index.js index 93379cab9bc..5de8b27b1c7 100644 --- a/js/src/modals/DeployContract/ErrorStep/index.js +++ b/js/src/modals/DeployContract/ErrorStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ParametersStep/index.js b/js/src/modals/DeployContract/ParametersStep/index.js index 77545b40652..77989948ef0 100644 --- a/js/src/modals/DeployContract/ParametersStep/index.js +++ b/js/src/modals/DeployContract/ParametersStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/ParametersStep/parametersStep.js b/js/src/modals/DeployContract/ParametersStep/parametersStep.js index 4ab5df6936b..c4004cdf09b 100644 --- a/js/src/modals/DeployContract/ParametersStep/parametersStep.js +++ b/js/src/modals/DeployContract/ParametersStep/parametersStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/deployContract.js b/js/src/modals/DeployContract/deployContract.js index 21325f78692..aaf5d36aad4 100644 --- a/js/src/modals/DeployContract/deployContract.js +++ b/js/src/modals/DeployContract/deployContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/DeployContract/index.js b/js/src/modals/DeployContract/index.js index e982107ee31..26ca7dcf095 100644 --- a/js/src/modals/DeployContract/index.js +++ b/js/src/modals/DeployContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/EditMeta/editMeta.js b/js/src/modals/EditMeta/editMeta.js index 8ab9233f1e3..8a6d983651b 100644 --- a/js/src/modals/EditMeta/editMeta.js +++ b/js/src/modals/EditMeta/editMeta.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/EditMeta/index.js b/js/src/modals/EditMeta/index.js index 995b06b0ef9..98e3de8b5a4 100644 --- a/js/src/modals/EditMeta/index.js +++ b/js/src/modals/EditMeta/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js index fde7fa1b277..ae3c92e48fa 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js +++ b/js/src/modals/ExecuteContract/DetailsStep/detailsStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/DetailsStep/index.js b/js/src/modals/ExecuteContract/DetailsStep/index.js index 5519ee8ea74..d1993c9061f 100644 --- a/js/src/modals/ExecuteContract/DetailsStep/index.js +++ b/js/src/modals/ExecuteContract/DetailsStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/executeContract.js b/js/src/modals/ExecuteContract/executeContract.js index c3ac96490a4..90b161321a1 100644 --- a/js/src/modals/ExecuteContract/executeContract.js +++ b/js/src/modals/ExecuteContract/executeContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/ExecuteContract/index.js b/js/src/modals/ExecuteContract/index.js index 58ae3e8defc..58868d32c88 100644 --- a/js/src/modals/ExecuteContract/index.js +++ b/js/src/modals/ExecuteContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Completed/completed.js b/js/src/modals/FirstRun/Completed/completed.js index 43724f0341f..3e0ca10d56b 100644 --- a/js/src/modals/FirstRun/Completed/completed.js +++ b/js/src/modals/FirstRun/Completed/completed.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Completed/index.js b/js/src/modals/FirstRun/Completed/index.js index 3e79033d81c..229229cede8 100644 --- a/js/src/modals/FirstRun/Completed/index.js +++ b/js/src/modals/FirstRun/Completed/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/TnC/index.js b/js/src/modals/FirstRun/TnC/index.js index 251bfa6f9fd..a26ffecf9d6 100644 --- a/js/src/modals/FirstRun/TnC/index.js +++ b/js/src/modals/FirstRun/TnC/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/TnC/tnc.js b/js/src/modals/FirstRun/TnC/tnc.js index 648ae765a86..96892828b0b 100644 --- a/js/src/modals/FirstRun/TnC/tnc.js +++ b/js/src/modals/FirstRun/TnC/tnc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Welcome/index.js b/js/src/modals/FirstRun/Welcome/index.js index 241e26fc210..f5277ceb01f 100644 --- a/js/src/modals/FirstRun/Welcome/index.js +++ b/js/src/modals/FirstRun/Welcome/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/Welcome/welcome.js b/js/src/modals/FirstRun/Welcome/welcome.js index c3d9215c283..853ad99fe89 100644 --- a/js/src/modals/FirstRun/Welcome/welcome.js +++ b/js/src/modals/FirstRun/Welcome/welcome.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/firstRun.js b/js/src/modals/FirstRun/firstRun.js index ee1a97a6e03..a273d6e6311 100644 --- a/js/src/modals/FirstRun/firstRun.js +++ b/js/src/modals/FirstRun/firstRun.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/FirstRun/index.js b/js/src/modals/FirstRun/index.js index 4dea9ba514a..c732f39dad6 100644 --- a/js/src/modals/FirstRun/index.js +++ b/js/src/modals/FirstRun/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/LoadContract/index.js b/js/src/modals/LoadContract/index.js index be5e62af5ea..479eb2b520c 100644 --- a/js/src/modals/LoadContract/index.js +++ b/js/src/modals/LoadContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/LoadContract/loadContract.js b/js/src/modals/LoadContract/loadContract.js index a2d1bdba219..4b70e595d3b 100644 --- a/js/src/modals/LoadContract/loadContract.js +++ b/js/src/modals/LoadContract/loadContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/PasswordManager/index.js b/js/src/modals/PasswordManager/index.js index 9676de16319..8f5237ec2c4 100644 --- a/js/src/modals/PasswordManager/index.js +++ b/js/src/modals/PasswordManager/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/PasswordManager/passwordManager.js b/js/src/modals/PasswordManager/passwordManager.js index 96ff38c6001..8121e14d266 100644 --- a/js/src/modals/PasswordManager/passwordManager.js +++ b/js/src/modals/PasswordManager/passwordManager.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/Done/done.js b/js/src/modals/SMSVerification/Done/done.js index f3f6fa515e8..b9d277ec231 100644 --- a/js/src/modals/SMSVerification/Done/done.js +++ b/js/src/modals/SMSVerification/Done/done.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/Done/index.js b/js/src/modals/SMSVerification/Done/index.js index 549306dbd22..c1d69e26ec8 100644 --- a/js/src/modals/SMSVerification/Done/index.js +++ b/js/src/modals/SMSVerification/Done/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.js b/js/src/modals/SMSVerification/GatherData/gatherData.js index f5f09578ec8..289374846fa 100644 --- a/js/src/modals/SMSVerification/GatherData/gatherData.js +++ b/js/src/modals/SMSVerification/GatherData/gatherData.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/GatherData/index.js b/js/src/modals/SMSVerification/GatherData/index.js index 1c03d34001c..9687a672d72 100644 --- a/js/src/modals/SMSVerification/GatherData/index.js +++ b/js/src/modals/SMSVerification/GatherData/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/QueryCode/index.js b/js/src/modals/SMSVerification/QueryCode/index.js index 539c340f064..9645d3db1ef 100644 --- a/js/src/modals/SMSVerification/QueryCode/index.js +++ b/js/src/modals/SMSVerification/QueryCode/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/QueryCode/queryCode.js b/js/src/modals/SMSVerification/QueryCode/queryCode.js index 03b22836781..bd0cd9d6167 100644 --- a/js/src/modals/SMSVerification/QueryCode/queryCode.js +++ b/js/src/modals/SMSVerification/QueryCode/queryCode.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SMSVerification.js b/js/src/modals/SMSVerification/SMSVerification.js index 86f027a524a..f37c8033005 100644 --- a/js/src/modals/SMSVerification/SMSVerification.js +++ b/js/src/modals/SMSVerification/SMSVerification.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendConfirmation/index.js b/js/src/modals/SMSVerification/SendConfirmation/index.js index 498a8572e87..92aa40c61c4 100644 --- a/js/src/modals/SMSVerification/SendConfirmation/index.js +++ b/js/src/modals/SMSVerification/SendConfirmation/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js b/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js index a0cc136895e..72ffe582855 100644 --- a/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js +++ b/js/src/modals/SMSVerification/SendConfirmation/sendConfirmation.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendRequest/index.js b/js/src/modals/SMSVerification/SendRequest/index.js index 1a8bfaf7324..ab7d00d5927 100644 --- a/js/src/modals/SMSVerification/SendRequest/index.js +++ b/js/src/modals/SMSVerification/SendRequest/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/SendRequest/sendRequest.js b/js/src/modals/SMSVerification/SendRequest/sendRequest.js index 933de92651a..369c4bded93 100644 --- a/js/src/modals/SMSVerification/SendRequest/sendRequest.js +++ b/js/src/modals/SMSVerification/SendRequest/sendRequest.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/index.js b/js/src/modals/SMSVerification/index.js index d9b0990db84..e26958f8c3e 100644 --- a/js/src/modals/SMSVerification/index.js +++ b/js/src/modals/SMSVerification/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SMSVerification/store.js b/js/src/modals/SMSVerification/store.js index 7a132aaf7a3..f97e84adeb2 100644 --- a/js/src/modals/SMSVerification/store.js +++ b/js/src/modals/SMSVerification/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SaveContract/index.js b/js/src/modals/SaveContract/index.js index 07930016056..115d21bb31c 100644 --- a/js/src/modals/SaveContract/index.js +++ b/js/src/modals/SaveContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/SaveContract/saveContract.js b/js/src/modals/SaveContract/saveContract.js index 5d786363282..276a225770e 100644 --- a/js/src/modals/SaveContract/saveContract.js +++ b/js/src/modals/SaveContract/saveContract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js b/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js index 73d1de300c1..8dfd29f331b 100644 --- a/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js +++ b/js/src/modals/Shapeshift/AwaitingDepositStep/awaitingDepositStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingDepositStep/index.js b/js/src/modals/Shapeshift/AwaitingDepositStep/index.js index e888b6b815e..0c9eb1b7329 100644 --- a/js/src/modals/Shapeshift/AwaitingDepositStep/index.js +++ b/js/src/modals/Shapeshift/AwaitingDepositStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js b/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js index 17845526a8d..d3e0ce93c88 100644 --- a/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js +++ b/js/src/modals/Shapeshift/AwaitingExchangeStep/awaitingExchangeStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js b/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js index 215fea893ba..a6daefbc56b 100644 --- a/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js +++ b/js/src/modals/Shapeshift/AwaitingExchangeStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/CompletedStep/completedStep.js b/js/src/modals/Shapeshift/CompletedStep/completedStep.js index d20a2e7b883..2b5a6b162f2 100644 --- a/js/src/modals/Shapeshift/CompletedStep/completedStep.js +++ b/js/src/modals/Shapeshift/CompletedStep/completedStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/CompletedStep/index.js b/js/src/modals/Shapeshift/CompletedStep/index.js index 64e1d619939..ce90188a93c 100644 --- a/js/src/modals/Shapeshift/CompletedStep/index.js +++ b/js/src/modals/Shapeshift/CompletedStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/ErrorStep/errorStep.js b/js/src/modals/Shapeshift/ErrorStep/errorStep.js index 52be49bbcb3..0924943999b 100644 --- a/js/src/modals/Shapeshift/ErrorStep/errorStep.js +++ b/js/src/modals/Shapeshift/ErrorStep/errorStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/ErrorStep/index.js b/js/src/modals/Shapeshift/ErrorStep/index.js index 93379cab9bc..5de8b27b1c7 100644 --- a/js/src/modals/Shapeshift/ErrorStep/index.js +++ b/js/src/modals/Shapeshift/ErrorStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/OptionsStep/index.js b/js/src/modals/Shapeshift/OptionsStep/index.js index 18b819c67e3..694b55c6683 100644 --- a/js/src/modals/Shapeshift/OptionsStep/index.js +++ b/js/src/modals/Shapeshift/OptionsStep/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/OptionsStep/optionsStep.js b/js/src/modals/Shapeshift/OptionsStep/optionsStep.js index fc4dabfc0fe..4314d2b5ccc 100644 --- a/js/src/modals/Shapeshift/OptionsStep/optionsStep.js +++ b/js/src/modals/Shapeshift/OptionsStep/optionsStep.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Price/index.js b/js/src/modals/Shapeshift/Price/index.js index 920094acfe1..2869dbbc7f2 100644 --- a/js/src/modals/Shapeshift/Price/index.js +++ b/js/src/modals/Shapeshift/Price/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Price/price.js b/js/src/modals/Shapeshift/Price/price.js index 557d4fa68c5..206587448fb 100644 --- a/js/src/modals/Shapeshift/Price/price.js +++ b/js/src/modals/Shapeshift/Price/price.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Value/index.js b/js/src/modals/Shapeshift/Value/index.js index 588b4c42191..76a2eaacbab 100644 --- a/js/src/modals/Shapeshift/Value/index.js +++ b/js/src/modals/Shapeshift/Value/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/Value/value.js b/js/src/modals/Shapeshift/Value/value.js index e3c3050fb34..1d2f63daf3b 100644 --- a/js/src/modals/Shapeshift/Value/value.js +++ b/js/src/modals/Shapeshift/Value/value.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/index.js b/js/src/modals/Shapeshift/index.js index 5ebced4b841..6b251bde228 100644 --- a/js/src/modals/Shapeshift/index.js +++ b/js/src/modals/Shapeshift/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Shapeshift/shapeshift.js b/js/src/modals/Shapeshift/shapeshift.js index 9c5d696b052..fc76a896851 100644 --- a/js/src/modals/Shapeshift/shapeshift.js +++ b/js/src/modals/Shapeshift/shapeshift.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Details/details.js b/js/src/modals/Transfer/Details/details.js index 20ac06f858c..d8ddb0b2505 100644 --- a/js/src/modals/Transfer/Details/details.js +++ b/js/src/modals/Transfer/Details/details.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Details/index.js b/js/src/modals/Transfer/Details/index.js index d0bf396b693..175c9896691 100644 --- a/js/src/modals/Transfer/Details/index.js +++ b/js/src/modals/Transfer/Details/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Extras/extras.js b/js/src/modals/Transfer/Extras/extras.js index def5a22c6e3..e60fd122e11 100644 --- a/js/src/modals/Transfer/Extras/extras.js +++ b/js/src/modals/Transfer/Extras/extras.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/Extras/index.js b/js/src/modals/Transfer/Extras/index.js index 0b4d22a2ebc..751466c85a5 100644 --- a/js/src/modals/Transfer/Extras/index.js +++ b/js/src/modals/Transfer/Extras/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/errors.js b/js/src/modals/Transfer/errors.js index b06e91b5d6e..12570dac5ea 100644 --- a/js/src/modals/Transfer/errors.js +++ b/js/src/modals/Transfer/errors.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/index.js b/js/src/modals/Transfer/index.js index 24d36d79637..4a82b5b7d20 100644 --- a/js/src/modals/Transfer/index.js +++ b/js/src/modals/Transfer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js index e08d7203d74..a175c4ea15c 100644 --- a/js/src/modals/Transfer/store.js +++ b/js/src/modals/Transfer/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js index 57dc569f2fc..b43ae0de477 100644 --- a/js/src/modals/Transfer/transfer.js +++ b/js/src/modals/Transfer/transfer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/WalletSettings/index.js b/js/src/modals/WalletSettings/index.js index 9b15a5f3b84..9ef8eeafedb 100644 --- a/js/src/modals/WalletSettings/index.js +++ b/js/src/modals/WalletSettings/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/WalletSettings/walletSettings.js b/js/src/modals/WalletSettings/walletSettings.js index 1b2b2cc1a98..00b5d3d1272 100644 --- a/js/src/modals/WalletSettings/walletSettings.js +++ b/js/src/modals/WalletSettings/walletSettings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/WalletSettings/walletSettingsStore.js b/js/src/modals/WalletSettings/walletSettingsStore.js index f4d5d2275e3..6db4469c3d2 100644 --- a/js/src/modals/WalletSettings/walletSettingsStore.js +++ b/js/src/modals/WalletSettings/walletSettingsStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/modals/index.js b/js/src/modals/index.js index 0f0844e4022..d3574fdc72f 100644 --- a/js/src/modals/index.js +++ b/js/src/modals/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/parity.js b/js/src/parity.js index 4e6184c6a7e..f74bc2a0cb0 100644 --- a/js/src/parity.js +++ b/js/src/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/actions.js b/js/src/redux/actions.js index 76b363796b6..0be511bd370 100644 --- a/js/src/redux/actions.js +++ b/js/src/redux/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/index.js b/js/src/redux/index.js index a23f60659fa..d02a22ace1c 100644 --- a/js/src/redux/index.js +++ b/js/src/redux/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/middleware.js b/js/src/redux/middleware.js index 14bc9b0a619..91e76c45d7b 100644 --- a/js/src/redux/middleware.js +++ b/js/src/redux/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/apiActions.js b/js/src/redux/providers/apiActions.js index 88e1fa84819..9b6e569042b 100644 --- a/js/src/redux/providers/apiActions.js +++ b/js/src/redux/providers/apiActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/apiReducer.js b/js/src/redux/providers/apiReducer.js index 2d4c96ecdbb..294072f58b0 100644 --- a/js/src/redux/providers/apiReducer.js +++ b/js/src/redux/providers/apiReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/balances.js b/js/src/redux/providers/balances.js index bce1c60771e..2f08c775201 100644 --- a/js/src/redux/providers/balances.js +++ b/js/src/redux/providers/balances.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/balancesActions.js b/js/src/redux/providers/balancesActions.js index f8cfb2c1e3d..36e3fbb7c35 100644 --- a/js/src/redux/providers/balancesActions.js +++ b/js/src/redux/providers/balancesActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/balancesReducer.js b/js/src/redux/providers/balancesReducer.js index 4b6950498ba..52b9bcf1d78 100644 --- a/js/src/redux/providers/balancesReducer.js +++ b/js/src/redux/providers/balancesReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/blockchainActions.js b/js/src/redux/providers/blockchainActions.js index 1dc1e076dac..3b36a019fc9 100644 --- a/js/src/redux/providers/blockchainActions.js +++ b/js/src/redux/providers/blockchainActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/blockchainReducer.js b/js/src/redux/providers/blockchainReducer.js index 30c7507f10a..dbcc00b9935 100644 --- a/js/src/redux/providers/blockchainReducer.js +++ b/js/src/redux/providers/blockchainReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/certifications/actions.js b/js/src/redux/providers/certifications/actions.js index c84f7db5539..03bb93fe93b 100644 --- a/js/src/redux/providers/certifications/actions.js +++ b/js/src/redux/providers/certifications/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/certifications/middleware.js b/js/src/redux/providers/certifications/middleware.js index a5406051fb8..500fe39b39b 100644 --- a/js/src/redux/providers/certifications/middleware.js +++ b/js/src/redux/providers/certifications/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/certifications/reducer.js b/js/src/redux/providers/certifications/reducer.js index 87b0dfd3311..f9195b1dfac 100644 --- a/js/src/redux/providers/certifications/reducer.js +++ b/js/src/redux/providers/certifications/reducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/compilerActions.js b/js/src/redux/providers/compilerActions.js index 2b764c58d3e..c3b3a9bdd9a 100644 --- a/js/src/redux/providers/compilerActions.js +++ b/js/src/redux/providers/compilerActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/compilerReducer.js b/js/src/redux/providers/compilerReducer.js index ea34f531993..7163ac7a5f2 100644 --- a/js/src/redux/providers/compilerReducer.js +++ b/js/src/redux/providers/compilerReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/compilerWorker.js b/js/src/redux/providers/compilerWorker.js index f624a4e5fe0..60a07355fff 100644 --- a/js/src/redux/providers/compilerWorker.js +++ b/js/src/redux/providers/compilerWorker.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/imagesActions.js b/js/src/redux/providers/imagesActions.js index 8ef3c3b39f3..73e7c690830 100644 --- a/js/src/redux/providers/imagesActions.js +++ b/js/src/redux/providers/imagesActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/imagesReducer.js b/js/src/redux/providers/imagesReducer.js index 8738f7b0eec..c3f04af44c5 100644 --- a/js/src/redux/providers/imagesReducer.js +++ b/js/src/redux/providers/imagesReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/index.js b/js/src/redux/providers/index.js index a90d8b62cfb..6a000bdac51 100644 --- a/js/src/redux/providers/index.js +++ b/js/src/redux/providers/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/personal.js b/js/src/redux/providers/personal.js index 7629c4f4695..5a19b1c7fd5 100644 --- a/js/src/redux/providers/personal.js +++ b/js/src/redux/providers/personal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/personalActions.js b/js/src/redux/providers/personalActions.js index 47056af2f6d..b172aaf8df3 100644 --- a/js/src/redux/providers/personalActions.js +++ b/js/src/redux/providers/personalActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/personalReducer.js b/js/src/redux/providers/personalReducer.js index 7473ed8e334..19ee421f08d 100644 --- a/js/src/redux/providers/personalReducer.js +++ b/js/src/redux/providers/personalReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signer.js b/js/src/redux/providers/signer.js index 11b30c6b427..5a5edfb0b7d 100644 --- a/js/src/redux/providers/signer.js +++ b/js/src/redux/providers/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signerActions.js b/js/src/redux/providers/signerActions.js index bd3c1022d41..5684e8a937a 100644 --- a/js/src/redux/providers/signerActions.js +++ b/js/src/redux/providers/signerActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signerMiddleware.js b/js/src/redux/providers/signerMiddleware.js index 1a6cbb12924..2e99bbc280b 100644 --- a/js/src/redux/providers/signerMiddleware.js +++ b/js/src/redux/providers/signerMiddleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/signerReducer.js b/js/src/redux/providers/signerReducer.js index 42e7b5f46f5..cc10b3fd165 100644 --- a/js/src/redux/providers/signerReducer.js +++ b/js/src/redux/providers/signerReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/snackbarActions.js b/js/src/redux/providers/snackbarActions.js index 428958c4cac..0048854da3d 100644 --- a/js/src/redux/providers/snackbarActions.js +++ b/js/src/redux/providers/snackbarActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/snackbarReducer.js b/js/src/redux/providers/snackbarReducer.js index 7a913f8ca84..2992eb0dfc0 100644 --- a/js/src/redux/providers/snackbarReducer.js +++ b/js/src/redux/providers/snackbarReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/status.js b/js/src/redux/providers/status.js index 13847971694..d7b360b1492 100644 --- a/js/src/redux/providers/status.js +++ b/js/src/redux/providers/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/statusActions.js b/js/src/redux/providers/statusActions.js index 1c175c29dc4..ede16f7dd56 100644 --- a/js/src/redux/providers/statusActions.js +++ b/js/src/redux/providers/statusActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/statusReducer.js b/js/src/redux/providers/statusReducer.js index 279a9da4282..413ff3319cb 100644 --- a/js/src/redux/providers/statusReducer.js +++ b/js/src/redux/providers/statusReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/walletActions.js b/js/src/redux/providers/walletActions.js index 4a8a3f82aa6..6bae2b3b50b 100644 --- a/js/src/redux/providers/walletActions.js +++ b/js/src/redux/providers/walletActions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/providers/walletReducer.js b/js/src/redux/providers/walletReducer.js index af6e190bc5b..7cbd7adb810 100644 --- a/js/src/redux/providers/walletReducer.js +++ b/js/src/redux/providers/walletReducer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/reducers.js b/js/src/redux/reducers.js index 642dfe403db..aac1ea779a7 100644 --- a/js/src/redux/reducers.js +++ b/js/src/redux/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/store.js b/js/src/redux/store.js index 1d62f9ea5a5..dc043e242a2 100644 --- a/js/src/redux/store.js +++ b/js/src/redux/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/redux/util.js b/js/src/redux/util.js index 37cb4f0a389..0467ca5f1ee 100644 --- a/js/src/redux/util.js +++ b/js/src/redux/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/secureApi.js b/js/src/secureApi.js index 8243420b5f8..80e76720b32 100644 --- a/js/src/secureApi.js +++ b/js/src/secureApi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Export/export.js b/js/src/ui/Actionbar/Export/export.js index a8cf826ae11..d3cb4bd17a7 100644 --- a/js/src/ui/Actionbar/Export/export.js +++ b/js/src/ui/Actionbar/Export/export.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Export/index.js b/js/src/ui/Actionbar/Export/index.js index f4ac7092ede..89cc3d0669d 100644 --- a/js/src/ui/Actionbar/Export/index.js +++ b/js/src/ui/Actionbar/Export/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Import/import.js b/js/src/ui/Actionbar/Import/import.js index 091153c958d..fcf51a53ea3 100644 --- a/js/src/ui/Actionbar/Import/import.js +++ b/js/src/ui/Actionbar/Import/import.js @@ -1,4 +1,4 @@ - // Copyright 2015, 2016 Ethcore (UK) Ltd. + // Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Import/index.js b/js/src/ui/Actionbar/Import/index.js index d2f352cf3db..f6a1b16e198 100644 --- a/js/src/ui/Actionbar/Import/index.js +++ b/js/src/ui/Actionbar/Import/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Search/index.js b/js/src/ui/Actionbar/Search/index.js index f51d38a6fa9..f06425e4f43 100644 --- a/js/src/ui/Actionbar/Search/index.js +++ b/js/src/ui/Actionbar/Search/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Search/search.js b/js/src/ui/Actionbar/Search/search.js index 9385cb593a0..30d8117bd98 100644 --- a/js/src/ui/Actionbar/Search/search.js +++ b/js/src/ui/Actionbar/Search/search.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Sort/index.js b/js/src/ui/Actionbar/Sort/index.js index 82855931c74..a4a02e01d99 100644 --- a/js/src/ui/Actionbar/Sort/index.js +++ b/js/src/ui/Actionbar/Sort/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Sort/sort.js b/js/src/ui/Actionbar/Sort/sort.js index 545775eadb9..eb0c672fb18 100644 --- a/js/src/ui/Actionbar/Sort/sort.js +++ b/js/src/ui/Actionbar/Sort/sort.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/Sort/sortStore.js b/js/src/ui/Actionbar/Sort/sortStore.js index 2bcbd3753c1..84084c4b720 100644 --- a/js/src/ui/Actionbar/Sort/sortStore.js +++ b/js/src/ui/Actionbar/Sort/sortStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/actionbar.js b/js/src/ui/Actionbar/actionbar.js index f744f5c5737..0141016aba4 100644 --- a/js/src/ui/Actionbar/actionbar.js +++ b/js/src/ui/Actionbar/actionbar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/actionbar.spec.js b/js/src/ui/Actionbar/actionbar.spec.js index 818eb0f80a7..72df85cb2b5 100644 --- a/js/src/ui/Actionbar/actionbar.spec.js +++ b/js/src/ui/Actionbar/actionbar.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Actionbar/index.js b/js/src/ui/Actionbar/index.js index 5955440799d..37d1dbd0b6e 100644 --- a/js/src/ui/Actionbar/index.js +++ b/js/src/ui/Actionbar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Badge/badge.js b/js/src/ui/Badge/badge.js index 1ffd4d83ca0..c4553fb2ecc 100644 --- a/js/src/ui/Badge/badge.js +++ b/js/src/ui/Badge/badge.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Badge/badge.spec.js b/js/src/ui/Badge/badge.spec.js index 8074a8688ec..02f3c6983b7 100644 --- a/js/src/ui/Badge/badge.spec.js +++ b/js/src/ui/Badge/badge.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Badge/index.js b/js/src/ui/Badge/index.js index 8dc0c9ef0fb..7fb3df2139a 100644 --- a/js/src/ui/Badge/index.js +++ b/js/src/ui/Badge/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Balance/balance.js b/js/src/ui/Balance/balance.js index bc98968ea1d..e4dced8821e 100644 --- a/js/src/ui/Balance/balance.js +++ b/js/src/ui/Balance/balance.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Balance/index.js b/js/src/ui/Balance/index.js index 24ed7c44e1a..e5064e21dea 100644 --- a/js/src/ui/Balance/index.js +++ b/js/src/ui/Balance/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/BlockStatus/blockStatus.js b/js/src/ui/BlockStatus/blockStatus.js index 8abd5d656a7..df6f44a8c6e 100644 --- a/js/src/ui/BlockStatus/blockStatus.js +++ b/js/src/ui/BlockStatus/blockStatus.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/BlockStatus/index.js b/js/src/ui/BlockStatus/index.js index af5761fad3e..f9cb92f957c 100644 --- a/js/src/ui/BlockStatus/index.js +++ b/js/src/ui/BlockStatus/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Button/button.js b/js/src/ui/Button/button.js index 6ae113fd475..d0a358bad6b 100644 --- a/js/src/ui/Button/button.js +++ b/js/src/ui/Button/button.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Button/button.spec.js b/js/src/ui/Button/button.spec.js index 9ae4ecdfc27..101bb19acb6 100644 --- a/js/src/ui/Button/button.spec.js +++ b/js/src/ui/Button/button.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Button/index.js b/js/src/ui/Button/index.js index f69a65e3d53..95f33d38c48 100644 --- a/js/src/ui/Button/index.js +++ b/js/src/ui/Button/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Certifications/certifications.js b/js/src/ui/Certifications/certifications.js index 871b14e9c74..edf8be10a45 100644 --- a/js/src/ui/Certifications/certifications.js +++ b/js/src/ui/Certifications/certifications.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Certifications/index.js b/js/src/ui/Certifications/index.js index 02719ee3174..8335104c0d2 100644 --- a/js/src/ui/Certifications/index.js +++ b/js/src/ui/Certifications/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ConfirmDialog/confirmDialog.js b/js/src/ui/ConfirmDialog/confirmDialog.js index f1b8c6902ce..103c1562d94 100644 --- a/js/src/ui/ConfirmDialog/confirmDialog.js +++ b/js/src/ui/ConfirmDialog/confirmDialog.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ConfirmDialog/index.js b/js/src/ui/ConfirmDialog/index.js index ea4074149d2..d88a0ac60ad 100644 --- a/js/src/ui/ConfirmDialog/index.js +++ b/js/src/ui/ConfirmDialog/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/Title/index.js b/js/src/ui/Container/Title/index.js index 8ddd6868351..35486c1cb22 100644 --- a/js/src/ui/Container/Title/index.js +++ b/js/src/ui/Container/Title/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/Title/title.js b/js/src/ui/Container/Title/title.js index 1506ecaf60d..de25b818cdb 100644 --- a/js/src/ui/Container/Title/title.js +++ b/js/src/ui/Container/Title/title.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/Title/title.spec.js b/js/src/ui/Container/Title/title.spec.js index a65e221a66e..2d5335c145c 100644 --- a/js/src/ui/Container/Title/title.spec.js +++ b/js/src/ui/Container/Title/title.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/container.js b/js/src/ui/Container/container.js index 8d30a396373..51a6a5daa24 100644 --- a/js/src/ui/Container/container.js +++ b/js/src/ui/Container/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/container.spec.js b/js/src/ui/Container/container.spec.js index 9bbc9d20f6f..5e627999f31 100644 --- a/js/src/ui/Container/container.spec.js +++ b/js/src/ui/Container/container.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Container/index.js b/js/src/ui/Container/index.js index 12d4155aa28..06324411435 100644 --- a/js/src/ui/Container/index.js +++ b/js/src/ui/Container/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ContextProvider/contextProvider.js b/js/src/ui/ContextProvider/contextProvider.js index 7af6d342e87..c1efbeb9613 100644 --- a/js/src/ui/ContextProvider/contextProvider.js +++ b/js/src/ui/ContextProvider/contextProvider.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/CopyToClipboard/copyToClipboard.js b/js/src/ui/CopyToClipboard/copyToClipboard.js index b7041658c18..2afd59dde5e 100644 --- a/js/src/ui/CopyToClipboard/copyToClipboard.js +++ b/js/src/ui/CopyToClipboard/copyToClipboard.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/CopyToClipboard/index.js b/js/src/ui/CopyToClipboard/index.js index 6391b478b6c..523098ec0cc 100644 --- a/js/src/ui/CopyToClipboard/index.js +++ b/js/src/ui/CopyToClipboard/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Editor/editor.js b/js/src/ui/Editor/editor.js index d611276a313..55747a3dbef 100644 --- a/js/src/ui/Editor/editor.js +++ b/js/src/ui/Editor/editor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Editor/index.js b/js/src/ui/Editor/index.js index 2f49dbc9502..00b62a7a058 100644 --- a/js/src/ui/Editor/index.js +++ b/js/src/ui/Editor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Editor/mode-solidity.js b/js/src/ui/Editor/mode-solidity.js index f974c9e0f52..2ad4e9a76cc 100644 --- a/js/src/ui/Editor/mode-solidity.js +++ b/js/src/ui/Editor/mode-solidity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/actions.js b/js/src/ui/Errors/actions.js index de401ccaa66..c482c9ce475 100644 --- a/js/src/ui/Errors/actions.js +++ b/js/src/ui/Errors/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/errors.js b/js/src/ui/Errors/errors.js index 1e94f4f1d00..b49dd0f4d9f 100644 --- a/js/src/ui/Errors/errors.js +++ b/js/src/ui/Errors/errors.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/index.js b/js/src/ui/Errors/index.js index 608f22a1df1..1d63ca6244f 100644 --- a/js/src/ui/Errors/index.js +++ b/js/src/ui/Errors/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/middleware.js b/js/src/ui/Errors/middleware.js index da660b49ea0..1afe55c9126 100644 --- a/js/src/ui/Errors/middleware.js +++ b/js/src/ui/Errors/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Errors/reducers.js b/js/src/ui/Errors/reducers.js index ed4fcba34f3..e076905fc77 100644 --- a/js/src/ui/Errors/reducers.js +++ b/js/src/ui/Errors/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index 0cd92c5c8be..3fb15cd863b 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AddressSelect/index.js b/js/src/ui/Form/AddressSelect/index.js index 58059cd2e1e..3caaa526d76 100644 --- a/js/src/ui/Form/AddressSelect/index.js +++ b/js/src/ui/Form/AddressSelect/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AutoComplete/autocomplete.js b/js/src/ui/Form/AutoComplete/autocomplete.js index d11ae7cc529..c98019009f6 100644 --- a/js/src/ui/Form/AutoComplete/autocomplete.js +++ b/js/src/ui/Form/AutoComplete/autocomplete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/AutoComplete/index.js b/js/src/ui/Form/AutoComplete/index.js index 509a99444f3..3e3e0afb2e0 100644 --- a/js/src/ui/Form/AutoComplete/index.js +++ b/js/src/ui/Form/AutoComplete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/FormWrap/formWrap.js b/js/src/ui/Form/FormWrap/formWrap.js index ba3f0a9573a..9982a8ed7a0 100644 --- a/js/src/ui/Form/FormWrap/formWrap.js +++ b/js/src/ui/Form/FormWrap/formWrap.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/FormWrap/index.js b/js/src/ui/Form/FormWrap/index.js index 97c1b0181d9..a73e22f3d0e 100644 --- a/js/src/ui/Form/FormWrap/index.js +++ b/js/src/ui/Form/FormWrap/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Input/index.js b/js/src/ui/Form/Input/index.js index 3d9d9293e5a..4a4d166742e 100644 --- a/js/src/ui/Form/Input/index.js +++ b/js/src/ui/Form/Input/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Input/input.js b/js/src/ui/Form/Input/input.js index f25ce207cdd..b11400d049d 100644 --- a/js/src/ui/Form/Input/input.js +++ b/js/src/ui/Form/Input/input.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddress/index.js b/js/src/ui/Form/InputAddress/index.js index b0bb94c9480..64d6cd72248 100644 --- a/js/src/ui/Form/InputAddress/index.js +++ b/js/src/ui/Form/InputAddress/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddress/inputAddress.js b/js/src/ui/Form/InputAddress/inputAddress.js index f403cf3114b..1f062382ae3 100644 --- a/js/src/ui/Form/InputAddress/inputAddress.js +++ b/js/src/ui/Form/InputAddress/inputAddress.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddressSelect/index.js b/js/src/ui/Form/InputAddressSelect/index.js index 19493b1cea2..4eda78ce57a 100644 --- a/js/src/ui/Form/InputAddressSelect/index.js +++ b/js/src/ui/Form/InputAddressSelect/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js b/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js index b7bfbf37588..59fb814587a 100644 --- a/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js +++ b/js/src/ui/Form/InputAddressSelect/inputAddressSelect.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputChip/index.js b/js/src/ui/Form/InputChip/index.js index 74bf603fe2d..fe917703986 100644 --- a/js/src/ui/Form/InputChip/index.js +++ b/js/src/ui/Form/InputChip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputChip/inputChip.js b/js/src/ui/Form/InputChip/inputChip.js index 1b06c01d7e0..09a00778acc 100644 --- a/js/src/ui/Form/InputChip/inputChip.js +++ b/js/src/ui/Form/InputChip/inputChip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputInline/index.js b/js/src/ui/Form/InputInline/index.js index e2a1886bebf..44e2c7563cd 100644 --- a/js/src/ui/Form/InputInline/index.js +++ b/js/src/ui/Form/InputInline/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/InputInline/inputInline.js b/js/src/ui/Form/InputInline/inputInline.js index 92a54e2a389..02b93a90fdc 100644 --- a/js/src/ui/Form/InputInline/inputInline.js +++ b/js/src/ui/Form/InputInline/inputInline.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/RadioButtons/index.js b/js/src/ui/Form/RadioButtons/index.js index c708eb7285d..44097481bea 100644 --- a/js/src/ui/Form/RadioButtons/index.js +++ b/js/src/ui/Form/RadioButtons/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/RadioButtons/radioButtons.js b/js/src/ui/Form/RadioButtons/radioButtons.js index b417857e0c0..d9489c6aa79 100644 --- a/js/src/ui/Form/RadioButtons/radioButtons.js +++ b/js/src/ui/Form/RadioButtons/radioButtons.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Select/index.js b/js/src/ui/Form/Select/index.js index 471dad14af3..fb1c1e4c0c1 100644 --- a/js/src/ui/Form/Select/index.js +++ b/js/src/ui/Form/Select/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/Select/select.js b/js/src/ui/Form/Select/select.js index cb879e3f7d3..adc4a9bd5bd 100644 --- a/js/src/ui/Form/Select/select.js +++ b/js/src/ui/Form/Select/select.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/TypedInput/index.js b/js/src/ui/Form/TypedInput/index.js index 9c12bf7ebae..8b73aa1b651 100644 --- a/js/src/ui/Form/TypedInput/index.js +++ b/js/src/ui/Form/TypedInput/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/TypedInput/typedInput.js b/js/src/ui/Form/TypedInput/typedInput.js index a540329994d..6383e62bc97 100644 --- a/js/src/ui/Form/TypedInput/typedInput.js +++ b/js/src/ui/Form/TypedInput/typedInput.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/form.js b/js/src/ui/Form/form.js index c3cf2588ba2..3d3c7438a45 100644 --- a/js/src/ui/Form/form.js +++ b/js/src/ui/Form/form.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Form/index.js b/js/src/ui/Form/index.js index 113f3424a25..0f5e8d05689 100644 --- a/js/src/ui/Form/index.js +++ b/js/src/ui/Form/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js b/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js index 893a5018837..375d4962d67 100644 --- a/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js +++ b/js/src/ui/GasPriceEditor/GasPriceSelector/gasPriceSelector.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/GasPriceSelector/index.js b/js/src/ui/GasPriceEditor/GasPriceSelector/index.js index 95807586717..ab777344728 100644 --- a/js/src/ui/GasPriceEditor/GasPriceSelector/index.js +++ b/js/src/ui/GasPriceEditor/GasPriceSelector/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/gasPriceEditor.js b/js/src/ui/GasPriceEditor/gasPriceEditor.js index 8c94dfca720..323f189e478 100644 --- a/js/src/ui/GasPriceEditor/gasPriceEditor.js +++ b/js/src/ui/GasPriceEditor/gasPriceEditor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/index.js b/js/src/ui/GasPriceEditor/index.js index 956f6ffd215..eea046b5194 100644 --- a/js/src/ui/GasPriceEditor/index.js +++ b/js/src/ui/GasPriceEditor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/GasPriceEditor/store.js b/js/src/ui/GasPriceEditor/store.js index afa5e15b2cf..9c403acb271 100644 --- a/js/src/ui/GasPriceEditor/store.js +++ b/js/src/ui/GasPriceEditor/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityIcon/identityIcon.js b/js/src/ui/IdentityIcon/identityIcon.js index fa8d35e6123..466ffa9b564 100644 --- a/js/src/ui/IdentityIcon/identityIcon.js +++ b/js/src/ui/IdentityIcon/identityIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityIcon/index.js b/js/src/ui/IdentityIcon/index.js index 76c107bfb75..90e9c1909bf 100644 --- a/js/src/ui/IdentityIcon/index.js +++ b/js/src/ui/IdentityIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityName/identityName.js b/js/src/ui/IdentityName/identityName.js index 9da886ba0e1..0ad9075d61d 100644 --- a/js/src/ui/IdentityName/identityName.js +++ b/js/src/ui/IdentityName/identityName.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityName/identityName.spec.js b/js/src/ui/IdentityName/identityName.spec.js index 554a5be0a1d..31bf3ee5f4d 100644 --- a/js/src/ui/IdentityName/identityName.spec.js +++ b/js/src/ui/IdentityName/identityName.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/IdentityName/index.js b/js/src/ui/IdentityName/index.js index 3774b0e5278..15e1e5463ed 100644 --- a/js/src/ui/IdentityName/index.js +++ b/js/src/ui/IdentityName/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Loading/index.js b/js/src/ui/Loading/index.js index 0468cab37df..55611075bb3 100644 --- a/js/src/ui/Loading/index.js +++ b/js/src/ui/Loading/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Loading/loading.js b/js/src/ui/Loading/loading.js index bdcc98df679..507c84bf9eb 100644 --- a/js/src/ui/Loading/loading.js +++ b/js/src/ui/Loading/loading.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/MethodDecoding/index.js b/js/src/ui/MethodDecoding/index.js index 1606857edab..d4f99314c0f 100644 --- a/js/src/ui/MethodDecoding/index.js +++ b/js/src/ui/MethodDecoding/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/MethodDecoding/methodDecoding.js b/js/src/ui/MethodDecoding/methodDecoding.js index efb22b67b57..e02355ffb5b 100644 --- a/js/src/ui/MethodDecoding/methodDecoding.js +++ b/js/src/ui/MethodDecoding/methodDecoding.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Busy/busy.js b/js/src/ui/Modal/Busy/busy.js index 6898d3e1fad..5bbf8b010fe 100644 --- a/js/src/ui/Modal/Busy/busy.js +++ b/js/src/ui/Modal/Busy/busy.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Busy/index.js b/js/src/ui/Modal/Busy/index.js index 27c097eeae7..40a618b3bb3 100644 --- a/js/src/ui/Modal/Busy/index.js +++ b/js/src/ui/Modal/Busy/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Completed/completed.js b/js/src/ui/Modal/Completed/completed.js index de619562136..09352d43511 100644 --- a/js/src/ui/Modal/Completed/completed.js +++ b/js/src/ui/Modal/Completed/completed.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Completed/index.js b/js/src/ui/Modal/Completed/index.js index 3e79033d81c..229229cede8 100644 --- a/js/src/ui/Modal/Completed/index.js +++ b/js/src/ui/Modal/Completed/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Title/index.js b/js/src/ui/Modal/Title/index.js index 8ddd6868351..35486c1cb22 100644 --- a/js/src/ui/Modal/Title/index.js +++ b/js/src/ui/Modal/Title/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/Title/title.js b/js/src/ui/Modal/Title/title.js index b483af061e2..14308ee0b4a 100644 --- a/js/src/ui/Modal/Title/title.js +++ b/js/src/ui/Modal/Title/title.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/index.js b/js/src/ui/Modal/index.js index 232d94eb224..55e5cfc056f 100644 --- a/js/src/ui/Modal/index.js +++ b/js/src/ui/Modal/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Modal/modal.js b/js/src/ui/Modal/modal.js index 5226841402b..fd8e67aadac 100644 --- a/js/src/ui/Modal/modal.js +++ b/js/src/ui/Modal/modal.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Page/index.js b/js/src/ui/Page/index.js index 0ddc533d400..49b37e02ed1 100644 --- a/js/src/ui/Page/index.js +++ b/js/src/ui/Page/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Page/page.js b/js/src/ui/Page/page.js index 9646358b384..e8bb6fe03a0 100644 --- a/js/src/ui/Page/page.js +++ b/js/src/ui/Page/page.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ParityBackground/index.js b/js/src/ui/ParityBackground/index.js index 4c766ac3c1f..f497053deea 100644 --- a/js/src/ui/ParityBackground/index.js +++ b/js/src/ui/ParityBackground/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ParityBackground/parityBackground.js b/js/src/ui/ParityBackground/parityBackground.js index 5198195c072..4bbfd477245 100644 --- a/js/src/ui/ParityBackground/parityBackground.js +++ b/js/src/ui/ParityBackground/parityBackground.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ShortenedHash/index.js b/js/src/ui/ShortenedHash/index.js index 4c93143866a..495d1928c69 100644 --- a/js/src/ui/ShortenedHash/index.js +++ b/js/src/ui/ShortenedHash/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/ShortenedHash/shortenedHash.js b/js/src/ui/ShortenedHash/shortenedHash.js index e3d5c3b1439..7008304f8ce 100644 --- a/js/src/ui/ShortenedHash/shortenedHash.js +++ b/js/src/ui/ShortenedHash/shortenedHash.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/SignerIcon/index.js b/js/src/ui/SignerIcon/index.js index 0a871e6b288..e1123e0d7ac 100644 --- a/js/src/ui/SignerIcon/index.js +++ b/js/src/ui/SignerIcon/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/SignerIcon/signerIcon.js b/js/src/ui/SignerIcon/signerIcon.js index 6d7cd45e8ac..ca1ca43fa22 100644 --- a/js/src/ui/SignerIcon/signerIcon.js +++ b/js/src/ui/SignerIcon/signerIcon.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tags/index.js b/js/src/ui/Tags/index.js index 71cd4962429..bbcb28bab3a 100644 --- a/js/src/ui/Tags/index.js +++ b/js/src/ui/Tags/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tags/tags.js b/js/src/ui/Tags/tags.js index b5205064906..a0db6fc6a9f 100644 --- a/js/src/ui/Tags/tags.js +++ b/js/src/ui/Tags/tags.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Theme/index.js b/js/src/ui/Theme/index.js index ba15b212bff..cbf312df549 100644 --- a/js/src/ui/Theme/index.js +++ b/js/src/ui/Theme/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Theme/theme.js b/js/src/ui/Theme/theme.js index 7b891d72129..323413d31bd 100644 --- a/js/src/ui/Theme/theme.js +++ b/js/src/ui/Theme/theme.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Theme/theme.spec.js b/js/src/ui/Theme/theme.spec.js index 9d2aa1bd8a3..6e0387ae3ba 100644 --- a/js/src/ui/Theme/theme.spec.js +++ b/js/src/ui/Theme/theme.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/Tooltip/index.js b/js/src/ui/Tooltips/Tooltip/index.js index f24757da211..e0a7d3000cc 100644 --- a/js/src/ui/Tooltips/Tooltip/index.js +++ b/js/src/ui/Tooltips/Tooltip/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/Tooltip/tooltip.js b/js/src/ui/Tooltips/Tooltip/tooltip.js index a36d124f3c7..b7431050a19 100644 --- a/js/src/ui/Tooltips/Tooltip/tooltip.js +++ b/js/src/ui/Tooltips/Tooltip/tooltip.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/actions.js b/js/src/ui/Tooltips/actions.js index fba250fd7fd..8f97ae3f8c8 100644 --- a/js/src/ui/Tooltips/actions.js +++ b/js/src/ui/Tooltips/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/index.js b/js/src/ui/Tooltips/index.js index 6edea3a3211..e6590884df7 100644 --- a/js/src/ui/Tooltips/index.js +++ b/js/src/ui/Tooltips/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/reducers.js b/js/src/ui/Tooltips/reducers.js index 4a1d2619b5e..cc0ebf926fa 100644 --- a/js/src/ui/Tooltips/reducers.js +++ b/js/src/ui/Tooltips/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/Tooltips/tooltips.js b/js/src/ui/Tooltips/tooltips.js index 9a565c26dd9..1fdc154868a 100644 --- a/js/src/ui/Tooltips/tooltips.js +++ b/js/src/ui/Tooltips/tooltips.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxHash/index.js b/js/src/ui/TxHash/index.js index eddcbfcbf9b..b52429f1f3b 100644 --- a/js/src/ui/TxHash/index.js +++ b/js/src/ui/TxHash/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxHash/txHash.js b/js/src/ui/TxHash/txHash.js index 715568fd9a5..fcbe374e1b9 100644 --- a/js/src/ui/TxHash/txHash.js +++ b/js/src/ui/TxHash/txHash.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/TxRow/index.js b/js/src/ui/TxList/TxRow/index.js index 90243cd5f90..f3c75ac7e9e 100644 --- a/js/src/ui/TxList/TxRow/index.js +++ b/js/src/ui/TxList/TxRow/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/TxRow/txRow.js b/js/src/ui/TxList/TxRow/txRow.js index 98e948a388c..35a386df060 100644 --- a/js/src/ui/TxList/TxRow/txRow.js +++ b/js/src/ui/TxList/TxRow/txRow.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/TxRow/txRow.spec.js b/js/src/ui/TxList/TxRow/txRow.spec.js index 64baa2fe7e2..ddee9024caf 100644 --- a/js/src/ui/TxList/TxRow/txRow.spec.js +++ b/js/src/ui/TxList/TxRow/txRow.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/index.js b/js/src/ui/TxList/index.js index 820d4b3aae4..a0ded6a4305 100644 --- a/js/src/ui/TxList/index.js +++ b/js/src/ui/TxList/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/store.js b/js/src/ui/TxList/store.js index 09cdd222633..a12c810d5a7 100644 --- a/js/src/ui/TxList/store.js +++ b/js/src/ui/TxList/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/store.spec.js b/js/src/ui/TxList/store.spec.js index 8e4eb848e7f..89503b4a61e 100644 --- a/js/src/ui/TxList/store.spec.js +++ b/js/src/ui/TxList/store.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/txList.js b/js/src/ui/TxList/txList.js index 45face696c9..b99335a4fe6 100644 --- a/js/src/ui/TxList/txList.js +++ b/js/src/ui/TxList/txList.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/TxList/txList.spec.js b/js/src/ui/TxList/txList.spec.js index 3f773980fe5..88012888ccb 100644 --- a/js/src/ui/TxList/txList.spec.js +++ b/js/src/ui/TxList/txList.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/ui/index.js b/js/src/ui/index.js index c5a965458e0..785f3385081 100644 --- a/js/src/ui/index.js +++ b/js/src/ui/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/abi.js b/js/src/util/abi.js index e7947233bf1..b20ed337212 100644 --- a/js/src/util/abi.js +++ b/js/src/util/abi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/constants.js b/js/src/util/constants.js index d0664d25e31..4e2a073f18e 100644 --- a/js/src/util/constants.js +++ b/js/src/util/constants.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/notifications.js b/js/src/util/notifications.js index 47944823433..488ac2dafb0 100644 --- a/js/src/util/notifications.js +++ b/js/src/util/notifications.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/proptypes.js b/js/src/util/proptypes.js index f322c629c2f..1f993768ec5 100644 --- a/js/src/util/proptypes.js +++ b/js/src/util/proptypes.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/subscribe-to-event.js b/js/src/util/subscribe-to-event.js index 3313404c593..36d1f6d5557 100644 --- a/js/src/util/subscribe-to-event.js +++ b/js/src/util/subscribe-to-event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/tx.js b/js/src/util/tx.js index b688d06fefe..591931ff34c 100644 --- a/js/src/util/tx.js +++ b/js/src/util/tx.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/validation.js b/js/src/util/validation.js index 3d312a2f42a..75802ed5fe4 100644 --- a/js/src/util/validation.js +++ b/js/src/util/validation.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/wallet.js b/js/src/util/wallet.js index 123f9f5925b..b6240ff0145 100644 --- a/js/src/util/wallet.js +++ b/js/src/util/wallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/wallets.js b/js/src/util/wallets.js index 1f0bc673588..3732840d8b4 100644 --- a/js/src/util/wallets.js +++ b/js/src/util/wallets.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/util/web3.extensions.js b/js/src/util/web3.extensions.js index acae683bd14..f48aa6c2520 100644 --- a/js/src/util/web3.extensions.js +++ b/js/src/util/web3.extensions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Header/header.js b/js/src/views/Account/Header/header.js index 7df87bd9c40..b2e0a9c2875 100644 --- a/js/src/views/Account/Header/header.js +++ b/js/src/views/Account/Header/header.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Header/index.js b/js/src/views/Account/Header/index.js index 4a51219067e..ba1f0b63c99 100644 --- a/js/src/views/Account/Header/index.js +++ b/js/src/views/Account/Header/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Transactions/index.js b/js/src/views/Account/Transactions/index.js index f74dcd5e8b7..61c6a8aad10 100644 --- a/js/src/views/Account/Transactions/index.js +++ b/js/src/views/Account/Transactions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/Transactions/transactions.js b/js/src/views/Account/Transactions/transactions.js index 2e98208b6c9..b8b28208f5e 100644 --- a/js/src/views/Account/Transactions/transactions.js +++ b/js/src/views/Account/Transactions/transactions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/account.js b/js/src/views/Account/account.js index 840de05b904..9e4c561661f 100644 --- a/js/src/views/Account/account.js +++ b/js/src/views/Account/account.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Account/index.js b/js/src/views/Account/index.js index 55c215f7c94..75c7cc40148 100644 --- a/js/src/views/Account/index.js +++ b/js/src/views/Account/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/List/index.js b/js/src/views/Accounts/List/index.js index 11950acfa4a..5ec2cb3228b 100644 --- a/js/src/views/Accounts/List/index.js +++ b/js/src/views/Accounts/List/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/List/list.js b/js/src/views/Accounts/List/list.js index 4d54b640f69..f08c9fdb02c 100644 --- a/js/src/views/Accounts/List/list.js +++ b/js/src/views/Accounts/List/list.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/Summary/index.js b/js/src/views/Accounts/Summary/index.js index 7cc23b215d3..980ecff9a80 100644 --- a/js/src/views/Accounts/Summary/index.js +++ b/js/src/views/Accounts/Summary/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js index a19b9a9de74..98d4642fd62 100644 --- a/js/src/views/Accounts/Summary/summary.js +++ b/js/src/views/Accounts/Summary/summary.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/accounts.js b/js/src/views/Accounts/accounts.js index a844ae9899a..70b6f770a44 100644 --- a/js/src/views/Accounts/accounts.js +++ b/js/src/views/Accounts/accounts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Accounts/index.js b/js/src/views/Accounts/index.js index e9be1d55733..c1e7c91a0a2 100644 --- a/js/src/views/Accounts/index.js +++ b/js/src/views/Accounts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/Delete/delete.js b/js/src/views/Address/Delete/delete.js index 2d19f214135..beaf42867cb 100644 --- a/js/src/views/Address/Delete/delete.js +++ b/js/src/views/Address/Delete/delete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/Delete/index.js b/js/src/views/Address/Delete/index.js index 8d2a51500cb..9ce1b6a1da9 100644 --- a/js/src/views/Address/Delete/index.js +++ b/js/src/views/Address/Delete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/address.js b/js/src/views/Address/address.js index 9c39203baf1..8798e826231 100644 --- a/js/src/views/Address/address.js +++ b/js/src/views/Address/address.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Address/index.js b/js/src/views/Address/index.js index f97d5b1aedb..3a1c9a5f7b8 100644 --- a/js/src/views/Address/index.js +++ b/js/src/views/Address/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Addresses/addresses.js b/js/src/views/Addresses/addresses.js index 609f029c75e..faa6a1a3277 100644 --- a/js/src/views/Addresses/addresses.js +++ b/js/src/views/Addresses/addresses.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Addresses/index.js b/js/src/views/Addresses/index.js index 97e107c00ac..a0a5e1a406d 100644 --- a/js/src/views/Addresses/index.js +++ b/js/src/views/Addresses/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Container/container.js b/js/src/views/Application/Container/container.js index 592e5a3400b..c5cd529a507 100644 --- a/js/src/views/Application/Container/container.js +++ b/js/src/views/Application/Container/container.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Container/index.js b/js/src/views/Application/Container/index.js index 87fbc567ef2..5ad84166188 100644 --- a/js/src/views/Application/Container/index.js +++ b/js/src/views/Application/Container/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/DappContainer/dappContainer.js b/js/src/views/Application/DappContainer/dappContainer.js index 13ecde190bf..8c5baa68483 100644 --- a/js/src/views/Application/DappContainer/dappContainer.js +++ b/js/src/views/Application/DappContainer/dappContainer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/DappContainer/index.js b/js/src/views/Application/DappContainer/index.js index 21837d4b1a4..ec666b8157f 100644 --- a/js/src/views/Application/DappContainer/index.js +++ b/js/src/views/Application/DappContainer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/FrameError/frameError.js b/js/src/views/Application/FrameError/frameError.js index 35d2493b0f3..fed9b4df0c6 100644 --- a/js/src/views/Application/FrameError/frameError.js +++ b/js/src/views/Application/FrameError/frameError.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/FrameError/index.js b/js/src/views/Application/FrameError/index.js index e4358d46d42..9ee2947e004 100644 --- a/js/src/views/Application/FrameError/index.js +++ b/js/src/views/Application/FrameError/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Snackbar/index.js b/js/src/views/Application/Snackbar/index.js index 0da39f2369c..35c7df9973e 100644 --- a/js/src/views/Application/Snackbar/index.js +++ b/js/src/views/Application/Snackbar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Snackbar/snackbar.js b/js/src/views/Application/Snackbar/snackbar.js index f7232069a4e..5f105db1400 100644 --- a/js/src/views/Application/Snackbar/snackbar.js +++ b/js/src/views/Application/Snackbar/snackbar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Status/index.js b/js/src/views/Application/Status/index.js index 44079b22485..f966050e937 100644 --- a/js/src/views/Application/Status/index.js +++ b/js/src/views/Application/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/Status/status.js b/js/src/views/Application/Status/status.js index bb48ce6f80f..8d772483880 100644 --- a/js/src/views/Application/Status/status.js +++ b/js/src/views/Application/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/TabBar/index.js b/js/src/views/Application/TabBar/index.js index d1a5eacbe57..5af9fe77c34 100644 --- a/js/src/views/Application/TabBar/index.js +++ b/js/src/views/Application/TabBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/TabBar/tabBar.js b/js/src/views/Application/TabBar/tabBar.js index 63f569f1ff0..95db7a1f78b 100644 --- a/js/src/views/Application/TabBar/tabBar.js +++ b/js/src/views/Application/TabBar/tabBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/application.js b/js/src/views/Application/application.js index 830a44f6c95..1c86dcbd26c 100644 --- a/js/src/views/Application/application.js +++ b/js/src/views/Application/application.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/index.js b/js/src/views/Application/index.js index 236578226a8..a3198ef88cb 100644 --- a/js/src/views/Application/index.js +++ b/js/src/views/Application/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Application/store.js b/js/src/views/Application/store.js index 4ea0faf3dc7..bb42721cde6 100644 --- a/js/src/views/Application/store.js +++ b/js/src/views/Application/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Connection/connection.js b/js/src/views/Connection/connection.js index ad0e0c14002..8cc2378d97a 100644 --- a/js/src/views/Connection/connection.js +++ b/js/src/views/Connection/connection.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Connection/index.js b/js/src/views/Connection/index.js index f33fc42fe62..560555d7cad 100644 --- a/js/src/views/Connection/index.js +++ b/js/src/views/Connection/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/Event/event.js b/js/src/views/Contract/Events/Event/event.js index 1ed114d07d6..f5ca3491085 100644 --- a/js/src/views/Contract/Events/Event/event.js +++ b/js/src/views/Contract/Events/Event/event.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/Event/index.js b/js/src/views/Contract/Events/Event/index.js index 0925882d3e3..a6d44701a76 100644 --- a/js/src/views/Contract/Events/Event/index.js +++ b/js/src/views/Contract/Events/Event/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/events.js b/js/src/views/Contract/Events/events.js index c29e624bff7..dba05dfd9fc 100644 --- a/js/src/views/Contract/Events/events.js +++ b/js/src/views/Contract/Events/events.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Events/index.js b/js/src/views/Contract/Events/index.js index 88ad6d407c9..d2c722d816a 100644 --- a/js/src/views/Contract/Events/index.js +++ b/js/src/views/Contract/Events/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Queries/index.js b/js/src/views/Contract/Queries/index.js index 7a0dd9290e6..65e731587f4 100644 --- a/js/src/views/Contract/Queries/index.js +++ b/js/src/views/Contract/Queries/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Queries/inputQuery.js b/js/src/views/Contract/Queries/inputQuery.js index 4ebdc62dbfd..9d3cf279d46 100644 --- a/js/src/views/Contract/Queries/inputQuery.js +++ b/js/src/views/Contract/Queries/inputQuery.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/Queries/queries.js b/js/src/views/Contract/Queries/queries.js index 1bfd2fa5f25..fff7adb6bb3 100644 --- a/js/src/views/Contract/Queries/queries.js +++ b/js/src/views/Contract/Queries/queries.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js index e501e4fe505..38447911fd6 100644 --- a/js/src/views/Contract/contract.js +++ b/js/src/views/Contract/contract.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contract/index.js b/js/src/views/Contract/index.js index 18051a69f91..3ab8765b027 100644 --- a/js/src/views/Contract/index.js +++ b/js/src/views/Contract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/Summary/index.js b/js/src/views/Contracts/Summary/index.js index 7cc23b215d3..980ecff9a80 100644 --- a/js/src/views/Contracts/Summary/index.js +++ b/js/src/views/Contracts/Summary/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/Summary/summary.js b/js/src/views/Contracts/Summary/summary.js index 5b34a6b51a2..36e88f03937 100644 --- a/js/src/views/Contracts/Summary/summary.js +++ b/js/src/views/Contracts/Summary/summary.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/contracts.js b/js/src/views/Contracts/contracts.js index 1e15c3947ad..cc292275ac7 100644 --- a/js/src/views/Contracts/contracts.js +++ b/js/src/views/Contracts/contracts.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Contracts/index.js b/js/src/views/Contracts/index.js index 075837ce651..ccf6cf5f1cd 100644 --- a/js/src/views/Contracts/index.js +++ b/js/src/views/Contracts/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapp/dapp.js b/js/src/views/Dapp/dapp.js index 3e921891486..16a84296417 100644 --- a/js/src/views/Dapp/dapp.js +++ b/js/src/views/Dapp/dapp.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapp/index.js b/js/src/views/Dapp/index.js index 6fbb5df2738..f32a03d0e3c 100644 --- a/js/src/views/Dapp/index.js +++ b/js/src/views/Dapp/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/AddDapps/AddDapps.js b/js/src/views/Dapps/AddDapps/AddDapps.js index 71d03dc50bc..84e06b9dd47 100644 --- a/js/src/views/Dapps/AddDapps/AddDapps.js +++ b/js/src/views/Dapps/AddDapps/AddDapps.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/AddDapps/index.js b/js/src/views/Dapps/AddDapps/index.js index 6014c731527..209e1e54c21 100644 --- a/js/src/views/Dapps/AddDapps/index.js +++ b/js/src/views/Dapps/AddDapps/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/Summary/index.js b/js/src/views/Dapps/Summary/index.js index 7cc23b215d3..980ecff9a80 100644 --- a/js/src/views/Dapps/Summary/index.js +++ b/js/src/views/Dapps/Summary/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/Summary/summary.js b/js/src/views/Dapps/Summary/summary.js index 76045ff701d..154ce15b17c 100644 --- a/js/src/views/Dapps/Summary/summary.js +++ b/js/src/views/Dapps/Summary/summary.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/dapps.js b/js/src/views/Dapps/dapps.js index b0b731b9327..ad820ebd969 100644 --- a/js/src/views/Dapps/dapps.js +++ b/js/src/views/Dapps/dapps.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/dappsStore.js b/js/src/views/Dapps/dappsStore.js index c1790863c70..1841f4c7c7a 100644 --- a/js/src/views/Dapps/dappsStore.js +++ b/js/src/views/Dapps/dappsStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Dapps/index.js b/js/src/views/Dapps/index.js index 38a33260f5c..81cbe79d4cb 100644 --- a/js/src/views/Dapps/index.js +++ b/js/src/views/Dapps/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/ParityBar/index.js b/js/src/views/ParityBar/index.js index 98cdb674665..48420712ff9 100644 --- a/js/src/views/ParityBar/index.js +++ b/js/src/views/ParityBar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/ParityBar/parityBar.js b/js/src/views/ParityBar/parityBar.js index 14b71aa10dd..2f7c5295789 100644 --- a/js/src/views/ParityBar/parityBar.js +++ b/js/src/views/ParityBar/parityBar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Background/background.js b/js/src/views/Settings/Background/background.js index 0551a6145b0..a475c9f2412 100644 --- a/js/src/views/Settings/Background/background.js +++ b/js/src/views/Settings/Background/background.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Background/index.js b/js/src/views/Settings/Background/index.js index ffd3111f745..5211138b783 100644 --- a/js/src/views/Settings/Background/index.js +++ b/js/src/views/Settings/Background/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Parity/index.js b/js/src/views/Settings/Parity/index.js index 38f08f72557..c76208e927d 100644 --- a/js/src/views/Settings/Parity/index.js +++ b/js/src/views/Settings/Parity/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Parity/parity.js b/js/src/views/Settings/Parity/parity.js index 1535f6cf239..5acf4bfb1f6 100644 --- a/js/src/views/Settings/Parity/parity.js +++ b/js/src/views/Settings/Parity/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Proxy/index.js b/js/src/views/Settings/Proxy/index.js index 5d65ef15375..94aae9c5775 100644 --- a/js/src/views/Settings/Proxy/index.js +++ b/js/src/views/Settings/Proxy/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Proxy/proxy.js b/js/src/views/Settings/Proxy/proxy.js index cc7fad3704c..f4dcd97b1cd 100644 --- a/js/src/views/Settings/Proxy/proxy.js +++ b/js/src/views/Settings/Proxy/proxy.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Views/defaults.js b/js/src/views/Settings/Views/defaults.js index dce593d2b8f..7fe6ccc8040 100644 --- a/js/src/views/Settings/Views/defaults.js +++ b/js/src/views/Settings/Views/defaults.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Views/index.js b/js/src/views/Settings/Views/index.js index cc189d4cac5..e4ba26c56a6 100644 --- a/js/src/views/Settings/Views/index.js +++ b/js/src/views/Settings/Views/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/Views/views.js b/js/src/views/Settings/Views/views.js index 2611096649d..5bd6154d801 100644 --- a/js/src/views/Settings/Views/views.js +++ b/js/src/views/Settings/Views/views.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/actions.js b/js/src/views/Settings/actions.js index d01ddb24f81..9add6dec39e 100644 --- a/js/src/views/Settings/actions.js +++ b/js/src/views/Settings/actions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/index.js b/js/src/views/Settings/index.js index 4c5414f71bc..878a874526b 100644 --- a/js/src/views/Settings/index.js +++ b/js/src/views/Settings/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/middleware.js b/js/src/views/Settings/middleware.js index ddadad92b84..9ee674d7659 100644 --- a/js/src/views/Settings/middleware.js +++ b/js/src/views/Settings/middleware.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/reducers.js b/js/src/views/Settings/reducers.js index af261219983..1050e9a5325 100644 --- a/js/src/views/Settings/reducers.js +++ b/js/src/views/Settings/reducers.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Settings/settings.js b/js/src/views/Settings/settings.js index a6c455dad79..bc1230b9c0e 100644 --- a/js/src/views/Settings/settings.js +++ b/js/src/views/Settings/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/Account.js b/js/src/views/Signer/components/Account/Account.js index 05ca180c6e0..787fadc17c4 100644 --- a/js/src/views/Signer/components/Account/Account.js +++ b/js/src/views/Signer/components/Account/Account.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/AccountLink/AccountLink.js b/js/src/views/Signer/components/Account/AccountLink/AccountLink.js index f4267547405..871baa5dac2 100644 --- a/js/src/views/Signer/components/Account/AccountLink/AccountLink.js +++ b/js/src/views/Signer/components/Account/AccountLink/AccountLink.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/AccountLink/index.js b/js/src/views/Signer/components/Account/AccountLink/index.js index 90ae8634a1f..7ca280a6ab6 100644 --- a/js/src/views/Signer/components/Account/AccountLink/index.js +++ b/js/src/views/Signer/components/Account/AccountLink/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/Account/index.js b/js/src/views/Signer/components/Account/index.js index c42a8a81038..1bfc3515f46 100644 --- a/js/src/views/Signer/components/Account/index.js +++ b/js/src/views/Signer/components/Account/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/RequestPending/index.js b/js/src/views/Signer/components/RequestPending/index.js index d4b048781d6..a7830885bd1 100644 --- a/js/src/views/Signer/components/RequestPending/index.js +++ b/js/src/views/Signer/components/RequestPending/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/RequestPending/requestPending.js b/js/src/views/Signer/components/RequestPending/requestPending.js index d50e5cde5b6..fc5b04d964b 100644 --- a/js/src/views/Signer/components/RequestPending/requestPending.js +++ b/js/src/views/Signer/components/RequestPending/requestPending.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/SignRequest/SignRequest.js b/js/src/views/Signer/components/SignRequest/SignRequest.js index ae4159c71d4..9363e11eec6 100644 --- a/js/src/views/Signer/components/SignRequest/SignRequest.js +++ b/js/src/views/Signer/components/SignRequest/SignRequest.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/SignRequest/index.js b/js/src/views/Signer/components/SignRequest/index.js index 4aec1d19c9a..b9c2cc8cd75 100644 --- a/js/src/views/Signer/components/SignRequest/index.js +++ b/js/src/views/Signer/components/SignRequest/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js b/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js index 0a30991de39..fa52730f88d 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js +++ b/js/src/views/Signer/components/TransactionMainDetails/TransactionMainDetails.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionMainDetails/index.js b/js/src/views/Signer/components/TransactionMainDetails/index.js index f7b053acd3c..ad9b01a92f7 100644 --- a/js/src/views/Signer/components/TransactionMainDetails/index.js +++ b/js/src/views/Signer/components/TransactionMainDetails/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPending/TransactionPending.js b/js/src/views/Signer/components/TransactionPending/TransactionPending.js index ba3c3080263..7d3c04744bc 100644 --- a/js/src/views/Signer/components/TransactionPending/TransactionPending.js +++ b/js/src/views/Signer/components/TransactionPending/TransactionPending.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPending/index.js b/js/src/views/Signer/components/TransactionPending/index.js index 1916d05713d..5a945e1eaf5 100644 --- a/js/src/views/Signer/components/TransactionPending/index.js +++ b/js/src/views/Signer/components/TransactionPending/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js index 6f46cf57193..99c24a59107 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingForm.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js index 7d2d660df42..0b24925ffbc 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/TransactionPendingFormConfirm.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js index ad0f9fd1ff3..d12b8500667 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormConfirm/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js index af06e79b437..438da642df8 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/TransactionPendingFormReject.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js index 3ac772104a8..15d219f5c30 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/TransactionPendingFormReject/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TransactionPendingForm/index.js b/js/src/views/Signer/components/TransactionPendingForm/index.js index 2fe1e903769..54d777edd43 100644 --- a/js/src/views/Signer/components/TransactionPendingForm/index.js +++ b/js/src/views/Signer/components/TransactionPendingForm/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TxHashLink/TxHashLink.js b/js/src/views/Signer/components/TxHashLink/TxHashLink.js index bce30ededef..17ccb4f9b19 100644 --- a/js/src/views/Signer/components/TxHashLink/TxHashLink.js +++ b/js/src/views/Signer/components/TxHashLink/TxHashLink.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/TxHashLink/index.js b/js/src/views/Signer/components/TxHashLink/index.js index ef71992907d..5f1b8391bfd 100644 --- a/js/src/views/Signer/components/TxHashLink/index.js +++ b/js/src/views/Signer/components/TxHashLink/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/logger.js b/js/src/views/Signer/components/util/logger.js index 671d4de8460..4f721fd6c1b 100644 --- a/js/src/views/Signer/components/util/logger.js +++ b/js/src/views/Signer/components/util/logger.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/react.js b/js/src/views/Signer/components/util/react.js index 095f6e6b0d1..6cf7298eae0 100644 --- a/js/src/views/Signer/components/util/react.js +++ b/js/src/views/Signer/components/util/react.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/transaction.js b/js/src/views/Signer/components/util/transaction.js index 25800e80663..49e0c365485 100644 --- a/js/src/views/Signer/components/util/transaction.js +++ b/js/src/views/Signer/components/util/transaction.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/transaction.spec.js b/js/src/views/Signer/components/util/transaction.spec.js index a2022fe2e91..294c3140c14 100644 --- a/js/src/views/Signer/components/util/transaction.spec.js +++ b/js/src/views/Signer/components/util/transaction.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/components/util/util.js b/js/src/views/Signer/components/util/util.js index 095a78d602d..865a678ae0d 100644 --- a/js/src/views/Signer/components/util/util.js +++ b/js/src/views/Signer/components/util/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/Embedded/embedded.js b/js/src/views/Signer/containers/Embedded/embedded.js index 4629a6522ff..28e323127e9 100644 --- a/js/src/views/Signer/containers/Embedded/embedded.js +++ b/js/src/views/Signer/containers/Embedded/embedded.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/Embedded/index.js b/js/src/views/Signer/containers/Embedded/index.js index ef42659387c..21dd4977837 100644 --- a/js/src/views/Signer/containers/Embedded/index.js +++ b/js/src/views/Signer/containers/Embedded/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js b/js/src/views/Signer/containers/RequestsPage/RequestsPage.js index f3cd5a26717..a8ad6e6cedf 100644 --- a/js/src/views/Signer/containers/RequestsPage/RequestsPage.js +++ b/js/src/views/Signer/containers/RequestsPage/RequestsPage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/containers/RequestsPage/index.js b/js/src/views/Signer/containers/RequestsPage/index.js index cb3fdd1439f..b561ddcf91e 100644 --- a/js/src/views/Signer/containers/RequestsPage/index.js +++ b/js/src/views/Signer/containers/RequestsPage/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/index.js b/js/src/views/Signer/index.js index ff804fe5b62..37d3c748965 100644 --- a/js/src/views/Signer/index.js +++ b/js/src/views/Signer/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/signer.js b/js/src/views/Signer/signer.js index f0b4baed72e..8e131248b49 100644 --- a/js/src/views/Signer/signer.js +++ b/js/src/views/Signer/signer.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/store.js b/js/src/views/Signer/store.js index bcc85a43120..3e16a6e0142 100644 --- a/js/src/views/Signer/store.js +++ b/js/src/views/Signer/store.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/utils/extension.js b/js/src/views/Signer/utils/extension.js index a99a72d63d2..b00e9c4a467 100644 --- a/js/src/views/Signer/utils/extension.js +++ b/js/src/views/Signer/utils/extension.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Signer/utils/utils.js b/js/src/views/Signer/utils/utils.js index 8c231275c8c..c315eff27ad 100644 --- a/js/src/views/Signer/utils/utils.js +++ b/js/src/views/Signer/utils/utils.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/app.js b/js/src/views/Status/actions/app.js index d236dd84630..84441be96b8 100644 --- a/js/src/views/Status/actions/app.js +++ b/js/src/views/Status/actions/app.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/clipboard.js b/js/src/views/Status/actions/clipboard.js index 68dc8b8f8af..7275bd17040 100644 --- a/js/src/views/Status/actions/clipboard.js +++ b/js/src/views/Status/actions/clipboard.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/debug.js b/js/src/views/Status/actions/debug.js index 3cd0c0a43af..26a3b6215dd 100644 --- a/js/src/views/Status/actions/debug.js +++ b/js/src/views/Status/actions/debug.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/localstorage.js b/js/src/views/Status/actions/localstorage.js index 2bf2d284113..0ed6fd3bca6 100644 --- a/js/src/views/Status/actions/localstorage.js +++ b/js/src/views/Status/actions/localstorage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/logger.js b/js/src/views/Status/actions/logger.js index 5fc327c03fe..6758a0743f0 100644 --- a/js/src/views/Status/actions/logger.js +++ b/js/src/views/Status/actions/logger.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/mining.js b/js/src/views/Status/actions/mining.js index e4854420268..8d27dfb686e 100644 --- a/js/src/views/Status/actions/mining.js +++ b/js/src/views/Status/actions/mining.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/modify-mining.js b/js/src/views/Status/actions/modify-mining.js index ff959c9f5c2..13c0fffd2ec 100644 --- a/js/src/views/Status/actions/modify-mining.js +++ b/js/src/views/Status/actions/modify-mining.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/rpc.js b/js/src/views/Status/actions/rpc.js index 761a77f3d22..a296b731fab 100644 --- a/js/src/views/Status/actions/rpc.js +++ b/js/src/views/Status/actions/rpc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/actions/status.js b/js/src/views/Status/actions/status.js index 8980e34c493..e765d9f98e6 100644 --- a/js/src/views/Status/actions/status.js +++ b/js/src/views/Status/actions/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/AutoComplete/AutoComplete.js b/js/src/views/Status/components/AutoComplete/AutoComplete.js index c16dbd27635..6cf9f6d02df 100644 --- a/js/src/views/Status/components/AutoComplete/AutoComplete.js +++ b/js/src/views/Status/components/AutoComplete/AutoComplete.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js b/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js index 6bc04574e5e..386f1da49e9 100644 --- a/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js +++ b/js/src/views/Status/components/AutoComplete/AutoComplete.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/AutoComplete/index.js b/js/src/views/Status/components/AutoComplete/index.js index 201b6646e8f..5566a319d87 100644 --- a/js/src/views/Status/components/AutoComplete/index.js +++ b/js/src/views/Status/components/AutoComplete/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Box/Box.js b/js/src/views/Status/components/Box/Box.js index c950c0d659c..e6e5bf1cbfb 100644 --- a/js/src/views/Status/components/Box/Box.js +++ b/js/src/views/Status/components/Box/Box.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Box/Box.spec.js b/js/src/views/Status/components/Box/Box.spec.js index 5b6301dc9aa..93dd8fdec85 100644 --- a/js/src/views/Status/components/Box/Box.spec.js +++ b/js/src/views/Status/components/Box/Box.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Box/index.js b/js/src/views/Status/components/Box/index.js index e27e2972453..aac0639e18a 100644 --- a/js/src/views/Status/components/Box/index.js +++ b/js/src/views/Status/components/Box/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Call/Call.js b/js/src/views/Status/components/Call/Call.js index 31d20aa4239..13f9cee552c 100644 --- a/js/src/views/Status/components/Call/Call.js +++ b/js/src/views/Status/components/Call/Call.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Call/Call.spec.js b/js/src/views/Status/components/Call/Call.spec.js index 70caca49fa0..ec0d1cc1a6b 100644 --- a/js/src/views/Status/components/Call/Call.spec.js +++ b/js/src/views/Status/components/Call/Call.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Call/index.js b/js/src/views/Status/components/Call/index.js index 3556a61948c..822f6a16252 100644 --- a/js/src/views/Status/components/Call/index.js +++ b/js/src/views/Status/components/Call/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Calls/Calls.js b/js/src/views/Status/components/Calls/Calls.js index 1115ec63235..f1956dcf19a 100644 --- a/js/src/views/Status/components/Calls/Calls.js +++ b/js/src/views/Status/components/Calls/Calls.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Calls/Calls.spec.js b/js/src/views/Status/components/Calls/Calls.spec.js index e1e4ac8c907..45265396028 100644 --- a/js/src/views/Status/components/Calls/Calls.spec.js +++ b/js/src/views/Status/components/Calls/Calls.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Calls/index.js b/js/src/views/Status/components/Calls/index.js index 8508479128c..9605271f6ee 100644 --- a/js/src/views/Status/components/Calls/index.js +++ b/js/src/views/Status/components/Calls/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/CallsToolbar/CallsToolbar.js b/js/src/views/Status/components/CallsToolbar/CallsToolbar.js index a91518ba298..77e7ab4ba02 100644 --- a/js/src/views/Status/components/CallsToolbar/CallsToolbar.js +++ b/js/src/views/Status/components/CallsToolbar/CallsToolbar.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js b/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js index 6f7a40dfea9..354b1e999f2 100644 --- a/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js +++ b/js/src/views/Status/components/CallsToolbar/CallsToolbar.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/CallsToolbar/index.js b/js/src/views/Status/components/CallsToolbar/index.js index f8162611e44..48a9a92e7ce 100644 --- a/js/src/views/Status/components/CallsToolbar/index.js +++ b/js/src/views/Status/components/CallsToolbar/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Debug/debug.js b/js/src/views/Status/components/Debug/debug.js index 438d208f9a8..2ea268c7c7f 100644 --- a/js/src/views/Status/components/Debug/debug.js +++ b/js/src/views/Status/components/Debug/debug.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Debug/index.js b/js/src/views/Status/components/Debug/index.js index c6b522c46c1..b9d48617b0b 100644 --- a/js/src/views/Status/components/Debug/index.js +++ b/js/src/views/Status/components/Debug/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/EditableValue/EditableValue.js b/js/src/views/Status/components/EditableValue/EditableValue.js index d78ec7d3bd7..85591c50939 100644 --- a/js/src/views/Status/components/EditableValue/EditableValue.js +++ b/js/src/views/Status/components/EditableValue/EditableValue.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/EditableValue/index.js b/js/src/views/Status/components/EditableValue/index.js index bf91564d765..bd4c4e0c152 100644 --- a/js/src/views/Status/components/EditableValue/index.js +++ b/js/src/views/Status/components/EditableValue/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/JsonEditor/JsonEditor.js b/js/src/views/Status/components/JsonEditor/JsonEditor.js index e9086f1b52a..50e62c698bf 100644 --- a/js/src/views/Status/components/JsonEditor/JsonEditor.js +++ b/js/src/views/Status/components/JsonEditor/JsonEditor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/JsonEditor/index.js b/js/src/views/Status/components/JsonEditor/index.js index db5b75fcae2..e7e36200ca8 100644 --- a/js/src/views/Status/components/JsonEditor/index.js +++ b/js/src/views/Status/components/JsonEditor/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Markdown/Markdown.js b/js/src/views/Status/components/Markdown/Markdown.js index 155d3d7e358..3f4aae23c8d 100644 --- a/js/src/views/Status/components/Markdown/Markdown.js +++ b/js/src/views/Status/components/Markdown/Markdown.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Markdown/index.js b/js/src/views/Status/components/Markdown/index.js index 569558ede8a..6a3026b9ec5 100644 --- a/js/src/views/Status/components/Markdown/index.js +++ b/js/src/views/Status/components/Markdown/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/decodeExtraData.js b/js/src/views/Status/components/MiningSettings/decodeExtraData.js index 7fd07921e7f..20c36f2b725 100644 --- a/js/src/views/Status/components/MiningSettings/decodeExtraData.js +++ b/js/src/views/Status/components/MiningSettings/decodeExtraData.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js b/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js index b2f93240cce..b204ba2cd29 100644 --- a/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js +++ b/js/src/views/Status/components/MiningSettings/decodeExtraData.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/index.js b/js/src/views/Status/components/MiningSettings/index.js index 7853e0d33ce..7cab96ed02b 100644 --- a/js/src/views/Status/components/MiningSettings/index.js +++ b/js/src/views/Status/components/MiningSettings/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/miningSettings.js b/js/src/views/Status/components/MiningSettings/miningSettings.js index 52cab63b911..b65eed92996 100644 --- a/js/src/views/Status/components/MiningSettings/miningSettings.js +++ b/js/src/views/Status/components/MiningSettings/miningSettings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/numberFromString.js b/js/src/views/Status/components/MiningSettings/numberFromString.js index 6867345ab24..22ea46a91f2 100644 --- a/js/src/views/Status/components/MiningSettings/numberFromString.js +++ b/js/src/views/Status/components/MiningSettings/numberFromString.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/MiningSettings/numberFromString.spec.js b/js/src/views/Status/components/MiningSettings/numberFromString.spec.js index 7efa514c347..3a99677c44e 100644 --- a/js/src/views/Status/components/MiningSettings/numberFromString.spec.js +++ b/js/src/views/Status/components/MiningSettings/numberFromString.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Response/Response.js b/js/src/views/Status/components/Response/Response.js index 4ee664ad205..0d578440711 100644 --- a/js/src/views/Status/components/Response/Response.js +++ b/js/src/views/Status/components/Response/Response.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Response/Response.spec.js b/js/src/views/Status/components/Response/Response.spec.js index 0617721c2d4..31def443633 100644 --- a/js/src/views/Status/components/Response/Response.spec.js +++ b/js/src/views/Status/components/Response/Response.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Response/index.js b/js/src/views/Status/components/Response/index.js index f1d89d75a50..39513e0c2fc 100644 --- a/js/src/views/Status/components/Response/index.js +++ b/js/src/views/Status/components/Response/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcCalls/RpcCalls.js b/js/src/views/Status/components/RpcCalls/RpcCalls.js index 1b3f8b87bf7..ab57370eb7c 100644 --- a/js/src/views/Status/components/RpcCalls/RpcCalls.js +++ b/js/src/views/Status/components/RpcCalls/RpcCalls.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcCalls/index.js b/js/src/views/Status/components/RpcCalls/index.js index 1c55eea7163..a174e28d907 100644 --- a/js/src/views/Status/components/RpcCalls/index.js +++ b/js/src/views/Status/components/RpcCalls/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcDocs/RpcDocs.js b/js/src/views/Status/components/RpcDocs/RpcDocs.js index 3ecd93362ad..4eec9129054 100644 --- a/js/src/views/Status/components/RpcDocs/RpcDocs.js +++ b/js/src/views/Status/components/RpcDocs/RpcDocs.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcDocs/index.js b/js/src/views/Status/components/RpcDocs/index.js index f1a9be5c099..af5fb64dd79 100644 --- a/js/src/views/Status/components/RpcDocs/index.js +++ b/js/src/views/Status/components/RpcDocs/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcNav/RpcNav.js b/js/src/views/Status/components/RpcNav/RpcNav.js index b4cf2a6efc7..33ef0ebc40a 100644 --- a/js/src/views/Status/components/RpcNav/RpcNav.js +++ b/js/src/views/Status/components/RpcNav/RpcNav.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/RpcNav/index.js b/js/src/views/Status/components/RpcNav/index.js index 8e2b2aa40a3..49a4db9c179 100644 --- a/js/src/views/Status/components/RpcNav/index.js +++ b/js/src/views/Status/components/RpcNav/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js b/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js index e7097d66d6d..3857a65b10e 100644 --- a/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js +++ b/js/src/views/Status/components/ScrollTopButton/ScrollTopButton.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/ScrollTopButton/index.js b/js/src/views/Status/components/ScrollTopButton/index.js index 835969920da..12cf9de56a0 100644 --- a/js/src/views/Status/components/ScrollTopButton/index.js +++ b/js/src/views/Status/components/ScrollTopButton/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/ScrollTopButton/util.js b/js/src/views/Status/components/ScrollTopButton/util.js index 647bcfc43c0..78100c74cd3 100644 --- a/js/src/views/Status/components/ScrollTopButton/util.js +++ b/js/src/views/Status/components/ScrollTopButton/util.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Status/index.js b/js/src/views/Status/components/Status/index.js index 44079b22485..f966050e937 100644 --- a/js/src/views/Status/components/Status/index.js +++ b/js/src/views/Status/components/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/components/Status/status.js b/js/src/views/Status/components/Status/status.js index 891ec66324b..a8b54f7e8d0 100644 --- a/js/src/views/Status/components/Status/status.js +++ b/js/src/views/Status/components/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/constants/index.js b/js/src/views/Status/constants/index.js index 26850209ae7..42c1c0d1410 100644 --- a/js/src/views/Status/constants/index.js +++ b/js/src/views/Status/constants/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/RpcPage/RpcPage.js b/js/src/views/Status/containers/RpcPage/RpcPage.js index 93ff99692a2..1dda2fcb027 100644 --- a/js/src/views/Status/containers/RpcPage/RpcPage.js +++ b/js/src/views/Status/containers/RpcPage/RpcPage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/RpcPage/index.js b/js/src/views/Status/containers/RpcPage/index.js index f94cbe2b323..c0c3a9f8e5c 100644 --- a/js/src/views/Status/containers/RpcPage/index.js +++ b/js/src/views/Status/containers/RpcPage/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/StatusPage/index.js b/js/src/views/Status/containers/StatusPage/index.js index 0e141a16db4..6b0392fc2fa 100644 --- a/js/src/views/Status/containers/StatusPage/index.js +++ b/js/src/views/Status/containers/StatusPage/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/containers/StatusPage/statusPage.js b/js/src/views/Status/containers/StatusPage/statusPage.js index 286e2c20ecf..8389afa66cb 100644 --- a/js/src/views/Status/containers/StatusPage/statusPage.js +++ b/js/src/views/Status/containers/StatusPage/statusPage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/index.js b/js/src/views/Status/index.js index 44079b22485..f966050e937 100644 --- a/js/src/views/Status/index.js +++ b/js/src/views/Status/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/middleware/index.js b/js/src/views/Status/middleware/index.js index 169004a08f9..fe95537f9cc 100644 --- a/js/src/views/Status/middleware/index.js +++ b/js/src/views/Status/middleware/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/middleware/localstorage.js b/js/src/views/Status/middleware/localstorage.js index a431fdd0a98..e0b103a33ab 100644 --- a/js/src/views/Status/middleware/localstorage.js +++ b/js/src/views/Status/middleware/localstorage.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/middleware/localstorage.spec.js b/js/src/views/Status/middleware/localstorage.spec.js index e1d6ed7eede..82010063dad 100644 --- a/js/src/views/Status/middleware/localstorage.spec.js +++ b/js/src/views/Status/middleware/localstorage.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/debug.js b/js/src/views/Status/reducers/debug.js index 314470d3d63..07af4943e5a 100644 --- a/js/src/views/Status/reducers/debug.js +++ b/js/src/views/Status/reducers/debug.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/index.js b/js/src/views/Status/reducers/index.js index 3f6225ee035..adc5d6f8c3b 100644 --- a/js/src/views/Status/reducers/index.js +++ b/js/src/views/Status/reducers/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/logger.js b/js/src/views/Status/reducers/logger.js index 62085feacb6..97166449c6f 100644 --- a/js/src/views/Status/reducers/logger.js +++ b/js/src/views/Status/reducers/logger.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/mining.js b/js/src/views/Status/reducers/mining.js index 3fe780bbdfb..8761c3c3bdd 100644 --- a/js/src/views/Status/reducers/mining.js +++ b/js/src/views/Status/reducers/mining.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/rpc.js b/js/src/views/Status/reducers/rpc.js index e2676260b53..a581a386085 100644 --- a/js/src/views/Status/reducers/rpc.js +++ b/js/src/views/Status/reducers/rpc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/settings.js b/js/src/views/Status/reducers/settings.js index ae6582b02f3..545bd26122e 100644 --- a/js/src/views/Status/reducers/settings.js +++ b/js/src/views/Status/reducers/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/reducers/status.js b/js/src/views/Status/reducers/status.js index f6fec9ce281..065f415965b 100644 --- a/js/src/views/Status/reducers/status.js +++ b/js/src/views/Status/reducers/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/status.js b/js/src/views/Status/status.js index 805c9685098..34a42c29626 100644 --- a/js/src/views/Status/status.js +++ b/js/src/views/Status/status.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/error.js b/js/src/views/Status/util/error.js index 8b680204e7e..82d4c083675 100644 --- a/js/src/views/Status/util/error.js +++ b/js/src/views/Status/util/error.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/error.spec.js b/js/src/views/Status/util/error.spec.js index 7512a47bc3b..50f1d532dc8 100644 --- a/js/src/views/Status/util/error.spec.js +++ b/js/src/views/Status/util/error.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/index.js b/js/src/views/Status/util/index.js index 9194cfd944f..98923fee880 100644 --- a/js/src/views/Status/util/index.js +++ b/js/src/views/Status/util/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/index.spec.js b/js/src/views/Status/util/index.spec.js index 39d17322a27..89c8fe95246 100644 --- a/js/src/views/Status/util/index.spec.js +++ b/js/src/views/Status/util/index.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/react.js b/js/src/views/Status/util/react.js index 095f6e6b0d1..6cf7298eae0 100644 --- a/js/src/views/Status/util/react.js +++ b/js/src/views/Status/util/react.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Status/util/rpc-md.js b/js/src/views/Status/util/rpc-md.js index 5c0a3f793be..ad40c576b5f 100644 --- a/js/src/views/Status/util/rpc-md.js +++ b/js/src/views/Status/util/rpc-md.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Confirmations/confirmations.js b/js/src/views/Wallet/Confirmations/confirmations.js index 8ac340cbb43..1c70a94e2da 100644 --- a/js/src/views/Wallet/Confirmations/confirmations.js +++ b/js/src/views/Wallet/Confirmations/confirmations.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Confirmations/index.js b/js/src/views/Wallet/Confirmations/index.js index 00cea94a6e5..199d1256bf1 100644 --- a/js/src/views/Wallet/Confirmations/index.js +++ b/js/src/views/Wallet/Confirmations/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Details/details.js b/js/src/views/Wallet/Details/details.js index fb08bbde2ec..25141915ae9 100644 --- a/js/src/views/Wallet/Details/details.js +++ b/js/src/views/Wallet/Details/details.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Details/index.js b/js/src/views/Wallet/Details/index.js index d0bf396b693..175c9896691 100644 --- a/js/src/views/Wallet/Details/index.js +++ b/js/src/views/Wallet/Details/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Transactions/index.js b/js/src/views/Wallet/Transactions/index.js index f74dcd5e8b7..61c6a8aad10 100644 --- a/js/src/views/Wallet/Transactions/index.js +++ b/js/src/views/Wallet/Transactions/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/Transactions/transactions.js b/js/src/views/Wallet/Transactions/transactions.js index 58952bd9e37..aff1623a45d 100644 --- a/js/src/views/Wallet/Transactions/transactions.js +++ b/js/src/views/Wallet/Transactions/transactions.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/index.js b/js/src/views/Wallet/index.js index cebd98d9dcc..b81bd8d2b85 100644 --- a/js/src/views/Wallet/index.js +++ b/js/src/views/Wallet/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/Wallet/wallet.js b/js/src/views/Wallet/wallet.js index 1a5fbeecd04..b33772c48b5 100644 --- a/js/src/views/Wallet/wallet.js +++ b/js/src/views/Wallet/wallet.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/WriteContract/index.js b/js/src/views/WriteContract/index.js index cb4bf811bdf..c3b7437e904 100644 --- a/js/src/views/WriteContract/index.js +++ b/js/src/views/WriteContract/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/WriteContract/writeContract.js b/js/src/views/WriteContract/writeContract.js index 7b0902c1f7a..31c4dd2445e 100644 --- a/js/src/views/WriteContract/writeContract.js +++ b/js/src/views/WriteContract/writeContract.js @@ -1,4 +1,4 @@ - // Copyright 2015, 2016 Ethcore (UK) Ltd. + // Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/WriteContract/writeContractStore.js b/js/src/views/WriteContract/writeContractStore.js index 7ea95775246..dd1985466f5 100644 --- a/js/src/views/WriteContract/writeContractStore.js +++ b/js/src/views/WriteContract/writeContractStore.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/views/index.js b/js/src/views/index.js index 18d320c63dd..2f99ff951d2 100644 --- a/js/src/views/index.js +++ b/js/src/views/index.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/src/web3.js b/js/src/web3.js index 15dc4747cf0..db5328e1839 100644 --- a/js/src/web3.js +++ b/js/src/web3.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/babel.js b/js/test/babel.js index fc37b94bfd2..e2944283297 100644 --- a/js/test/babel.js +++ b/js/test/babel.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/e2e/ethapi.js b/js/test/e2e/ethapi.js index 1fa3da79742..b4830abc692 100644 --- a/js/test/e2e/ethapi.js +++ b/js/test/e2e/ethapi.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/mocha.config.js b/js/test/mocha.config.js index 36c91c76e98..e90c91ebff6 100644 --- a/js/test/mocha.config.js +++ b/js/test/mocha.config.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/mockRpc.js b/js/test/mockRpc.js index 147c64af04a..13f752f8ea0 100644 --- a/js/test/mockRpc.js +++ b/js/test/mockRpc.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/npmParity.js b/js/test/npmParity.js index 6e125e9e29f..a7486de2ffc 100644 --- a/js/test/npmParity.js +++ b/js/test/npmParity.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/test/types.js b/js/test/types.js index 73b0aa14e86..d926220a198 100644 --- a/js/test/types.js +++ b/js/test/types.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/app.js b/js/webpack/app.js index a7b086b96ad..1cb8c0eaf4e 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -1,5 +1,5 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/build.server.js b/js/webpack/build.server.js index c1e803f560d..e52e6265620 100644 --- a/js/webpack/build.server.js +++ b/js/webpack/build.server.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/dev.server.js b/js/webpack/dev.server.js index aed7464b486..9e8bd1524a4 100644 --- a/js/webpack/dev.server.js +++ b/js/webpack/dev.server.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/libraries.js b/js/webpack/libraries.js index d1a2b491546..923d799dccb 100644 --- a/js/webpack/libraries.js +++ b/js/webpack/libraries.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/npm.js b/js/webpack/npm.js index a1bbaeda9bb..a5f4b383f09 100644 --- a/js/webpack/npm.js +++ b/js/webpack/npm.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/shared.js b/js/webpack/shared.js index 3c593fd87ea..ec011242ea3 100644 --- a/js/webpack/shared.js +++ b/js/webpack/shared.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/test.js b/js/webpack/test.js index a0340b46bcc..f118131fd20 100644 --- a/js/webpack/test.js +++ b/js/webpack/test.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/js/webpack/vendor.js b/js/webpack/vendor.js index 535edd97063..7f1114144d6 100644 --- a/js/webpack/vendor.js +++ b/js/webpack/vendor.js @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/Cargo.toml b/json/Cargo.toml index 67303cc7e99..747be8f7d5e 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ethjson" version = "0.1.0" -authors = ["debris "] +authors = ["Parity Technologies "] build = "build.rs" [dependencies] diff --git a/json/build.rs b/json/build.rs index 8be54476e81..dfb6dfa02fc 100644 --- a/json/build.rs +++ b/json/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/account.rs b/json/src/blockchain/account.rs index 649cd170f4e..68a7060a0d8 100644 --- a/json/src/blockchain/account.rs +++ b/json/src/blockchain/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/block.rs b/json/src/blockchain/block.rs index 03522a2c916..d8b6183dbda 100644 --- a/json/src/blockchain/block.rs +++ b/json/src/blockchain/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/blockchain.rs b/json/src/blockchain/blockchain.rs index 3899f23e897..8a0de880107 100644 --- a/json/src/blockchain/blockchain.rs +++ b/json/src/blockchain/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/header.rs b/json/src/blockchain/header.rs index ece6d6359bb..7fc75266dc9 100644 --- a/json/src/blockchain/header.rs +++ b/json/src/blockchain/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/mod.rs b/json/src/blockchain/mod.rs index 727469ea22a..60a215849de 100644 --- a/json/src/blockchain/mod.rs +++ b/json/src/blockchain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/state.rs b/json/src/blockchain/state.rs index 5aa4b09a32d..47480fbb112 100644 --- a/json/src/blockchain/state.rs +++ b/json/src/blockchain/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/test.rs b/json/src/blockchain/test.rs index 301d921df99..110eb362a4c 100644 --- a/json/src/blockchain/test.rs +++ b/json/src/blockchain/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/blockchain/transaction.rs b/json/src/blockchain/transaction.rs index 5d04748f55f..d2385978b67 100644 --- a/json/src/blockchain/transaction.rs +++ b/json/src/blockchain/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/bytes.rs b/json/src/bytes.rs index c162d08ce36..54feb43c1c8 100644 --- a/json/src/bytes.rs +++ b/json/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/hash.rs b/json/src/hash.rs index 14d90ee019c..9aad3311591 100644 --- a/json/src/hash.rs +++ b/json/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/lib.rs b/json/src/lib.rs index b94e1fa55eb..9c67ab3d1b4 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/lib.rs.in b/json/src/lib.rs.in index 4754eeee90e..eca4b6db22f 100644 --- a/json/src/lib.rs.in +++ b/json/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/misc/account_meta.rs b/json/src/misc/account_meta.rs index a347a8cf61c..2d1a90ec316 100644 --- a/json/src/misc/account_meta.rs +++ b/json/src/misc/account_meta.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/misc/dapps_settings.rs b/json/src/misc/dapps_settings.rs index 893e7e93eea..74a12a3317a 100644 --- a/json/src/misc/dapps_settings.rs +++ b/json/src/misc/dapps_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/misc/mod.rs b/json/src/misc/mod.rs index baab83d083e..b64afcc31a7 100644 --- a/json/src/misc/mod.rs +++ b/json/src/misc/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/account.rs b/json/src/spec/account.rs index 90ca8a65805..b3e0ecbae55 100644 --- a/json/src/spec/account.rs +++ b/json/src/spec/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/authority_round.rs b/json/src/spec/authority_round.rs index bae17bb2483..d2cedb55130 100644 --- a/json/src/spec/authority_round.rs +++ b/json/src/spec/authority_round.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/basic_authority.rs b/json/src/spec/basic_authority.rs index b8b7b4a4d74..0e388f1eb4e 100644 --- a/json/src/spec/basic_authority.rs +++ b/json/src/spec/basic_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/builtin.rs b/json/src/spec/builtin.rs index d56c4a4c730..e311175ff2a 100644 --- a/json/src/spec/builtin.rs +++ b/json/src/spec/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/engine.rs b/json/src/spec/engine.rs index 850eb250223..d36327e7018 100644 --- a/json/src/spec/engine.rs +++ b/json/src/spec/engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/ethash.rs b/json/src/spec/ethash.rs index 752d6853e65..229ed77a37b 100644 --- a/json/src/spec/ethash.rs +++ b/json/src/spec/ethash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/genesis.rs b/json/src/spec/genesis.rs index 272e7bcc22d..c732a1293c7 100644 --- a/json/src/spec/genesis.rs +++ b/json/src/spec/genesis.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/mod.rs b/json/src/spec/mod.rs index f9de30170ee..19b9974d949 100644 --- a/json/src/spec/mod.rs +++ b/json/src/spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/params.rs b/json/src/spec/params.rs index aa634221d9f..88268631981 100644 --- a/json/src/spec/params.rs +++ b/json/src/spec/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/seal.rs b/json/src/spec/seal.rs index 0daea1ba476..eba75840ab1 100644 --- a/json/src/spec/seal.rs +++ b/json/src/spec/seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/spec.rs b/json/src/spec/spec.rs index 544407cb8d9..22d6b36d8cc 100644 --- a/json/src/spec/spec.rs +++ b/json/src/spec/spec.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/spec/state.rs b/json/src/spec/state.rs index bde3d6dd82f..cff03db5441 100644 --- a/json/src/spec/state.rs +++ b/json/src/spec/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/log.rs b/json/src/state/log.rs index 5fb3e469bd6..873de800840 100644 --- a/json/src/state/log.rs +++ b/json/src/state/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/mod.rs b/json/src/state/mod.rs index e0bced6ef93..2b06271decf 100644 --- a/json/src/state/mod.rs +++ b/json/src/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/state.rs b/json/src/state/state.rs index 3ddca43c7c1..4bdd424cd66 100644 --- a/json/src/state/state.rs +++ b/json/src/state/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/test.rs b/json/src/state/test.rs index 0d28232ef50..53c3eb11318 100644 --- a/json/src/state/test.rs +++ b/json/src/state/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/state/transaction.rs b/json/src/state/transaction.rs index 62b8577d4d2..722e9afa334 100644 --- a/json/src/state/transaction.rs +++ b/json/src/state/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/mod.rs b/json/src/transaction/mod.rs index cec6734b32f..b3bf34be327 100644 --- a/json/src/transaction/mod.rs +++ b/json/src/transaction/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/test.rs b/json/src/transaction/test.rs index 1ea54ff04fc..bf925a8f066 100644 --- a/json/src/transaction/test.rs +++ b/json/src/transaction/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/transaction.rs b/json/src/transaction/transaction.rs index 8898f723e73..a670eea7df9 100644 --- a/json/src/transaction/transaction.rs +++ b/json/src/transaction/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/transaction/txtest.rs b/json/src/transaction/txtest.rs index 059203453bb..b3d535b8b08 100644 --- a/json/src/transaction/txtest.rs +++ b/json/src/transaction/txtest.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/input.rs b/json/src/trie/input.rs index 326f42dba1b..b8cf3c26eb1 100644 --- a/json/src/trie/input.rs +++ b/json/src/trie/input.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/mod.rs b/json/src/trie/mod.rs index 1c5d3006744..28705d363b2 100644 --- a/json/src/trie/mod.rs +++ b/json/src/trie/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/test.rs b/json/src/trie/test.rs index 19becd5ee65..9d4d6bff9ac 100644 --- a/json/src/trie/test.rs +++ b/json/src/trie/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/trie/trie.rs b/json/src/trie/trie.rs index c0449859134..1eebe0d2862 100644 --- a/json/src/trie/trie.rs +++ b/json/src/trie/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/uint.rs b/json/src/uint.rs index 17493203fa8..f444da3268f 100644 --- a/json/src/uint.rs +++ b/json/src/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/call.rs b/json/src/vm/call.rs index ad226048e1e..598bb9e92da 100644 --- a/json/src/vm/call.rs +++ b/json/src/vm/call.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/env.rs b/json/src/vm/env.rs index 95365c0a8f4..93a4e70b4b1 100644 --- a/json/src/vm/env.rs +++ b/json/src/vm/env.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/log.rs b/json/src/vm/log.rs index b29325738a4..e8d02f5e3d5 100644 --- a/json/src/vm/log.rs +++ b/json/src/vm/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/mod.rs b/json/src/vm/mod.rs index ecc0d05a49b..5e7ff8348b8 100644 --- a/json/src/vm/mod.rs +++ b/json/src/vm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/test.rs b/json/src/vm/test.rs index e348826e1f5..e7e5254923d 100644 --- a/json/src/vm/test.rs +++ b/json/src/vm/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/transaction.rs b/json/src/vm/transaction.rs index d2ee8b89b60..c0c61afaf81 100644 --- a/json/src/vm/transaction.rs +++ b/json/src/vm/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/json/src/vm/vm.rs b/json/src/vm/vm.rs index b0a7c2a4bc5..b29430fda10 100644 --- a/json/src/vm/vm.rs +++ b/json/src/vm/vm.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/license_header b/license_header index d4ebdc4487a..50fed6b27f3 100644 --- a/license_header +++ b/license_header @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/logger/Cargo.toml b/logger/Cargo.toml index 590eb0b2da3..a22c748fba6 100644 --- a/logger/Cargo.toml +++ b/logger/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore client." name = "ethcore-logger" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] log = "0.3" diff --git a/logger/src/lib.rs b/logger/src/lib.rs index 377f5d4519d..78b6edca44d 100644 --- a/logger/src/lib.rs +++ b/logger/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/account.rs b/parity/account.rs index ae7e1f62b37..e790eb59695 100644 --- a/parity/account.rs +++ b/parity/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/blockchain.rs b/parity/blockchain.rs index ffbe1506807..f4bfbc8f74b 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/boot.rs b/parity/boot.rs index d930085db36..30349284d31 100644 --- a/parity/boot.rs +++ b/parity/boot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/cache.rs b/parity/cache.rs index d2fc30d6ed4..b8b324f67a1 100644 --- a/parity/cache.rs +++ b/parity/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index a9aa913295c..5cf395cdd01 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/cli/usage.rs b/parity/cli/usage.rs index 6dcbd645347..cd94e0299a0 100644 --- a/parity/cli/usage.rs +++ b/parity/cli/usage.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/configuration.rs b/parity/configuration.rs index e690437b902..df8366ab842 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/dapps.rs b/parity/dapps.rs index ec6fd884634..4eed929cad3 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/deprecated.rs b/parity/deprecated.rs index b9a80010125..d509c174a6b 100644 --- a/parity/deprecated.rs +++ b/parity/deprecated.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/dir.rs b/parity/dir.rs index b9c02efd69a..0a49cd528f4 100644 --- a/parity/dir.rs +++ b/parity/dir.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/helpers.rs b/parity/helpers.rs index 60a04bc4581..d1b1e402713 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/informant.rs b/parity/informant.rs index 31f5c3e81dc..18dff2cfac7 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/main.rs b/parity/main.rs index 9d627b363e3..fdf4ee396ae 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -25,7 +25,6 @@ extern crate docopt; extern crate num_cpus; extern crate rustc_serialize; -extern crate ethabi; extern crate ethcore_devtools as devtools; extern crate ethcore; extern crate ethsync; @@ -43,13 +42,14 @@ extern crate ethcore_ipc_nano as nanoipc; extern crate serde; extern crate serde_json; extern crate rlp; -extern crate ethcore_hash_fetch as hash_fetch; extern crate ethcore_light as light; +extern crate parity_hash_fetch as hash_fetch; extern crate ethcore_ipc_hypervisor as hypervisor; extern crate ethcore_rpc; extern crate ethcore_signer; +extern crate parity_updater as updater; extern crate ansi_term; extern crate regex; @@ -109,8 +109,6 @@ mod sync; #[cfg(feature="ipc")] mod boot; mod user_defaults; -mod updater; -mod operations; #[cfg(feature="stratum")] mod stratum; diff --git a/parity/migration.rs b/parity/migration.rs index 58e3b5ea990..8a6f4435a88 100644 --- a/parity/migration.rs +++ b/parity/migration.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/modules.rs b/parity/modules.rs index 5d1d66cd769..bf2eeb0fb0b 100644 --- a/parity/modules.rs +++ b/parity/modules.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/operations.rs b/parity/operations.rs deleted file mode 100644 index 2124884c7d8..00000000000 --- a/parity/operations.rs +++ /dev/null @@ -1,359 +0,0 @@ -// Autogenerated from JSON contract definition using Rust contract convertor. - -use std::string::String; -use std::result::Result; -use std::fmt; -use {util, ethabi}; -use util::{FixedHash, Uint}; - -pub struct Operations { - contract: ethabi::Contract, - address: util::Address, - do_call: Box) -> Result, String> + Send + Sync + 'static>, -} -impl Operations { - pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + Sync + 'static { - Operations { - contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_hard\",\"type\":\"bool\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"release\",\"outputs\":[{\"name\":\"o_forkBlock\",\"type\":\"uint32\"},{\"name\":\"o_track\",\"type\":\"uint8\"},{\"name\":\"o_semver\",\"type\":\"uint24\"},{\"name\":\"o_critical\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"build\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"client\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"fork\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"hard\",\"type\":\"bool\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"clientOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"grandOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"},{\"name\":\"_critical\",\"type\":\"bool\"}],\"name\":\"addRelease\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"}],\"name\":\"checksum\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"}]").expect("JSON is autogenerated; qed")), - address: address, - do_call: Box::new(do_call), - } - } - fn as_string(e: T) -> String { format!("{:?}", e) } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn reset_client_owner(&self, _client: &str, _new_owner: &util::Address) -> Result<(), String> { - let call = self.contract.function("resetClientOwner".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Address(_new_owner.clone().0)] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn is_latest(&self, _client: &str, _release: &util::H256) -> Result { - let call = self.contract.function("isLatest".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn reject_transaction(&self, _txid: &util::H256) -> Result<(), String> { - let call = self.contract.function("rejectTransaction".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned())] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn set_owner(&self, _new_owner: &util::Address) -> Result<(), String> { - let call = self.contract.function("setOwner".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::Address(_new_owner.clone().0)] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_hard","type":"bool"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn propose_fork(&self, _number: u32, _name: &util::H256, _hard: bool, _spec: &util::H256) -> Result<(), String> { - let call = self.contract.function("proposeFork".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::Bool(_hard), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn remove_client(&self, _client: &str) -> Result<(), String> { - let call = self.contract.function("removeClient".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned())] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"release","outputs":[{"name":"o_forkBlock","type":"uint32"},{"name":"o_track","type":"uint8"},{"name":"o_semver","type":"uint24"},{"name":"o_critical","type":"bool"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn release(&self, _client: &str, _release: &util::H256) -> Result<(u32, u8, u32, bool), String> { - let call = self.contract.function("release".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"build","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn build(&self, _client: &str, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { - let call = self.contract.function("build".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn reject_fork(&self) -> Result<(), String> { - let call = self.contract.function("rejectFork".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"client","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn client(&self, _1: &util::H256) -> Result<(util::Address, bool), String> { - let call = self.contract.function("client".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn set_client_owner(&self, _new_owner: &util::Address) -> Result<(), String> { - let call = self.contract.function("setClientOwner".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::Address(_new_owner.clone().0)] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"fork","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"hard","type":"bool"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn fork(&self, _1: u32) -> Result<(util::H256, util::H256, bool, bool, util::U256), String> { - let call = self.contract.function("fork".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_1 as u64).to_big_endian(&mut r); r })] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn add_checksum(&self, _release: &util::H256, _platform: &str, _checksum: &util::H256) -> Result<(), String> { - let call = self.contract.function("addChecksum".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn confirm_transaction(&self, _txid: &util::H256) -> Result { - let call = self.contract.function("confirmTransaction".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn proxy(&self, _1: &util::H256) -> Result<(util::U256, util::Address, Vec, util::U256, util::U256), String> { - let call = self.contract.function("proxy".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bytes().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn add_client(&self, _client: &str, _owner: &util::Address) -> Result<(), String> { - let call = self.contract.function("addClient".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Address(_owner.clone().0)] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"clientOwner","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn client_owner(&self, _1: &util::Address) -> Result { - let call = self.contract.function("clientOwner".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::Address(_1.clone().0)] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn propose_transaction(&self, _txid: &util::H256, _to: &util::Address, _data: &[u8], _value: util::U256, _gas: util::U256) -> Result { - let call = self.contract.function("proposeTransaction".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned()), ethabi::Token::Address(_to.clone().0), ethabi::Token::Bytes(_data.to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; _value.to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; _gas.to_big_endian(&mut r); r })] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"grandOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn grand_owner(&self) -> Result { - let call = self.contract.function("grandOwner".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"},{"name":"_critical","type":"bool"}],"name":"addRelease","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn add_release(&self, _release: &util::H256, _fork_block: u32, _track: u8, _semver: u32, _critical: bool) -> Result<(), String> { - let call = self.contract.function("addRelease".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_semver as u64).to_big_endian(&mut r); r }), ethabi::Token::Bool(_critical)] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn accept_fork(&self) -> Result<(), String> { - let call = self.contract.function("acceptFork".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn clients_required(&self) -> Result { - let call = self.contract.function("clientsRequired".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn track(&self, _client: &str, _release: &util::H256) -> Result { - let call = self.contract.function("track".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 })) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn set_client_required(&self, _client: &str, _r: bool) -> Result<(), String> { - let call = self.contract.function("setClientRequired".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Bool(_r)] - ).map_err(Self::as_string)?; - call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn latest_fork(&self) -> Result { - let call = self.contract.function("latestFork".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn latest_in_track(&self, _client: &str, _track: u8) -> Result { - let call = self.contract.function("latestInTrack".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r })] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"}],"name":"checksum","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn checksum(&self, _client: &str, _release: &util::H256, _platform: &str) -> Result { - let call = self.contract.function("checksum".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned())] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) - } - - /// Auto-generated from: `{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` - #[allow(dead_code)] - pub fn proposed_fork(&self) -> Result { - let call = self.contract.function("proposedFork".into()).map_err(Self::as_string)?; - let data = call.encode_call( - vec![] - ).map_err(Self::as_string)?; - let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; - let mut result = output.into_iter().rev().collect::>(); - Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) - } -} \ No newline at end of file diff --git a/parity/params.rs b/parity/params.rs index 25ddc8814a5..81db4165d3f 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/presale.rs b/parity/presale.rs index 0988324285f..7754e7e1867 100644 --- a/parity/presale.rs +++ b/parity/presale.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/rpc.rs b/parity/rpc.rs index 52a5bcc0f0b..2551b0736ef 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index 2d375fddee1..ffd50b76285 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ use ethcore::snapshot::SnapshotService; use ethsync::{ManageNetwork, SyncProvider}; use ethcore_rpc::{Extendable, NetworkSettings}; pub use ethcore_rpc::SignerService; - +use updater::Updater; #[derive(Debug, PartialEq, Clone, Eq, Hash)] pub enum Api { @@ -118,6 +118,7 @@ pub struct Dependencies { pub logger: Arc, pub settings: Arc, pub net_service: Arc, + pub updater: Arc, pub geth_compatibility: bool, pub dapps_interface: Option, pub dapps_port: Option, diff --git a/parity/run.rs b/parity/run.rs index 7a583a39d25..fffaecf7025 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -330,6 +330,7 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc) -> R logger: logger.clone(), settings: Arc::new(cmd.net_settings.clone()), net_service: manage_network.clone(), + updater: updater.clone(), geth_compatibility: cmd.geth_compatibility, dapps_interface: match cmd.dapps_conf.enabled { true => Some(cmd.dapps_conf.interface.clone()), diff --git a/parity/signer.rs b/parity/signer.rs index 6905fbb3cfd..d247453f1e0 100644 --- a/parity/signer.rs +++ b/parity/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/snapshot.rs b/parity/snapshot.rs index 804047596a0..2963e9b84d0 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/stratum.rs b/parity/stratum.rs index 32c7b8a5046..1e510ed4498 100644 --- a/parity/stratum.rs +++ b/parity/stratum.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/sync.rs b/parity/sync.rs index 17f183c80e9..cfc489a45a7 100644 --- a/parity/sync.rs +++ b/parity/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/updater.rs b/parity/updater.rs deleted file mode 100644 index a13ae32ff99..00000000000 --- a/parity/updater.rs +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -use std::sync::{Arc, Weak}; -use std::{fs, env}; -use std::io::Write; -use std::path::{PathBuf}; -use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; -use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; -use super::operations::Operations; -use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; -use hash_fetch::{self as fetch, HashFetch}; - -/// Filter for releases. -#[derive(Debug, Eq, PartialEq, Clone)] -pub enum UpdateFilter { - /// All releases following the same track. - All, - /// As with `All`, but only those which are known to be critical. - Critical, - /// None. - None, -} - -/// The policy for auto-updating. -#[derive(Debug, Eq, PartialEq, Clone)] -pub struct UpdatePolicy { - /// Download potential updates. - pub enable_downloading: bool, - /// Disable client if we know we're incapable of syncing. - pub require_consensus: bool, - /// Which of those downloaded should be automatically installed. - pub filter: UpdateFilter, -} - -impl Default for UpdatePolicy { - fn default() -> Self { - UpdatePolicy { - enable_downloading: false, - require_consensus: true, - filter: UpdateFilter::None, - } - } -} - -/// Information regarding a particular release of Parity -#[derive(Debug, Clone, PartialEq)] -pub struct ReleaseInfo { - /// Information on the version. - pub version: VersionInfo, - /// Does this release contain critical security updates? - pub is_critical: bool, - /// The latest fork that this release can handle. - pub fork: u64, - /// Our platform's binary, if known. - pub binary: Option, -} - -/// Information on our operations environment. -#[derive(Debug, Clone, PartialEq)] -pub struct OperationsInfo { - /// Our blockchain's latest fork. - pub fork: u64, - - /// Last fork our client supports, if known. - pub this_fork: Option, - - /// Information on our track's latest release. - pub track: ReleaseInfo, - /// Information on our minor version's latest release. - pub minor: Option, -} - -/// Information on the current version's consensus capabililty. -#[derive(Debug, Clone, Copy, PartialEq)] -pub enum CapState { - /// Unknown. - Unknown, - /// Capable of consensus indefinitely. - Capable, - /// Capable of consensus up until a definite block. - CapableUntil(u64), - /// Incapable of consensus since a particular block. - IncapableSince(u64), -} - -impl Default for CapState { - fn default() -> Self { CapState::Unknown } -} - -#[derive(Debug, Default)] -struct UpdaterState { - latest: Option, - - fetching: Option, - ready: Option, - installed: Option, - - capability: CapState, -} - -/// Service for checking for updates and determining whether we can achieve consensus. -pub struct Updater { - // Useful environmental stuff. - update_policy: UpdatePolicy, - weak_self: Mutex>, - client: Weak, - fetcher: Mutex>, - operations: Mutex>, - exit_handler: Mutex>>, - - // Our version info (static) - this: VersionInfo, - - // All the other info - this changes so leave it behind a Mutex. - state: Mutex, -} - -const CLIENT_ID: &'static str = "parity"; - -// TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -fn platform() -> String { - "test".to_owned() -} - -impl Updater { - pub fn new(client: Weak, update_policy: UpdatePolicy) -> Arc { - let mut u = Updater { - update_policy: update_policy, - weak_self: Mutex::new(Default::default()), - client: client.clone(), - fetcher: Mutex::new(None), - operations: Mutex::new(None), - exit_handler: Mutex::new(None), - this: VersionInfo::this(), - state: Mutex::new(Default::default()), - }; - - // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - if u.this.track == ReleaseTrack::Unknown { - u.this.track = ReleaseTrack::Nightly; - } - - let r = Arc::new(u); - *r.fetcher.lock() = Some(fetch::Client::new(r.clone())); - *r.weak_self.lock() = Arc::downgrade(&r); - - r.poll(); - - r - } - - /// Is the currently running client capable of supporting the current chain? - /// We default to true if there's no clear information. - pub fn capability(&self) -> CapState { - self.state.lock().capability - } - - /// The release which is ready to be upgraded to, if any. If this returns `Some`, then - /// `execute_upgrade` may be called. - pub fn upgrade_ready(&self) -> Option { - self.state.lock().ready.clone() - } - - /// Actually upgrades the client. Assumes that the binary has been downloaded. - /// @returns `true` on success. - pub fn execute_upgrade(&self) -> bool { - (|| -> Result { - let mut s = self.state.lock(); - if let Some(r) = s.ready.take() { - let p = Self::update_file_name(&r.version); - let n = Self::updates_path("latest"); - // TODO: creating then writing is a bit fragile. would be nice to make it atomic. - match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { - Ok(_) => { - info!("Completed upgrade to {}", &r.version); - s.installed = Some(r); - if let Some(ref h) = *self.exit_handler.lock() { - (*h)(); - } - Ok(true) - } - Err(e) => { - s.ready = Some(r); - Err(format!("Unable to create soft-link for update {:?}", e)) - } - } - } else { - warn!("Execute upgrade called when no upgrade ready."); - Ok(false) - } - })().unwrap_or_else(|e| { warn!("{}", e); false }) - } - - /// Our version info. - pub fn version_info(&self) -> &VersionInfo { &self.this } - - /// Information gathered concerning the release. - pub fn info(&self) -> Option { self.state.lock().latest.clone() } - - /// Set a closure to call when we want to restart the client - pub fn set_exit_handler(&self, f: F) where F: Fn() + 'static + Send { - *self.exit_handler.lock() = Some(Box::new(f)); - } - - fn collect_release_info(operations: &Operations, release_id: &H256) -> Result { - let (fork, track, semver, is_critical) = operations.release(CLIENT_ID, release_id)?; - let latest_binary = operations.checksum(CLIENT_ID, release_id, &platform())?; - Ok(ReleaseInfo { - version: VersionInfo::from_raw(semver, track, release_id.clone().into()), - is_critical: is_critical, - fork: fork as u64, - binary: if latest_binary.is_zero() { None } else { Some(latest_binary) }, - }) - } - - fn collect_latest(&self) -> Result { - if let Some(ref operations) = *self.operations.lock() { - let this_fork = operations.release(CLIENT_ID, &self.this.hash.into()).ok() - .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); - - if self.this.track == ReleaseTrack::Unknown { - return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); - } - - let latest_in_track = operations.latest_in_track(CLIENT_ID, self.this.track.into())?; - let in_track = Self::collect_release_info(operations, &latest_in_track)?; - let mut in_minor = Some(in_track.clone()); - const PROOF: &'static str = "in_minor initialised and assigned with Some; loop breaks if None assigned; qed"; - while in_minor.as_ref().expect(PROOF).version.track != self.this.track { - let track = match in_minor.as_ref().expect(PROOF).version.track { - ReleaseTrack::Beta => ReleaseTrack::Stable, - ReleaseTrack::Nightly => ReleaseTrack::Beta, - _ => { in_minor = None; break; } - }; - in_minor = Some(Self::collect_release_info(operations, &operations.latest_in_track(CLIENT_ID, track.into())?)?); - } - - Ok(OperationsInfo { - fork: operations.latest_fork()? as u64, - this_fork: this_fork, - track: in_track, - minor: in_minor, - }) - } else { - Err("Operations not available".into()) - } - } - - fn update_file_name(v: &VersionInfo) -> String { - format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash) - } - - fn updates_path(name: &str) -> PathBuf { - let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); - dest.push(".parity-updates"); - dest.push(name); - dest - } - - fn fetch_done(&self, result: Result) { - (|| -> Result<(), String> { - let auto = { - let mut s = self.state.lock(); - let fetched = s.fetching.take().unwrap(); - let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; - info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); - let dest = Self::updates_path(&Self::update_file_name(&fetched.version)); - fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; - fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; - info!("Copied file to {}", dest.display()); - let auto = match self.update_policy.filter { - UpdateFilter::All => true, - UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, - _ => false, - }; - s.ready = Some(fetched); - auto - }; - if auto { - // will lock self.state, so ensure it's outside of previous block. - self.execute_upgrade(); - } - Ok(()) - })().unwrap_or_else(|e| warn!("{}", e)); - } - - fn poll(&self) { - info!(target: "updater", "Current release is {}", self.this); - - if self.operations.lock().is_none() { - if let Some(ops_addr) = self.client.upgrade().and_then(|c| c.registry_address("operations".into())) { - trace!(target: "client", "Found operations at {}", ops_addr); - let client = self.client.clone(); - *self.operations.lock() = Some(Operations::new(ops_addr, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d)))); - } else { - // No Operations contract - bail. - return; - } - } - - let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); - - let mut capability = CapState::Unknown; - let latest = self.collect_latest().ok(); - if let Some(ref latest) = latest { - info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", - latest.track.version, - if latest.track.is_critical {""} else {"non-"}, - platform(), - if let Some(ref b) = latest.track.binary { - format!("{}", b) - } else { - "unreleased".into() - } - ); - let mut s = self.state.lock(); - let running_latest = latest.track.version.hash == self.version_info().hash; - let already_have_latest = s.installed.as_ref().or(s.ready.as_ref()).map_or(false, |t| *t == latest.track); - if self.update_policy.enable_downloading && !running_latest && !already_have_latest { - if let Some(b) = latest.track.binary { - if s.fetching.is_none() { - info!("Attempting to get parity binary {}", b); - s.fetching = Some(latest.track.clone()); - let weak_self = self.weak_self.lock().clone(); - let f = move |r: Result| if let Some(this) = weak_self.upgrade() { this.fetch_done(r) }; - self.fetcher.lock().as_ref().expect("Created on `new`; qed").fetch(b, Box::new(f)).ok(); - } - } - } - info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); - - if let Some(this_fork) = latest.this_fork { - if this_fork < latest.fork { - // We're behind the latest fork. Now is the time to be upgrading; perhaps we're too late... - if let Some(c) = self.client.upgrade() { - let current_number = c.block_number(BlockId::Latest).unwrap_or(0); - if current_number >= latest.fork - 1 { - // We're at (or past) the last block we can import. Disable the client. - if self.update_policy.require_consensus { - c.disable(); - } - capability = CapState::IncapableSince(latest.fork); - } else { - capability = CapState::CapableUntil(latest.fork); - } - } - } else { - capability = CapState::Capable; - } - } - } - - let mut s = self.state.lock(); - s.latest = latest; - s.capability = capability; - } -} - -impl ChainNotify for Updater { - fn new_blocks(&self, _imported: Vec, _invalid: Vec, _enacted: Vec, _retracted: Vec, _sealed: Vec, _duration: u64) { - // TODO: something like this -// if !self.client.upgrade().map_or(true, |c| c.is_major_syncing()) { - self.poll(); -// } - } -} - -impl fetch::urlhint::ContractClient for Updater { - fn registrar(&self) -> Result { - self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? - .registrar_address() - .ok_or_else(|| "Registrar not available".into()) - } - - fn call(&self, address: Address, data: Bytes) -> Result { - self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? - .call_contract(address, data) - } -} diff --git a/parity/upgrade.rs b/parity/upgrade.rs index 7e5b73622e5..401f6a722a1 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/url.rs b/parity/url.rs index fca7c6620b6..285b024c6de 100644 --- a/parity/url.rs +++ b/parity/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/parity/user_defaults.rs b/parity/user_defaults.rs index 652abfea10d..20c6244bb4d 100644 --- a/parity/user_defaults.rs +++ b/parity/user_defaults.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index dcdf6832501..5d974e59ffd 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore jsonrpc" name = "ethcore-rpc" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] build = "build.rs" [lib] diff --git a/rpc/build.rs b/rpc/build.rs index 1d1a9c19df5..0474e860592 100644 --- a/rpc/build.rs +++ b/rpc/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/rpctest/Cargo.toml b/rpc/rpctest/Cargo.toml index 19c7feb7c6a..461746001fa 100644 --- a/rpc/rpctest/Cargo.toml +++ b/rpc/rpctest/Cargo.toml @@ -3,7 +3,7 @@ description = "Rpc test client." name = "rpctest" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" } diff --git a/rpc/rpctest/src/main.rs b/rpc/rpctest/src/main.rs index dd4a9a35526..2e4bf7d4d28 100644 --- a/rpc/rpctest/src/main.rs +++ b/rpc/rpctest/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index e02a1850990..bbd4a51646a 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/auto_args.rs b/rpc/src/v1/helpers/auto_args.rs index ce1e6854ad1..9c4e1d74aa5 100644 --- a/rpc/src/v1/helpers/auto_args.rs +++ b/rpc/src/v1/helpers/auto_args.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/block_import.rs b/rpc/src/v1/helpers/block_import.rs index 4bb2920ed4c..5e78b2d9d87 100644 --- a/rpc/src/v1/helpers/block_import.rs +++ b/rpc/src/v1/helpers/block_import.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/dispatch.rs b/rpc/src/v1/helpers/dispatch.rs index a66bc816de1..93e99646be4 100644 --- a/rpc/src/v1/helpers/dispatch.rs +++ b/rpc/src/v1/helpers/dispatch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/errors.rs b/rpc/src/v1/helpers/errors.rs index 673987084d5..68f99795ab8 100644 --- a/rpc/src/v1/helpers/errors.rs +++ b/rpc/src/v1/helpers/errors.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/mod.rs b/rpc/src/v1/helpers/mod.rs index d5f64dde9f2..3c6d1a739d5 100644 --- a/rpc/src/v1/helpers/mod.rs +++ b/rpc/src/v1/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/network_settings.rs b/rpc/src/v1/helpers/network_settings.rs index 9847e975759..934092ec5c0 100644 --- a/rpc/src/v1/helpers/network_settings.rs +++ b/rpc/src/v1/helpers/network_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/params.rs b/rpc/src/v1/helpers/params.rs index f56c500fc5c..b533c1b89fd 100644 --- a/rpc/src/v1/helpers/params.rs +++ b/rpc/src/v1/helpers/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/poll_manager.rs b/rpc/src/v1/helpers/poll_manager.rs index bc35188305d..c695eae8c81 100644 --- a/rpc/src/v1/helpers/poll_manager.rs +++ b/rpc/src/v1/helpers/poll_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/requests.rs b/rpc/src/v1/helpers/requests.rs index 7c5e89b873a..7249e4c4a98 100644 --- a/rpc/src/v1/helpers/requests.rs +++ b/rpc/src/v1/helpers/requests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/signer.rs b/rpc/src/v1/helpers/signer.rs index 11f8e3376ff..e208602a506 100644 --- a/rpc/src/v1/helpers/signer.rs +++ b/rpc/src/v1/helpers/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/helpers/signing_queue.rs b/rpc/src/v1/helpers/signing_queue.rs index 144e672c1bd..03489bad73d 100644 --- a/rpc/src/v1/helpers/signing_queue.rs +++ b/rpc/src/v1/helpers/signing_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index d68d59e59d9..97134951c1c 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index 695ff525159..42e82a291a0 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/mod.rs b/rpc/src/v1/impls/mod.rs index e4083ca958c..485b2cae579 100644 --- a/rpc/src/v1/impls/mod.rs +++ b/rpc/src/v1/impls/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/net.rs b/rpc/src/v1/impls/net.rs index f0e836fb7e3..3855bd8d4b2 100644 --- a/rpc/src/v1/impls/net.rs +++ b/rpc/src/v1/impls/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index 74f467e5eda..1f995749a11 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/parity_accounts.rs b/rpc/src/v1/impls/parity_accounts.rs index 188e2290e82..bf53c727310 100644 --- a/rpc/src/v1/impls/parity_accounts.rs +++ b/rpc/src/v1/impls/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index 92de99a1ff5..b63adaa6704 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/personal.rs b/rpc/src/v1/impls/personal.rs index 1515e3fa1e1..cc4a40d4a5d 100644 --- a/rpc/src/v1/impls/personal.rs +++ b/rpc/src/v1/impls/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/rpc.rs b/rpc/src/v1/impls/rpc.rs index 7f92c1ed9a7..6e62bb17c5f 100644 --- a/rpc/src/v1/impls/rpc.rs +++ b/rpc/src/v1/impls/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/signer.rs b/rpc/src/v1/impls/signer.rs index f13a3d03781..6e09a5ec819 100644 --- a/rpc/src/v1/impls/signer.rs +++ b/rpc/src/v1/impls/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/signing.rs b/rpc/src/v1/impls/signing.rs index 262e04dfb50..4ee44bb263c 100644 --- a/rpc/src/v1/impls/signing.rs +++ b/rpc/src/v1/impls/signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/signing_unsafe.rs b/rpc/src/v1/impls/signing_unsafe.rs index 46ffe6dedbb..992bb85b0bb 100644 --- a/rpc/src/v1/impls/signing_unsafe.rs +++ b/rpc/src/v1/impls/signing_unsafe.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/traces.rs b/rpc/src/v1/impls/traces.rs index 0b287ce2994..2fd912284d0 100644 --- a/rpc/src/v1/impls/traces.rs +++ b/rpc/src/v1/impls/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/impls/web3.rs b/rpc/src/v1/impls/web3.rs index 2e8f990067a..d81f628b613 100644 --- a/rpc/src/v1/impls/web3.rs +++ b/rpc/src/v1/impls/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/mod.rs b/rpc/src/v1/mod.rs index 966a87f2626..2942d81ed02 100644 --- a/rpc/src/v1/mod.rs +++ b/rpc/src/v1/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/fetch.rs b/rpc/src/v1/tests/helpers/fetch.rs index 98d888a1056..bdf9ea65b4b 100644 --- a/rpc/src/v1/tests/helpers/fetch.rs +++ b/rpc/src/v1/tests/helpers/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index 39fba8406e0..132e2a5e063 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/mod.rs b/rpc/src/v1/tests/helpers/mod.rs index 321a9717e4c..ce0f40271ea 100644 --- a/rpc/src/v1/tests/helpers/mod.rs +++ b/rpc/src/v1/tests/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/snapshot_service.rs b/rpc/src/v1/tests/helpers/snapshot_service.rs index b78aa374d66..9edc164a8be 100644 --- a/rpc/src/v1/tests/helpers/snapshot_service.rs +++ b/rpc/src/v1/tests/helpers/snapshot_service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/helpers/sync_provider.rs b/rpc/src/v1/tests/helpers/sync_provider.rs index 8800d926a82..039ca4c3d61 100644 --- a/rpc/src/v1/tests/helpers/sync_provider.rs +++ b/rpc/src/v1/tests/helpers/sync_provider.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index 7a7a1f682c3..f84f4d53ee2 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/manage_network.rs b/rpc/src/v1/tests/mocked/manage_network.rs index 2a1cfb6d4c6..03bae523a6b 100644 --- a/rpc/src/v1/tests/mocked/manage_network.rs +++ b/rpc/src/v1/tests/mocked/manage_network.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/mod.rs b/rpc/src/v1/tests/mocked/mod.rs index a7d7156b4b9..0ba0fc95c98 100644 --- a/rpc/src/v1/tests/mocked/mod.rs +++ b/rpc/src/v1/tests/mocked/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/net.rs b/rpc/src/v1/tests/mocked/net.rs index 37ef84fca97..1c4a4c1ac80 100644 --- a/rpc/src/v1/tests/mocked/net.rs +++ b/rpc/src/v1/tests/mocked/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 9b4daaccd7f..01bc37ad3a1 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/parity_accounts.rs b/rpc/src/v1/tests/mocked/parity_accounts.rs index 8b42500e6cf..a30b6c43c10 100644 --- a/rpc/src/v1/tests/mocked/parity_accounts.rs +++ b/rpc/src/v1/tests/mocked/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index 55f1556930d..d05c1277082 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/personal.rs b/rpc/src/v1/tests/mocked/personal.rs index ea4973ee49f..c2984240f5d 100644 --- a/rpc/src/v1/tests/mocked/personal.rs +++ b/rpc/src/v1/tests/mocked/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/rpc.rs b/rpc/src/v1/tests/mocked/rpc.rs index 44406f4e3a4..52ba7885953 100644 --- a/rpc/src/v1/tests/mocked/rpc.rs +++ b/rpc/src/v1/tests/mocked/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/signer.rs b/rpc/src/v1/tests/mocked/signer.rs index c87abb7eb2e..3537717d4a9 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 31a70044311..526360f0fe4 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/tests/mocked/web3.rs b/rpc/src/v1/tests/mocked/web3.rs index c3bd79110cd..c7ad42426a3 100644 --- a/rpc/src/v1/tests/mocked/web3.rs +++ b/rpc/src/v1/tests/mocked/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/eth.rs b/rpc/src/v1/traits/eth.rs index 64a87c17597..14ee8ca62d7 100644 --- a/rpc/src/v1/traits/eth.rs +++ b/rpc/src/v1/traits/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/eth_signing.rs b/rpc/src/v1/traits/eth_signing.rs index 09f8c5e0318..4f8dc5b1ba3 100644 --- a/rpc/src/v1/traits/eth_signing.rs +++ b/rpc/src/v1/traits/eth_signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/mod.rs b/rpc/src/v1/traits/mod.rs index 86b55b7c09b..ba84d32e4a7 100644 --- a/rpc/src/v1/traits/mod.rs +++ b/rpc/src/v1/traits/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/net.rs b/rpc/src/v1/traits/net.rs index 36bd8be7039..a3427082657 100644 --- a/rpc/src/v1/traits/net.rs +++ b/rpc/src/v1/traits/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 18440b65497..ba651416836 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity_accounts.rs b/rpc/src/v1/traits/parity_accounts.rs index 6cfe1bf7bcc..e4393c1493e 100644 --- a/rpc/src/v1/traits/parity_accounts.rs +++ b/rpc/src/v1/traits/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index c40abd01f42..486f7fb4245 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/parity_signing.rs b/rpc/src/v1/traits/parity_signing.rs index d97b9882bea..5eb5ff8b307 100644 --- a/rpc/src/v1/traits/parity_signing.rs +++ b/rpc/src/v1/traits/parity_signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/personal.rs b/rpc/src/v1/traits/personal.rs index 6ba0f28f9db..edb1a9d79b9 100644 --- a/rpc/src/v1/traits/personal.rs +++ b/rpc/src/v1/traits/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/rpc.rs b/rpc/src/v1/traits/rpc.rs index 2109442a71a..a03d67b55c3 100644 --- a/rpc/src/v1/traits/rpc.rs +++ b/rpc/src/v1/traits/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/signer.rs b/rpc/src/v1/traits/signer.rs index eafa520d447..5a18fe29328 100644 --- a/rpc/src/v1/traits/signer.rs +++ b/rpc/src/v1/traits/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/traces.rs b/rpc/src/v1/traits/traces.rs index 64d16c5b427..0440b4dff49 100644 --- a/rpc/src/v1/traits/traces.rs +++ b/rpc/src/v1/traits/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/traits/web3.rs b/rpc/src/v1/traits/web3.rs index fc1f50b9b39..efe26e30752 100644 --- a/rpc/src/v1/traits/web3.rs +++ b/rpc/src/v1/traits/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/block.rs b/rpc/src/v1/types/block.rs index 5aab6ced839..6dd441ee825 100644 --- a/rpc/src/v1/types/block.rs +++ b/rpc/src/v1/types/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/block_number.rs b/rpc/src/v1/types/block_number.rs index 0a2b2f30572..00ee1f22bb9 100644 --- a/rpc/src/v1/types/block_number.rs +++ b/rpc/src/v1/types/block_number.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/bytes.rs b/rpc/src/v1/types/bytes.rs index 57ff9f22e01..d9a3468364c 100644 --- a/rpc/src/v1/types/bytes.rs +++ b/rpc/src/v1/types/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/call_request.rs b/rpc/src/v1/types/call_request.rs index 015811273c5..f457359c5b8 100644 --- a/rpc/src/v1/types/call_request.rs +++ b/rpc/src/v1/types/call_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/confirmations.rs b/rpc/src/v1/types/confirmations.rs index f6901842270..fd81bf6e726 100644 --- a/rpc/src/v1/types/confirmations.rs +++ b/rpc/src/v1/types/confirmations.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/dapp_id.rs b/rpc/src/v1/types/dapp_id.rs index 04aa80e3ad8..fbd016e8a0a 100644 --- a/rpc/src/v1/types/dapp_id.rs +++ b/rpc/src/v1/types/dapp_id.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/filter.rs b/rpc/src/v1/types/filter.rs index 5254b1602dd..6ef57b7a7ee 100644 --- a/rpc/src/v1/types/filter.rs +++ b/rpc/src/v1/types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/hash.rs b/rpc/src/v1/types/hash.rs index 3db0cf124bb..cc4532e7ce2 100644 --- a/rpc/src/v1/types/hash.rs +++ b/rpc/src/v1/types/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/histogram.rs b/rpc/src/v1/types/histogram.rs index f7bb5525af2..9a1043e0e80 100644 --- a/rpc/src/v1/types/histogram.rs +++ b/rpc/src/v1/types/histogram.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/index.rs b/rpc/src/v1/types/index.rs index d7b17aea21e..65bd681c286 100644 --- a/rpc/src/v1/types/index.rs +++ b/rpc/src/v1/types/index.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/log.rs b/rpc/src/v1/types/log.rs index b945de6eae0..f5e7faca50c 100644 --- a/rpc/src/v1/types/log.rs +++ b/rpc/src/v1/types/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/mod.rs b/rpc/src/v1/types/mod.rs index c1bc3440796..984e38bcd96 100644 --- a/rpc/src/v1/types/mod.rs +++ b/rpc/src/v1/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/mod.rs.in b/rpc/src/v1/types/mod.rs.in index 364fa53d383..c5509bd575f 100644 --- a/rpc/src/v1/types/mod.rs.in +++ b/rpc/src/v1/types/mod.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/receipt.rs b/rpc/src/v1/types/receipt.rs index 24170a14cc1..1b98b108621 100644 --- a/rpc/src/v1/types/receipt.rs +++ b/rpc/src/v1/types/receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/rpc_settings.rs b/rpc/src/v1/types/rpc_settings.rs index de8f90410e5..87ca245b6e3 100644 --- a/rpc/src/v1/types/rpc_settings.rs +++ b/rpc/src/v1/types/rpc_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/sync.rs b/rpc/src/v1/types/sync.rs index 6f8938be955..3e40ecb857e 100644 --- a/rpc/src/v1/types/sync.rs +++ b/rpc/src/v1/types/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/trace.rs b/rpc/src/v1/types/trace.rs index ace76827c04..5ba166010b9 100644 --- a/rpc/src/v1/types/trace.rs +++ b/rpc/src/v1/types/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/trace_filter.rs b/rpc/src/v1/types/trace_filter.rs index 2517b15850e..b9a4c495181 100644 --- a/rpc/src/v1/types/trace_filter.rs +++ b/rpc/src/v1/types/trace_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/transaction.rs b/rpc/src/v1/types/transaction.rs index 933a4a482bd..31374e91203 100644 --- a/rpc/src/v1/types/transaction.rs +++ b/rpc/src/v1/types/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/transaction_request.rs b/rpc/src/v1/types/transaction_request.rs index a4f8e638755..258346d5626 100644 --- a/rpc/src/v1/types/transaction_request.rs +++ b/rpc/src/v1/types/transaction_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/uint.rs b/rpc/src/v1/types/uint.rs index 245348709c6..2dc9093c110 100644 --- a/rpc/src/v1/types/uint.rs +++ b/rpc/src/v1/types/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/rpc/src/v1/types/work.rs b/rpc/src/v1/types/work.rs index 0817eb24aa8..559edac597a 100644 --- a/rpc/src/v1/types/work.rs +++ b/rpc/src/v1/types/work.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/Cargo.toml b/signer/Cargo.toml index 78fda12be9c..abf5d7755bf 100644 --- a/signer/Cargo.toml +++ b/signer/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore Trusted Signer" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-signer" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/signer/build.rs b/signer/build.rs index 41b9a1b3eca..28cd9ef697c 100644 --- a/signer/build.rs +++ b/signer/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/authcode_store.rs b/signer/src/authcode_store.rs index 55c0fcb1536..3752923fa2e 100644 --- a/signer/src/authcode_store.rs +++ b/signer/src/authcode_store.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/lib.rs b/signer/src/lib.rs index f05d8c62533..3d73b0668fb 100644 --- a/signer/src/lib.rs +++ b/signer/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/tests/mod.rs b/signer/src/tests/mod.rs index e80b5778d12..043b0f693f1 100644 --- a/signer/src/tests/mod.rs +++ b/signer/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/ws_server/mod.rs b/signer/src/ws_server/mod.rs index 697fbd4c7aa..2617150368f 100644 --- a/signer/src/ws_server/mod.rs +++ b/signer/src/ws_server/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/signer/src/ws_server/session.rs b/signer/src/ws_server/session.rs index deb791b54e7..77699fa93e3 100644 --- a/signer/src/ws_server/session.rs +++ b/signer/src/ws_server/session.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/stratum/Cargo.toml b/stratum/Cargo.toml index f3ff1bc8e81..daf7aa15c44 100644 --- a/stratum/Cargo.toml +++ b/stratum/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore stratum lib" name = "ethcore-stratum" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/stratum/build.rs b/stratum/build.rs index 61fa5098f83..692af322e93 100644 --- a/stratum/build.rs +++ b/stratum/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/stratum/src/lib.rs b/stratum/src/lib.rs index 45d8a36397b..7a5761aae6d 100644 --- a/stratum/src/lib.rs +++ b/stratum/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/stratum/src/traits.rs b/stratum/src/traits.rs index 5e93a948498..98a6ba7636e 100644 --- a/stratum/src/traits.rs +++ b/stratum/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 484d4bb1746..e22e504353a 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore blockchain sync" name = "ethsync" version = "1.5.0" license = "GPL-3.0" -authors = ["Ethcore "] build = "build.rs" [lib] diff --git a/sync/build.rs b/sync/build.rs index 1e08ae652aa..f41135a6726 100644 --- a/sync/build.rs +++ b/sync/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/api.rs b/sync/src/api.rs index 7c531bf7c8a..b4a45c74d74 100644 --- a/sync/src/api.rs +++ b/sync/src/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/block_sync.rs b/sync/src/block_sync.rs index 79c7a65a953..c2ff1245792 100644 --- a/sync/src/block_sync.rs +++ b/sync/src/block_sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/blocks.rs b/sync/src/blocks.rs index bcb9973dca8..686b4921891 100644 --- a/sync/src/blocks.rs +++ b/sync/src/blocks.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/chain.rs b/sync/src/chain.rs index c6e123b3f82..7b9257c6ccb 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/lib.rs b/sync/src/lib.rs index fa57a3e1646..0ff3bfe669f 100644 --- a/sync/src/lib.rs +++ b/sync/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/snapshot.rs b/sync/src/snapshot.rs index 9f42621059d..7ec87bf01d6 100644 --- a/sync/src/snapshot.rs +++ b/sync/src/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/sync_io.rs b/sync/src/sync_io.rs index e9e2d3396f6..34ee6d7f576 100644 --- a/sync/src/sync_io.rs +++ b/sync/src/sync_io.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/chain.rs b/sync/src/tests/chain.rs index 02b9063fafb..3d0c17fff18 100644 --- a/sync/src/tests/chain.rs +++ b/sync/src/tests/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/consensus.rs b/sync/src/tests/consensus.rs index 00a036a5446..b96997d1e4e 100644 --- a/sync/src/tests/consensus.rs +++ b/sync/src/tests/consensus.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/helpers.rs b/sync/src/tests/helpers.rs index d2eed9374da..af9118431ec 100644 --- a/sync/src/tests/helpers.rs +++ b/sync/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/mod.rs b/sync/src/tests/mod.rs index ef1ca4bab5c..3b23075181f 100644 --- a/sync/src/tests/mod.rs +++ b/sync/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/rpc.rs b/sync/src/tests/rpc.rs index f600130c1f4..e5b2722b6fb 100644 --- a/sync/src/tests/rpc.rs +++ b/sync/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/tests/snapshot.rs b/sync/src/tests/snapshot.rs index 283d59ee3ae..96a801669d6 100644 --- a/sync/src/tests/snapshot.rs +++ b/sync/src/tests/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/sync/src/transactions_stats.rs b/sync/src/transactions_stats.rs index 8c5eb6dda68..d5b78610d3a 100644 --- a/sync/src/transactions_stats.rs +++ b/sync/src/transactions_stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/Cargo.toml b/util/Cargo.toml index 3458117c4f2..c9f347bfbea 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore utility library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-util" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [dependencies] diff --git a/util/benches/bigint.rs b/util/benches/bigint.rs index 00a565e20e9..5f35f52ae79 100644 --- a/util/benches/bigint.rs +++ b/util/benches/bigint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/benches/rlp.rs b/util/benches/rlp.rs index 23ae4d8294b..d446f22cfac 100644 --- a/util/benches/rlp.rs +++ b/util/benches/rlp.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/benches/trie.rs b/util/benches/trie.rs index 9251390323f..0364a39ee41 100644 --- a/util/benches/trie.rs +++ b/util/benches/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/Cargo.toml b/util/bigint/Cargo.toml index 3b6b852cb9f..2b8d8313dc4 100644 --- a/util/bigint/Cargo.toml +++ b/util/bigint/Cargo.toml @@ -1,11 +1,11 @@ [package] description = "Large fixed-size integers and hash function outputs" -homepage = "http://ethcore.io" +homepage = "http://parity.io" repository = "https://github.com/ethcore/parity" license = "GPL-3.0" name = "ethcore-bigint" version = "0.1.2" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/util/bigint/build.rs b/util/bigint/build.rs index 24882322910..2c945a24c1c 100644 --- a/util/bigint/build.rs +++ b/util/bigint/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/src/hash.rs b/util/bigint/src/hash.rs index 20cdbae03cd..29274fc5241 100644 --- a/util/bigint/src/hash.rs +++ b/util/bigint/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/src/lib.rs b/util/bigint/src/lib.rs index 0df69256ce7..30b47a24cbd 100644 --- a/util/bigint/src/lib.rs +++ b/util/bigint/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bigint/src/uint.rs b/util/bigint/src/uint.rs index c0b6e098739..e2c06b664e6 100644 --- a/util/bigint/src/uint.rs +++ b/util/bigint/src/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/bloom/Cargo.toml b/util/bloom/Cargo.toml index c1d6f763876..99464879fac 100644 --- a/util/bloom/Cargo.toml +++ b/util/bloom/Cargo.toml @@ -1,7 +1,7 @@ [project] name = "ethcore-bloom-journal" version = "0.1.0" -authors = ["Ethcore"] +authors = ["Parity Technologies "] description = "Journaling bloom filter" license = "GPL3" diff --git a/util/bloom/src/lib.rs b/util/bloom/src/lib.rs index d5451f7218e..6388ce037b5 100644 --- a/util/bloom/src/lib.rs +++ b/util/bloom/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/build.rs b/util/build.rs index 1ec89f704d4..da28015e236 100644 --- a/util/build.rs +++ b/util/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/fetch/Cargo.toml b/util/fetch/Cargo.toml index 663d167bf4b..6f014a27db9 100644 --- a/util/fetch/Cargo.toml +++ b/util/fetch/Cargo.toml @@ -1,17 +1,17 @@ [package] description = "HTTP/HTTPS fetching library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "fetch" version = "0.1.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] log = "0.3" rand = "0.3" hyper = { default-features = false, git = "https://github.com/ethcore/hyper" } https-fetch = { path = "../https-fetch" } -clippy = { version = "0.0.90", optional = true} +clippy = { version = "0.0.90", optional = true } [features] default = [] diff --git a/util/fetch/src/client.rs b/util/fetch/src/client.rs index bb8842a5b21..7ee54425266 100644 --- a/util/fetch/src/client.rs +++ b/util/fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/fetch/src/fetch_file.rs b/util/fetch/src/fetch_file.rs index 4801cc96965..84b2270eb01 100644 --- a/util/fetch/src/fetch_file.rs +++ b/util/fetch/src/fetch_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/fetch/src/lib.rs b/util/fetch/src/lib.rs index 8ec9e0ddd94..bd117a6d241 100644 --- a/util/fetch/src/lib.rs +++ b/util/fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/Cargo.toml b/util/https-fetch/Cargo.toml index b40cf894354..b45904f3a1a 100644 --- a/util/https-fetch/Cargo.toml +++ b/util/https-fetch/Cargo.toml @@ -1,13 +1,14 @@ [package] description = "HTTPS fetching library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "https-fetch" version = "0.1.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] log = "0.3" +ethabi = "0.2.2" mio = { git = "https://github.com/ethcore/mio", branch = "v0.5.x" } rustls = { git = "https://github.com/ctz/rustls" } clippy = { version = "0.0.85", optional = true} diff --git a/util/https-fetch/src/client.rs b/util/https-fetch/src/client.rs index 19f2f3e16c9..e167ce31b9e 100644 --- a/util/https-fetch/src/client.rs +++ b/util/https-fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/http.rs b/util/https-fetch/src/http.rs index f21e2d40602..cf743b546cb 100644 --- a/util/https-fetch/src/http.rs +++ b/util/https-fetch/src/http.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/lib.rs b/util/https-fetch/src/lib.rs index edd1186d055..d941129a82d 100644 --- a/util/https-fetch/src/lib.rs +++ b/util/https-fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/tlsclient.rs b/util/https-fetch/src/tlsclient.rs index dd6f50bba5d..5ac19ad152e 100644 --- a/util/https-fetch/src/tlsclient.rs +++ b/util/https-fetch/src/tlsclient.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/https-fetch/src/url.rs b/util/https-fetch/src/url.rs index 3931d946815..d5df0788fa4 100644 --- a/util/https-fetch/src/url.rs +++ b/util/https-fetch/src/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/Cargo.toml b/util/io/Cargo.toml index 0a7adaf5652..ce20830f101 100644 --- a/util/io/Cargo.toml +++ b/util/io/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore IO library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-io" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] mio = { git = "https://github.com/ethcore/mio" } diff --git a/util/io/src/lib.rs b/util/io/src/lib.rs index 99282d9d8ff..fa01cef43f7 100644 --- a/util/io/src/lib.rs +++ b/util/io/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/panics.rs b/util/io/src/panics.rs index f67e925a7df..06371c04ce8 100644 --- a/util/io/src/panics.rs +++ b/util/io/src/panics.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/service.rs b/util/io/src/service.rs index 6086acadd4c..d9650a94af3 100644 --- a/util/io/src/service.rs +++ b/util/io/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/io/src/worker.rs b/util/io/src/worker.rs index a946fff5675..4d55dda41fe 100644 --- a/util/io/src/worker.rs +++ b/util/io/src/worker.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/Cargo.toml b/util/network/Cargo.toml index 37ff825b0df..c60705d0d3d 100644 --- a/util/network/Cargo.toml +++ b/util/network/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Ethcore network library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-network" version = "1.5.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] log = "0.3" diff --git a/util/network/src/connection.rs b/util/network/src/connection.rs index ea0763b0934..0a43d18c170 100644 --- a/util/network/src/connection.rs +++ b/util/network/src/connection.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/discovery.rs b/util/network/src/discovery.rs index 996578af5cb..a6adf8d1da9 100644 --- a/util/network/src/discovery.rs +++ b/util/network/src/discovery.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/error.rs b/util/network/src/error.rs index a1c4d70a163..2500d587cc2 100644 --- a/util/network/src/error.rs +++ b/util/network/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/handshake.rs b/util/network/src/handshake.rs index 0eeda3b5465..7364b06e716 100644 --- a/util/network/src/handshake.rs +++ b/util/network/src/handshake.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/host.rs b/util/network/src/host.rs index 975fb87b875..2bdeab93e0b 100644 --- a/util/network/src/host.rs +++ b/util/network/src/host.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/ip_utils.rs b/util/network/src/ip_utils.rs index 7ccf75200a6..ef154a1c120 100644 --- a/util/network/src/ip_utils.rs +++ b/util/network/src/ip_utils.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index f21cb498d98..5a06f5a22a7 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/node_table.rs b/util/network/src/node_table.rs index ab7d17fa956..3474ce962fd 100644 --- a/util/network/src/node_table.rs +++ b/util/network/src/node_table.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/service.rs b/util/network/src/service.rs index 3fe6ae04a8a..766b8775096 100644 --- a/util/network/src/service.rs +++ b/util/network/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/session.rs b/util/network/src/session.rs index 3aab05d9a25..d19d330c9d6 100644 --- a/util/network/src/session.rs +++ b/util/network/src/session.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/stats.rs b/util/network/src/stats.rs index cc3b845daf5..b7a9cb17796 100644 --- a/util/network/src/stats.rs +++ b/util/network/src/stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/network/src/tests.rs b/util/network/src/tests.rs index 467dbcbd838..67f99d15777 100644 --- a/util/network/src/tests.rs +++ b/util/network/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/Cargo.toml b/util/rlp/Cargo.toml index 7095ddb046c..ae6b4accd81 100644 --- a/util/rlp/Cargo.toml +++ b/util/rlp/Cargo.toml @@ -3,7 +3,7 @@ description = "Recursive-length prefix encoding, decoding, and compression" license = "GPL-3.0" name = "rlp" version = "0.1.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] [dependencies] elastic-array = { git = "https://github.com/ethcore/elastic-array" } diff --git a/util/rlp/src/bytes.rs b/util/rlp/src/bytes.rs index 07ac108d636..a83e7ff94e5 100644 --- a/util/rlp/src/bytes.rs +++ b/util/rlp/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/commonrlps.rs b/util/rlp/src/commonrlps.rs index 23911724559..34c358826da 100644 --- a/util/rlp/src/commonrlps.rs +++ b/util/rlp/src/commonrlps.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/lib.rs b/util/rlp/src/lib.rs index da5e816b553..6a454460e2a 100644 --- a/util/rlp/src/lib.rs +++ b/util/rlp/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlpcompression.rs b/util/rlp/src/rlpcompression.rs index 3113d8b8378..7f879a1e257 100644 --- a/util/rlp/src/rlpcompression.rs +++ b/util/rlp/src/rlpcompression.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlperrors.rs b/util/rlp/src/rlperrors.rs index dc60afc9a8d..e636c893c05 100644 --- a/util/rlp/src/rlperrors.rs +++ b/util/rlp/src/rlperrors.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlpin.rs b/util/rlp/src/rlpin.rs index a096cdbe855..ca1aaad7947 100644 --- a/util/rlp/src/rlpin.rs +++ b/util/rlp/src/rlpin.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlpstream.rs b/util/rlp/src/rlpstream.rs index ec85e8ee500..b0e435ee00a 100644 --- a/util/rlp/src/rlpstream.rs +++ b/util/rlp/src/rlpstream.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/rlptraits.rs b/util/rlp/src/rlptraits.rs index 0f3fb35d77e..dc6e62917e4 100644 --- a/util/rlp/src/rlptraits.rs +++ b/util/rlp/src/rlptraits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/tests.rs b/util/rlp/src/tests.rs index 1d98e4972c7..83ad38a6ee9 100644 --- a/util/rlp/src/tests.rs +++ b/util/rlp/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/rlp/src/untrusted_rlp.rs b/util/rlp/src/untrusted_rlp.rs index 8f954e3e677..5bb96904681 100644 --- a/util/rlp/src/untrusted_rlp.rs +++ b/util/rlp/src/untrusted_rlp.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/sha3/Cargo.toml b/util/sha3/Cargo.toml index ac423b22fdf..8f8d6d16081 100644 --- a/util/sha3/Cargo.toml +++ b/util/sha3/Cargo.toml @@ -1,10 +1,10 @@ [package] description = "Rust bindings for tinykeccak C library" -homepage = "http://ethcore.io" +homepage = "http://parity.io" license = "GPL-3.0" name = "sha3" version = "0.1.0" -authors = ["Ethcore "] +authors = ["Parity Technologies "] build = "build.rs" [build-dependencies] diff --git a/util/sha3/build.rs b/util/sha3/build.rs index bbe16d720e3..863be7424e6 100644 --- a/util/sha3/build.rs +++ b/util/sha3/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/sha3/src/lib.rs b/util/sha3/src/lib.rs index cd1d2125e38..79400ac85d3 100644 --- a/util/sha3/src/lib.rs +++ b/util/sha3/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/bloom.rs b/util/src/bloom.rs index 71c4091b448..5aa50c263d2 100644 --- a/util/src/bloom.rs +++ b/util/src/bloom.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/bytes.rs b/util/src/bytes.rs index 80b44c0e738..fd0f42c0b16 100644 --- a/util/src/bytes.rs +++ b/util/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/cache.rs b/util/src/cache.rs index 2b2c50c8b54..77227d6ed23 100644 --- a/util/src/cache.rs +++ b/util/src/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/common.rs b/util/src/common.rs index 681b0baef20..c457948dd0d 100644 --- a/util/src/common.rs +++ b/util/src/common.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/error.rs b/util/src/error.rs index 1c8180e889a..fc9513e988f 100644 --- a/util/src/error.rs +++ b/util/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/from_json.rs b/util/src/from_json.rs index a598ed96132..ebd1ce69343 100644 --- a/util/src/from_json.rs +++ b/util/src/from_json.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/hashdb.rs b/util/src/hashdb.rs index 092d40d8a24..2110977d9ad 100644 --- a/util/src/hashdb.rs +++ b/util/src/hashdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/archivedb.rs b/util/src/journaldb/archivedb.rs index fb087d7b223..accc28ffdec 100644 --- a/util/src/journaldb/archivedb.rs +++ b/util/src/journaldb/archivedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/earlymergedb.rs b/util/src/journaldb/earlymergedb.rs index 60263a2cd5b..26d1576cea8 100644 --- a/util/src/journaldb/earlymergedb.rs +++ b/util/src/journaldb/earlymergedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/mod.rs b/util/src/journaldb/mod.rs index 5f6b8f5f92e..673a77bbc3d 100644 --- a/util/src/journaldb/mod.rs +++ b/util/src/journaldb/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/overlayrecentdb.rs b/util/src/journaldb/overlayrecentdb.rs index 34f942a0bde..a80fedc7958 100644 --- a/util/src/journaldb/overlayrecentdb.rs +++ b/util/src/journaldb/overlayrecentdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/refcounteddb.rs b/util/src/journaldb/refcounteddb.rs index 82261965c79..e8a4e342da4 100644 --- a/util/src/journaldb/refcounteddb.rs +++ b/util/src/journaldb/refcounteddb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/journaldb/traits.rs b/util/src/journaldb/traits.rs index 7acf20519df..90063cd9180 100644 --- a/util/src/journaldb/traits.rs +++ b/util/src/journaldb/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/kvdb.rs b/util/src/kvdb.rs index de3b033ec4c..916ee44ae6d 100644 --- a/util/src/kvdb.rs +++ b/util/src/kvdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/lib.rs b/util/src/lib.rs index e62a47e4155..74e4418cedd 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/log.rs b/util/src/log.rs index 056459b1e5d..025ee92f1ed 100644 --- a/util/src/log.rs +++ b/util/src/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/memorydb.rs b/util/src/memorydb.rs index 20dd3a41fa9..67f25922d24 100644 --- a/util/src/memorydb.rs +++ b/util/src/memorydb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/migration/mod.rs b/util/src/migration/mod.rs index a2005f45696..af1eda19249 100644 --- a/util/src/migration/mod.rs +++ b/util/src/migration/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/migration/tests.rs b/util/src/migration/tests.rs index 57a5a9e32e5..49804976be7 100644 --- a/util/src/migration/tests.rs +++ b/util/src/migration/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/misc.rs b/util/src/misc.rs index f779b92e99e..eea44339629 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/nibbleslice.rs b/util/src/nibbleslice.rs index 7daec55ca44..15096bbd509 100644 --- a/util/src/nibbleslice.rs +++ b/util/src/nibbleslice.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/nibblevec.rs b/util/src/nibblevec.rs index 15bd60cb01d..75925f52b8e 100644 --- a/util/src/nibblevec.rs +++ b/util/src/nibblevec.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/overlaydb.rs b/util/src/overlaydb.rs index 009ef151eda..aef68a5eb8e 100644 --- a/util/src/overlaydb.rs +++ b/util/src/overlaydb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/path.rs b/util/src/path.rs index 8a91a31785a..4cb0b413d6f 100644 --- a/util/src/path.rs +++ b/util/src/path.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/semantic_version.rs b/util/src/semantic_version.rs index b550cd8291f..e90aa3b17a2 100644 --- a/util/src/semantic_version.rs +++ b/util/src/semantic_version.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/sha3.rs b/util/src/sha3.rs index f309545269a..7bec5e3db05 100644 --- a/util/src/sha3.rs +++ b/util/src/sha3.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/snappy.rs b/util/src/snappy.rs index 6919fb1ad89..e1318d837bb 100644 --- a/util/src/snappy.rs +++ b/util/src/snappy.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/standard.rs b/util/src/standard.rs index 3d6c93e1ab0..cc82db6e811 100644 --- a/util/src/standard.rs +++ b/util/src/standard.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/stats.rs b/util/src/stats.rs index 2a950ff4fb6..9069be02270 100644 --- a/util/src/stats.rs +++ b/util/src/stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/timer.rs b/util/src/timer.rs index 5d95ff7de61..29ea9f82f61 100644 --- a/util/src/timer.rs +++ b/util/src/timer.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/fatdb.rs b/util/src/trie/fatdb.rs index ca3f4ca79d7..7f350828b36 100644 --- a/util/src/trie/fatdb.rs +++ b/util/src/trie/fatdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/fatdbmut.rs b/util/src/trie/fatdbmut.rs index c81c62f7158..25f0849d023 100644 --- a/util/src/trie/fatdbmut.rs +++ b/util/src/trie/fatdbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/journal.rs b/util/src/trie/journal.rs index 55aed70acf7..c863dd8a482 100644 --- a/util/src/trie/journal.rs +++ b/util/src/trie/journal.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/mod.rs b/util/src/trie/mod.rs index d857732de81..7245e2d5d11 100644 --- a/util/src/trie/mod.rs +++ b/util/src/trie/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/node.rs b/util/src/trie/node.rs index e1f71fdc0d7..e21fc8b3f11 100644 --- a/util/src/trie/node.rs +++ b/util/src/trie/node.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/recorder.rs b/util/src/trie/recorder.rs index 3930dd54339..7f98c20e53f 100644 --- a/util/src/trie/recorder.rs +++ b/util/src/trie/recorder.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/sectriedb.rs b/util/src/trie/sectriedb.rs index 0861f53f355..4df12cde3cc 100644 --- a/util/src/trie/sectriedb.rs +++ b/util/src/trie/sectriedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/sectriedbmut.rs b/util/src/trie/sectriedbmut.rs index 16cc376fede..6e020b88969 100644 --- a/util/src/trie/sectriedbmut.rs +++ b/util/src/trie/sectriedbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/standardmap.rs b/util/src/trie/standardmap.rs index 28e4c76f74a..917831865cb 100644 --- a/util/src/trie/standardmap.rs +++ b/util/src/trie/standardmap.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/triedb.rs b/util/src/trie/triedb.rs index ecd8bddedd6..ac1503529fc 100644 --- a/util/src/trie/triedb.rs +++ b/util/src/trie/triedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/trie/triedbmut.rs b/util/src/trie/triedbmut.rs index f5940dd7baa..63720b7b4a0 100644 --- a/util/src/trie/triedbmut.rs +++ b/util/src/trie/triedbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/triehash.rs b/util/src/triehash.rs index c8ab5bb08e2..4d9134d3acf 100644 --- a/util/src/triehash.rs +++ b/util/src/triehash.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/src/vector.rs b/util/src/vector.rs index 0fccac58626..7a59718bfe7 100644 --- a/util/src/vector.rs +++ b/util/src/vector.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/table/Cargo.toml b/util/table/Cargo.toml index 57d47a8e96d..f2faca184dc 100644 --- a/util/table/Cargo.toml +++ b/util/table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "table" version = "0.1.0" -authors = ["debris "] +authors = ["Parity Technologies "] [dependencies] diff --git a/util/table/src/lib.rs b/util/table/src/lib.rs index f65c1e1712d..d0da8a07cde 100644 --- a/util/table/src/lib.rs +++ b/util/table/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/util/using_queue/Cargo.toml b/util/using_queue/Cargo.toml index 0708cbd0036..4030d0d8dfe 100644 --- a/util/using_queue/Cargo.toml +++ b/util/using_queue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "using_queue" version = "0.1.0" -authors = ["debris "] +authors = ["Parity Technologies "] [dependencies] diff --git a/util/using_queue/src/lib.rs b/util/using_queue/src/lib.rs index 24dae94b948..d414d4b1422 100644 --- a/util/using_queue/src/lib.rs +++ b/util/using_queue/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/windows/ptray/ptray.cpp b/windows/ptray/ptray.cpp index 8c50df2c1e5..bd467f92f89 100644 --- a/windows/ptray/ptray.cpp +++ b/windows/ptray/ptray.cpp @@ -1,4 +1,4 @@ -// Copyright 2015, 2016 Ethcore (UK) Ltd. +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify From 35b037e0556f2791b8e7e4a43baded03f9b83e99 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 19:15:58 +0100 Subject: [PATCH 34/87] Add renamed files. --- hash-fetch/Cargo.toml | 15 ++ hash-fetch/res/registrar.json | 21 ++ hash-fetch/res/urlhint.json | 6 + hash-fetch/src/client.rs | 119 ++++++++++ hash-fetch/src/lib.rs | 33 +++ hash-fetch/src/urlhint.rs | 409 ++++++++++++++++++++++++++++++++++ updater/Cargo.toml | 17 ++ updater/src/lib.rs | 28 +++ updater/src/operations.rs | 359 +++++++++++++++++++++++++++++ updater/src/updater.rs | 393 ++++++++++++++++++++++++++++++++ 10 files changed, 1400 insertions(+) create mode 100644 hash-fetch/Cargo.toml create mode 100644 hash-fetch/res/registrar.json create mode 100644 hash-fetch/res/urlhint.json create mode 100644 hash-fetch/src/client.rs create mode 100644 hash-fetch/src/lib.rs create mode 100644 hash-fetch/src/urlhint.rs create mode 100644 updater/Cargo.toml create mode 100644 updater/src/lib.rs create mode 100644 updater/src/operations.rs create mode 100644 updater/src/updater.rs diff --git a/hash-fetch/Cargo.toml b/hash-fetch/Cargo.toml new file mode 100644 index 00000000000..5305e319d2b --- /dev/null +++ b/hash-fetch/Cargo.toml @@ -0,0 +1,15 @@ +[package] +description = "Fetching hash-addressed content." +homepage = "https://ethcore.io" +license = "GPL-3.0" +name = "parity-hash-fetch" +version = "1.5.0" +authors = ["Parity Technologies "] + +[dependencies] +log = "0.3" +rustc-serialize = "0.3" +ethabi = "0.2.2" +mime_guess = "1.6.1" +fetch = { path = "../util/fetch" } +ethcore-util = { path = "../util" } diff --git a/hash-fetch/res/registrar.json b/hash-fetch/res/registrar.json new file mode 100644 index 00000000000..38edcc7877f --- /dev/null +++ b/hash-fetch/res/registrar.json @@ -0,0 +1,21 @@ +[ + {"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"confirmReverse","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"bytes32"}],"name":"set","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"drop","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getAddress","outputs":[{"name":"","type":"address"}],"type":"function"}, + {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"setFee","outputs":[],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_to","type":"address"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"}, + {"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserved","outputs":[{"name":"reserved","type":"bool"}],"type":"function"}, + {"constant":false,"inputs":[],"name":"drain","outputs":[],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_who","type":"address"}],"name":"proposeReverse","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getUint","outputs":[{"name":"","type":"uint256"}],"type":"function"}, + {"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"get","outputs":[{"name":"","type":"bytes32"}],"type":"function"}, + {"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"type":"function"}, + {"constant":true,"inputs":[{"name":"","type":"address"}],"name":"reverse","outputs":[{"name":"","type":"string"}],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"uint256"}],"name":"setUint","outputs":[{"name":"success","type":"bool"}],"type":"function"}, + {"constant":false,"inputs":[],"name":"removeReverse","outputs":[],"type":"function"}, + {"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"address"}],"name":"setAddress","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Drained","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Reserved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Dropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"key","type":"string"}],"name":"DataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"} +] diff --git a/hash-fetch/res/urlhint.json b/hash-fetch/res/urlhint.json new file mode 100644 index 00000000000..629f166bbb1 --- /dev/null +++ b/hash-fetch/res/urlhint.json @@ -0,0 +1,6 @@ +[ + {"constant":false,"inputs":[{"name":"_content","type":"bytes32"},{"name":"_url","type":"string"}],"name":"hintURL","outputs":[],"type":"function"}, + {"constant":false,"inputs":[{"name":"_content","type":"bytes32"},{"name":"_accountSlashRepo","type":"string"},{"name":"_commit","type":"bytes20"}],"name":"hint","outputs":[],"type":"function"}, + {"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"entries","outputs":[{"name":"accountSlashRepo","type":"string"},{"name":"commit","type":"bytes20"},{"name":"owner","type":"address"}],"type":"function"}, + {"constant":false,"inputs":[{"name":"_content","type":"bytes32"}],"name":"unhint","outputs":[],"type":"function"} +] diff --git a/hash-fetch/src/client.rs b/hash-fetch/src/client.rs new file mode 100644 index 00000000000..57a1b104f7e --- /dev/null +++ b/hash-fetch/src/client.rs @@ -0,0 +1,119 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Hash-addressed content resolver & fetcher. + +use std::{io, fs}; +use std::sync::Arc; +use std::path::PathBuf; + +use util::{Mutex, H256, sha3}; +use fetch::{Fetch, FetchError, Client as FetchClient}; + +use urlhint::{ContractClient, URLHintContract, URLHint, URLHintResult}; + +/// API for fetching by hash. +pub trait HashFetch: Send + Sync + 'static { + /// Fetch hash-addressed content. + /// Parameters: + /// 1. `hash` - content hash + /// 2. `on_done` - callback function invoked when the content is ready (or there was error during fetch) + /// + /// This function may fail immediately when fetch cannot be initialized or content cannot be resolved. + fn fetch(&self, hash: H256, on_done: Box) + Send>) -> Result<(), Error>; +} + +/// Hash-fetching error. +#[derive(Debug)] +pub enum Error { + /// Hash could not be resolved to a valid content address. + NoResolution, + /// Downloaded content hash does not match. + HashMismatch { + /// Expected hash + expected: H256, + /// Computed hash + got: H256, + }, + /// IO Error while validating hash. + IO(io::Error), + /// Error during fetch. + Fetch(FetchError), +} + +impl From for Error { + fn from(error: FetchError) -> Self { + Error::Fetch(error) + } +} + +impl From for Error { + fn from(error: io::Error) -> Self { + Error::IO(error) + } +} + +/// Default Hash-fetching client using on-chain contract to resolve hashes to URLs. +pub struct Client { + contract: URLHintContract, + fetch: Mutex, +} + +impl Client { + /// Creates new instance of the `Client` given on-chain contract client. + pub fn new(contract: Arc) -> Self { + Client { + contract: URLHintContract::new(contract), + fetch: Mutex::new(FetchClient::default()), + } + } +} + +impl HashFetch for Client { + fn fetch(&self, hash: H256, on_done: Box) + Send>) -> Result<(), Error> { + debug!(target: "fetch", "Fetching: {:?}", hash); + + let url = try!( + self.contract.resolve(hash.to_vec()).map(|content| match content { + URLHintResult::Dapp(dapp) => { + dapp.url() + }, + URLHintResult::Content(content) => { + content.url + }, + }).ok_or_else(|| Error::NoResolution) + ); + + debug!(target: "fetch", "Resolved {:?} to {:?}. Fetching...", hash, url); + + self.fetch.lock().request_async(&url, Default::default(), Box::new(move |result| { + fn validate_hash(hash: H256, result: Result) -> Result { + let path = try!(result); + let mut file_reader = io::BufReader::new(try!(fs::File::open(&path))); + let content_hash = try!(sha3(&mut file_reader)); + + if content_hash != hash { + Err(Error::HashMismatch{ got: content_hash, expected: hash }) + } else { + Ok(path) + } + } + + debug!(target: "fetch", "Content fetched, validating hash ({:?})", hash); + on_done(validate_hash(hash, result)) + })).map_err(Into::into) + } +} diff --git a/hash-fetch/src/lib.rs b/hash-fetch/src/lib.rs new file mode 100644 index 00000000000..e333b6df2fc --- /dev/null +++ b/hash-fetch/src/lib.rs @@ -0,0 +1,33 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Hash-addressed content resolver & fetcher. + +#![warn(missing_docs)] + +#[macro_use] +extern crate log; +extern crate rustc_serialize; +extern crate mime_guess; +extern crate ethabi; +extern crate ethcore_util as util; +extern crate fetch; + +mod client; + +pub mod urlhint; + +pub use client::{HashFetch, Client, Error}; diff --git a/hash-fetch/src/urlhint.rs b/hash-fetch/src/urlhint.rs new file mode 100644 index 00000000000..79575e8f323 --- /dev/null +++ b/hash-fetch/src/urlhint.rs @@ -0,0 +1,409 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! URLHint Contract + +use std::fmt; +use std::sync::Arc; +use rustc_serialize::hex::ToHex; +use mime_guess; + +use ethabi::{Interface, Contract, Token}; +use util::{Address, Bytes, Hashable}; + +const COMMIT_LEN: usize = 20; + +/// RAW Contract interface. +/// Should execute transaction using current blockchain state. +pub trait ContractClient: Send + Sync { + /// Get registrar address + fn registrar(&self) -> Result; + /// Call Contract + fn call(&self, address: Address, data: Bytes) -> Result; +} + +/// Github-hosted dapp. +#[derive(Debug, PartialEq)] +pub struct GithubApp { + /// Github Account + pub account: String, + /// Github Repository + pub repo: String, + /// Commit on Github + pub commit: [u8;COMMIT_LEN], + /// Dapp owner address + pub owner: Address, +} + +impl GithubApp { + /// Returns URL of this Github-hosted dapp package. + pub fn url(&self) -> String { + // Since https fetcher doesn't support redirections we use direct link + // format!("https://github.com/{}/{}/archive/{}.zip", self.account, self.repo, self.commit.to_hex()) + format!("https://codeload.github.com/{}/{}/zip/{}", self.account, self.repo, self.commit.to_hex()) + } + + fn commit(bytes: &[u8]) -> Option<[u8;COMMIT_LEN]> { + if bytes.len() < COMMIT_LEN { + return None; + } + + let mut commit = [0; COMMIT_LEN]; + for i in 0..COMMIT_LEN { + commit[i] = bytes[i]; + } + + Some(commit) + } +} + +/// Hash-Addressed Content +#[derive(Debug, PartialEq)] +pub struct Content { + /// URL of the content + pub url: String, + /// MIME type of the content + pub mime: String, + /// Content owner address + pub owner: Address, +} + +/// Result of resolving id to URL +#[derive(Debug, PartialEq)] +pub enum URLHintResult { + /// Dapp + Dapp(GithubApp), + /// Content + Content(Content), +} + +/// URLHint Contract interface +pub trait URLHint { + /// Resolves given id to registrar entry. + fn resolve(&self, id: Bytes) -> Option; +} + +/// `URLHintContract` API +pub struct URLHintContract { + urlhint: Contract, + registrar: Contract, + client: Arc, +} + +impl URLHintContract { + /// Creates new `URLHintContract` + pub fn new(client: Arc) -> Self { + let urlhint = Interface::load(include_bytes!("../res/urlhint.json")).expect("urlhint.json is valid ABI"); + let registrar = Interface::load(include_bytes!("../res/registrar.json")).expect("registrar.json is valid ABI"); + + URLHintContract { + urlhint: Contract::new(urlhint), + registrar: Contract::new(registrar), + client: client, + } + } + + fn urlhint_address(&self) -> Option
{ + let res = || { + let get_address = try!(self.registrar.function("getAddress".into()).map_err(as_string)); + let params = try!(get_address.encode_call( + vec![Token::FixedBytes((*"githubhint".sha3()).to_vec()), Token::String("A".into())] + ).map_err(as_string)); + let output = try!(self.client.call(try!(self.client.registrar()), params)); + let result = try!(get_address.decode_output(output).map_err(as_string)); + + match result.get(0) { + Some(&Token::Address(address)) if address != *Address::default() => Ok(address.into()), + Some(&Token::Address(_)) => Err(format!("Contract not found.")), + e => Err(format!("Invalid result: {:?}", e)), + } + }; + + match res() { + Ok(res) => Some(res), + Err(e) => { + warn!(target: "dapps", "Error while calling registrar: {:?}", e); + None + } + } + } + + fn encode_urlhint_call(&self, id: Bytes) -> Option { + let call = self.urlhint + .function("entries".into()) + .and_then(|f| f.encode_call(vec![Token::FixedBytes(id)])); + + match call { + Ok(res) => { + Some(res) + }, + Err(e) => { + warn!(target: "dapps", "Error while encoding urlhint call: {:?}", e); + None + } + } + } + + fn decode_urlhint_output(&self, output: Bytes) -> Option { + trace!(target: "dapps", "Output: {:?}", output.to_hex()); + let output = self.urlhint + .function("entries".into()) + .and_then(|f| f.decode_output(output)); + + if let Ok(vec) = output { + if vec.len() != 3 { + warn!(target: "dapps", "Invalid contract output: {:?}", vec); + return None; + } + + let mut it = vec.into_iter(); + let account_slash_repo = it.next().expect("element 0 of 3-len vector known to exist; qed"); + let commit = it.next().expect("element 1 of 3-len vector known to exist; qed"); + let owner = it.next().expect("element 2 of 3-len vector known to exist qed"); + + match (account_slash_repo, commit, owner) { + (Token::String(account_slash_repo), Token::FixedBytes(commit), Token::Address(owner)) => { + let owner = owner.into(); + if owner == Address::default() { + return None; + } + + let commit = GithubApp::commit(&commit); + if commit == Some(Default::default()) { + let mime = guess_mime_type(&account_slash_repo).unwrap_or("application/octet-stream".into()); + return Some(URLHintResult::Content(Content { + url: account_slash_repo, + mime: mime, + owner: owner, + })); + } + + let (account, repo) = { + let mut it = account_slash_repo.split('/'); + match (it.next(), it.next()) { + (Some(account), Some(repo)) => (account.into(), repo.into()), + _ => return None, + } + }; + + commit.map(|commit| URLHintResult::Dapp(GithubApp { + account: account, + repo: repo, + commit: commit, + owner: owner, + })) + }, + e => { + warn!(target: "dapps", "Invalid contract output parameters: {:?}", e); + None + }, + } + } else { + warn!(target: "dapps", "Invalid contract output: {:?}", output); + None + } + } +} + +impl URLHint for URLHintContract { + fn resolve(&self, id: Bytes) -> Option { + self.urlhint_address().and_then(|address| { + // Prepare contract call + self.encode_urlhint_call(id) + .and_then(|data| { + let call = self.client.call(address, data); + if let Err(ref e) = call { + warn!(target: "dapps", "Error while calling urlhint: {:?}", e); + } + call.ok() + }) + .and_then(|output| self.decode_urlhint_output(output)) + }) + } +} + +fn guess_mime_type(url: &str) -> Option { + const CONTENT_TYPE: &'static str = "content-type="; + + let mut it = url.split('#'); + // skip url + let url = it.next(); + // get meta headers + let metas = it.next(); + if let Some(metas) = metas { + for meta in metas.split('&') { + let meta = meta.to_lowercase(); + if meta.starts_with(CONTENT_TYPE) { + return Some(meta[CONTENT_TYPE.len()..].to_owned()); + } + } + } + url.and_then(|url| { + url.split('.').last() + }).and_then(|extension| { + mime_guess::get_mime_type_str(extension).map(Into::into) + }) +} + +fn as_string(e: T) -> String { + format!("{:?}", e) +} + +#[cfg(test)] +mod tests { + use std::sync::Arc; + use std::str::FromStr; + use rustc_serialize::hex::FromHex; + + use super::*; + use super::guess_mime_type; + use util::{Bytes, Address, Mutex, ToPretty}; + + struct FakeRegistrar { + pub calls: Arc>>, + pub responses: Mutex>>, + } + + const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2"; + const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000"; + + impl FakeRegistrar { + fn new() -> Self { + FakeRegistrar { + calls: Arc::new(Mutex::new(Vec::new())), + responses: Mutex::new( + vec![ + Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), + Ok(Vec::new()) + ] + ), + } + } + } + + impl ContractClient for FakeRegistrar { + + fn registrar(&self) -> Result { + Ok(REGISTRAR.parse().unwrap()) + } + + fn call(&self, address: Address, data: Bytes) -> Result { + self.calls.lock().push((address.to_hex(), data.to_hex())); + self.responses.lock().remove(0) + } + } + + #[test] + fn should_call_registrar_and_urlhint_contracts() { + // given + let registrar = FakeRegistrar::new(); + let calls = registrar.calls.clone(); + let urlhint = URLHintContract::new(Arc::new(registrar)); + + // when + let res = urlhint.resolve("test".bytes().collect()); + let calls = calls.lock(); + let call0 = calls.get(0).expect("Registrar resolve called"); + let call1 = calls.get(1).expect("URLHint Resolve called"); + + // then + assert!(res.is_none()); + assert_eq!(call0.0, REGISTRAR); + assert_eq!(call0.1, + "6795dbcd058740ee9a5a3fb9f1cfa10752baec87e09cc45cd7027fd54708271aca300c75000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000014100000000000000000000000000000000000000000000000000000000000000".to_owned() + ); + assert_eq!(call1.0, URLHINT); + assert_eq!(call1.1, + "267b69227465737400000000000000000000000000000000000000000000000000000000".to_owned() + ); + } + + #[test] + fn should_decode_urlhint_output() { + // given + let mut registrar = FakeRegistrar::new(); + registrar.responses = Mutex::new(vec![ + Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), + Ok("0000000000000000000000000000000000000000000000000000000000000060ec4c1fe06c808fe3739858c347109b1f5f1ed4b5000000000000000000000000000000000000000000000000deadcafebeefbeefcafedeaddeedfeedffffffff0000000000000000000000000000000000000000000000000000000000000011657468636f72652f64616f2e636c61696d000000000000000000000000000000".from_hex().unwrap()), + ]); + let urlhint = URLHintContract::new(Arc::new(registrar)); + + // when + let res = urlhint.resolve("test".bytes().collect()); + + // then + assert_eq!(res, Some(URLHintResult::Dapp(GithubApp { + account: "ethcore".into(), + repo: "dao.claim".into(), + commit: GithubApp::commit(&"ec4c1fe06c808fe3739858c347109b1f5f1ed4b5".from_hex().unwrap()).unwrap(), + owner: Address::from_str("deadcafebeefbeefcafedeaddeedfeedffffffff").unwrap(), + }))) + } + + #[test] + fn should_decode_urlhint_content_output() { + // given + let mut registrar = FakeRegistrar::new(); + registrar.responses = Mutex::new(vec![ + Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), + Ok("00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000deadcafebeefbeefcafedeaddeedfeedffffffff000000000000000000000000000000000000000000000000000000000000003d68747470733a2f2f657468636f72652e696f2f6173736574732f696d616765732f657468636f72652d626c61636b2d686f72697a6f6e74616c2e706e67000000".from_hex().unwrap()), + ]); + let urlhint = URLHintContract::new(Arc::new(registrar)); + + // when + let res = urlhint.resolve("test".bytes().collect()); + + // then + assert_eq!(res, Some(URLHintResult::Content(Content { + url: "https://ethcore.io/assets/images/ethcore-black-horizontal.png".into(), + mime: "image/png".into(), + owner: Address::from_str("deadcafebeefbeefcafedeaddeedfeedffffffff").unwrap(), + }))) + } + + #[test] + fn should_return_valid_url() { + // given + let app = GithubApp { + account: "test".into(), + repo: "xyz".into(), + commit: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], + owner: Address::default(), + }; + + // when + let url = app.url(); + + // then + assert_eq!(url, "https://codeload.github.com/test/xyz/zip/000102030405060708090a0b0c0d0e0f10111213".to_owned()); + } + + #[test] + fn should_guess_mime_type_from_url() { + let url1 = "https://ethcore.io/parity"; + let url2 = "https://ethcore.io/parity#content-type=image/png"; + let url3 = "https://ethcore.io/parity#something&content-type=image/png"; + let url4 = "https://ethcore.io/parity.png#content-type=image/jpeg"; + let url5 = "https://ethcore.io/parity.png"; + + + assert_eq!(guess_mime_type(url1), None); + assert_eq!(guess_mime_type(url2), Some("image/png".into())); + assert_eq!(guess_mime_type(url3), Some("image/png".into())); + assert_eq!(guess_mime_type(url4), Some("image/jpeg".into())); + assert_eq!(guess_mime_type(url5), Some("image/png".into())); + } +} diff --git a/updater/Cargo.toml b/updater/Cargo.toml new file mode 100644 index 00000000000..a018f5f29ec --- /dev/null +++ b/updater/Cargo.toml @@ -0,0 +1,17 @@ +[package] +description = "Parity Updater Service." +name = "parity-updater" +version = "1.5.0" +license = "GPL-3.0" +authors = ["Parity Technologies "] + +[dependencies] +log = "0.3" +ethabi = "0.2.2" +ethcore = { path = "../ethcore" } +ethcore-util = { path = "../util" } +parity-hash-fetch = { path = "../hash-fetch" } + +[profile.release] +debug = true +lto = false diff --git a/updater/src/lib.rs b/updater/src/lib.rs new file mode 100644 index 00000000000..bc1d2d2c311 --- /dev/null +++ b/updater/src/lib.rs @@ -0,0 +1,28 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Updater for Parity executables + +#[macro_use] extern crate log; +extern crate ethcore_util as util; +extern crate parity_hash_fetch as hash_fetch; +extern crate ethcore; +extern crate ethabi; + +mod updater; +mod operations; + +pub use updater::{Updater, UpdateFilter, UpdatePolicy, ReleaseInfo, OperationsInfo, CapState}; \ No newline at end of file diff --git a/updater/src/operations.rs b/updater/src/operations.rs new file mode 100644 index 00000000000..26652f38491 --- /dev/null +++ b/updater/src/operations.rs @@ -0,0 +1,359 @@ +// Autogenerated from JSON contract definition using Rust contract convertor. + +use std::string::String; +use std::result::Result; +use std::fmt; +use ethabi; +use util::{self, FixedHash, Uint}; + +pub struct Operations { + contract: ethabi::Contract, + address: util::Address, + do_call: Box) -> Result, String> + Send + Sync + 'static>, +} +impl Operations { + pub fn new(address: util::Address, do_call: F) -> Self where F: Fn(util::Address, Vec) -> Result, String> + Send + Sync + 'static { + Operations { + contract: ethabi::Contract::new(ethabi::Interface::load(b"[{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"resetClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"isLatest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"rejectTransaction\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_number\",\"type\":\"uint32\"},{\"name\":\"_name\",\"type\":\"bytes32\"},{\"name\":\"_hard\",\"type\":\"bool\"},{\"name\":\"_spec\",\"type\":\"bytes32\"}],\"name\":\"proposeFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"}],\"name\":\"removeClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"release\",\"outputs\":[{\"name\":\"o_forkBlock\",\"type\":\"uint32\"},{\"name\":\"o_track\",\"type\":\"uint8\"},{\"name\":\"o_semver\",\"type\":\"uint24\"},{\"name\":\"o_critical\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"build\",\"outputs\":[{\"name\":\"o_release\",\"type\":\"bytes32\"},{\"name\":\"o_platform\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"rejectFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"client\",\"outputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"required\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"setClientOwner\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"fork\",\"outputs\":[{\"name\":\"name\",\"type\":\"bytes32\"},{\"name\":\"spec\",\"type\":\"bytes32\"},{\"name\":\"hard\",\"type\":\"bool\"},{\"name\":\"ratified\",\"type\":\"bool\"},{\"name\":\"requiredCount\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"},{\"name\":\"_checksum\",\"type\":\"bytes32\"}],\"name\":\"addChecksum\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"}],\"name\":\"confirmTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"proxy\",\"outputs\":[{\"name\":\"requiredCount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\"},{\"name\":\"gas\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"clientOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_txid\",\"type\":\"bytes32\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_gas\",\"type\":\"uint256\"}],\"name\":\"proposeTransaction\",\"outputs\":[{\"name\":\"txSuccess\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"grandOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_forkBlock\",\"type\":\"uint32\"},{\"name\":\"_track\",\"type\":\"uint8\"},{\"name\":\"_semver\",\"type\":\"uint24\"},{\"name\":\"_critical\",\"type\":\"bool\"}],\"name\":\"addRelease\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptFork\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"clientsRequired\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"}],\"name\":\"track\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_r\",\"type\":\"bool\"}],\"name\":\"setClientRequired\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_track\",\"type\":\"uint8\"}],\"name\":\"latestInTrack\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_client\",\"type\":\"bytes32\"},{\"name\":\"_release\",\"type\":\"bytes32\"},{\"name\":\"_platform\",\"type\":\"bytes32\"}],\"name\":\"checksum\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposedFork\",\"outputs\":[{\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"type\":\"function\"}]").expect("JSON is autogenerated; qed")), + address: address, + do_call: Box::new(do_call), + } + } + fn as_string(e: T) -> String { format!("{:?}", e) } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_newOwner","type":"address"}],"name":"resetClientOwner","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn reset_client_owner(&self, _client: &str, _new_owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("resetClientOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Address(_new_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"isLatest","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn is_latest(&self, _client: &str, _release: &util::H256) -> Result { + let call = self.contract.function("isLatest".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"rejectTransaction","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn reject_transaction(&self, _txid: &util::H256) -> Result<(), String> { + let call = self.contract.function("rejectTransaction".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_owner(&self, _new_owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("setOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_new_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_number","type":"uint32"},{"name":"_name","type":"bytes32"},{"name":"_hard","type":"bool"},{"name":"_spec","type":"bytes32"}],"name":"proposeFork","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn propose_fork(&self, _number: u32, _name: &util::H256, _hard: bool, _spec: &util::H256) -> Result<(), String> { + let call = self.contract.function("proposeFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_number as u64).to_big_endian(&mut r); r }), ethabi::Token::FixedBytes(_name.as_ref().to_owned()), ethabi::Token::Bool(_hard), ethabi::Token::FixedBytes(_spec.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"}],"name":"removeClient","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn remove_client(&self, _client: &str) -> Result<(), String> { + let call = self.contract.function("removeClient".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"release","outputs":[{"name":"o_forkBlock","type":"uint32"},{"name":"o_track","type":"uint8"},{"name":"o_semver","type":"uint24"},{"name":"o_critical","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn release(&self, _client: &str, _release: &util::H256) -> Result<(u32, u8, u32, bool), String> { + let call = self.contract.function("release".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"build","outputs":[{"name":"o_release","type":"bytes32"},{"name":"o_platform","type":"bytes32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn build(&self, _client: &str, _checksum: &util::H256) -> Result<(util::H256, util::H256), String> { + let call = self.contract.function("build".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn reject_fork(&self) -> Result<(), String> { + let call = self.contract.function("rejectFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"client","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn client(&self, _1: &util::H256) -> Result<(util::Address, bool), String> { + let call = self.contract.function("client".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_client_owner(&self, _new_owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("setClientOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_new_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"fork","outputs":[{"name":"name","type":"bytes32"},{"name":"spec","type":"bytes32"},{"name":"hard","type":"bool"},{"name":"ratified","type":"bool"},{"name":"requiredCount","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn fork(&self, _1: u32) -> Result<(util::H256, util::H256, bool, bool, util::U256), String> { + let call = self.contract.function("fork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_1 as u64).to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bool().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"},{"name":"_checksum","type":"bytes32"}],"name":"addChecksum","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn add_checksum(&self, _release: &util::H256, _platform: &str, _checksum: &util::H256) -> Result<(), String> { + let call = self.contract.function("addChecksum".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"}],"name":"confirmTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn confirm_transaction(&self, _txid: &util::H256) -> Result { + let call = self.contract.function("confirmTransaction".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"proxy","outputs":[{"name":"requiredCount","type":"uint256"},{"name":"to","type":"address"},{"name":"data","type":"bytes"},{"name":"value","type":"uint256"},{"name":"gas","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn proxy(&self, _1: &util::H256) -> Result<(util::U256, util::Address, Vec, util::U256, util::U256), String> { + let call = self.contract.function("proxy".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_1.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_bytes().ok_or("Invalid type returned")); r }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) }, { let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"addClient","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn add_client(&self, _client: &str, _owner: &util::Address) -> Result<(), String> { + let call = self.contract.function("addClient".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Address(_owner.clone().0)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"clientOwner","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn client_owner(&self, _1: &util::Address) -> Result { + let call = self.contract.function("clientOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::Address(_1.clone().0)] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_txid","type":"bytes32"},{"name":"_to","type":"address"},{"name":"_data","type":"bytes"},{"name":"_value","type":"uint256"},{"name":"_gas","type":"uint256"}],"name":"proposeTransaction","outputs":[{"name":"txSuccess","type":"uint256"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn propose_transaction(&self, _txid: &util::H256, _to: &util::Address, _data: &[u8], _value: util::U256, _gas: util::U256) -> Result { + let call = self.contract.function("proposeTransaction".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_txid.as_ref().to_owned()), ethabi::Token::Address(_to.clone().0), ethabi::Token::Bytes(_data.to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; _value.to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; _gas.to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"grandOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn grand_owner(&self) -> Result { + let call = self.contract.function("grandOwner".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_address().ok_or("Invalid type returned")); util::Address::from(r) })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_release","type":"bytes32"},{"name":"_forkBlock","type":"uint32"},{"name":"_track","type":"uint8"},{"name":"_semver","type":"uint24"},{"name":"_critical","type":"bool"}],"name":"addRelease","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn add_release(&self, _release: &util::H256, _fork_block: u32, _track: u8, _semver: u32, _critical: bool) -> Result<(), String> { + let call = self.contract.function("addRelease".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_fork_block as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r }), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_semver as u64).to_big_endian(&mut r); r }), ethabi::Token::Bool(_critical)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":false,"inputs":[],"name":"acceptFork","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn accept_fork(&self) -> Result<(), String> { + let call = self.contract.function("acceptFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"clientsRequired","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn clients_required(&self) -> Result { + let call = self.contract.function("clientsRequired".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"}],"name":"track","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn track(&self, _client: &str, _release: &util::H256) -> Result { + let call = self.contract.function("track".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u8 })) + } + + /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_r","type":"bool"}],"name":"setClientRequired","outputs":[],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn set_client_required(&self, _client: &str, _r: bool) -> Result<(), String> { + let call = self.contract.function("setClientRequired".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Bool(_r)] + ).map_err(Self::as_string)?; + call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + + Ok(()) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"latestFork","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn latest_fork(&self) -> Result { + let call = self.contract.function("latestFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_track","type":"uint8"}],"name":"latestInTrack","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn latest_in_track(&self, _client: &str, _track: u8) -> Result { + let call = self.contract.function("latestInTrack".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::Uint({ let mut r = [0u8; 32]; util::U256::from(_track as u64).to_big_endian(&mut r); r })] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[{"name":"_client","type":"bytes32"},{"name":"_release","type":"bytes32"},{"name":"_platform","type":"bytes32"}],"name":"checksum","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn checksum(&self, _client: &str, _release: &util::H256, _platform: &str) -> Result { + let call = self.contract.function("checksum".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![ethabi::Token::FixedBytes(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_release.as_ref().to_owned()), ethabi::Token::FixedBytes(_platform.as_bytes().to_owned())] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_fixed_bytes().ok_or("Invalid type returned")); util::H256::from_slice(r.as_ref()) })) + } + + /// Auto-generated from: `{"constant":true,"inputs":[],"name":"proposedFork","outputs":[{"name":"","type":"uint32"}],"payable":false,"type":"function"}` + #[allow(dead_code)] + pub fn proposed_fork(&self) -> Result { + let call = self.contract.function("proposedFork".into()).map_err(Self::as_string)?; + let data = call.encode_call( + vec![] + ).map_err(Self::as_string)?; + let output = call.decode_output((self.do_call)(self.address.clone(), data)?).map_err(Self::as_string)?; + let mut result = output.into_iter().rev().collect::>(); + Ok(({ let r = result.pop().ok_or("Invalid return arity")?; let r = try!(r.to_uint().ok_or("Invalid type returned")); util::U256::from(r.as_ref()).as_u64() as u32 })) + } +} \ No newline at end of file diff --git a/updater/src/updater.rs b/updater/src/updater.rs new file mode 100644 index 00000000000..b400d5fc813 --- /dev/null +++ b/updater/src/updater.rs @@ -0,0 +1,393 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +use std::sync::{Arc, Weak}; +use std::{fs, env}; +use std::io::Write; +use std::path::{PathBuf}; +use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; +use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; +use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; +use hash_fetch::{self as fetch, HashFetch}; +use operations::Operations; + +/// Filter for releases. +#[derive(Debug, Eq, PartialEq, Clone)] +pub enum UpdateFilter { + /// All releases following the same track. + All, + /// As with `All`, but only those which are known to be critical. + Critical, + /// None. + None, +} + +/// The policy for auto-updating. +#[derive(Debug, Eq, PartialEq, Clone)] +pub struct UpdatePolicy { + /// Download potential updates. + pub enable_downloading: bool, + /// Disable client if we know we're incapable of syncing. + pub require_consensus: bool, + /// Which of those downloaded should be automatically installed. + pub filter: UpdateFilter, +} + +impl Default for UpdatePolicy { + fn default() -> Self { + UpdatePolicy { + enable_downloading: false, + require_consensus: true, + filter: UpdateFilter::None, + } + } +} + +/// Information regarding a particular release of Parity +#[derive(Debug, Clone, PartialEq)] +pub struct ReleaseInfo { + /// Information on the version. + pub version: VersionInfo, + /// Does this release contain critical security updates? + pub is_critical: bool, + /// The latest fork that this release can handle. + pub fork: u64, + /// Our platform's binary, if known. + pub binary: Option, +} + +/// Information on our operations environment. +#[derive(Debug, Clone, PartialEq)] +pub struct OperationsInfo { + /// Our blockchain's latest fork. + pub fork: u64, + + /// Last fork our client supports, if known. + pub this_fork: Option, + + /// Information on our track's latest release. + pub track: ReleaseInfo, + /// Information on our minor version's latest release. + pub minor: Option, +} + +/// Information on the current version's consensus capabililty. +#[derive(Debug, Clone, Copy, PartialEq)] +pub enum CapState { + /// Unknown. + Unknown, + /// Capable of consensus indefinitely. + Capable, + /// Capable of consensus up until a definite block. + CapableUntil(u64), + /// Incapable of consensus since a particular block. + IncapableSince(u64), +} + +impl Default for CapState { + fn default() -> Self { CapState::Unknown } +} + +#[derive(Debug, Default)] +struct UpdaterState { + latest: Option, + + fetching: Option, + ready: Option, + installed: Option, + + capability: CapState, +} + +/// Service for checking for updates and determining whether we can achieve consensus. +pub struct Updater { + // Useful environmental stuff. + update_policy: UpdatePolicy, + weak_self: Mutex>, + client: Weak, + fetcher: Mutex>, + operations: Mutex>, + exit_handler: Mutex>>, + + // Our version info (static) + this: VersionInfo, + + // All the other info - this changes so leave it behind a Mutex. + state: Mutex, +} + +const CLIENT_ID: &'static str = "parity"; + +// TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +fn platform() -> String { + "test".to_owned() +} + +impl Updater { + pub fn new(client: Weak, update_policy: UpdatePolicy) -> Arc { + let mut u = Updater { + update_policy: update_policy, + weak_self: Mutex::new(Default::default()), + client: client.clone(), + fetcher: Mutex::new(None), + operations: Mutex::new(None), + exit_handler: Mutex::new(None), + this: VersionInfo::this(), + state: Mutex::new(Default::default()), + }; + + // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + if u.this.track == ReleaseTrack::Unknown { + u.this.track = ReleaseTrack::Nightly; + } + + let r = Arc::new(u); + *r.fetcher.lock() = Some(fetch::Client::new(r.clone())); + *r.weak_self.lock() = Arc::downgrade(&r); + + r.poll(); + + r + } + + /// Is the currently running client capable of supporting the current chain? + /// We default to true if there's no clear information. + pub fn capability(&self) -> CapState { + self.state.lock().capability + } + + /// The release which is ready to be upgraded to, if any. If this returns `Some`, then + /// `execute_upgrade` may be called. + pub fn upgrade_ready(&self) -> Option { + self.state.lock().ready.clone() + } + + /// Actually upgrades the client. Assumes that the binary has been downloaded. + /// @returns `true` on success. + pub fn execute_upgrade(&self) -> bool { + (|| -> Result { + let mut s = self.state.lock(); + if let Some(r) = s.ready.take() { + let p = Self::update_file_name(&r.version); + let n = Self::updates_path("latest"); + // TODO: creating then writing is a bit fragile. would be nice to make it atomic. + match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { + Ok(_) => { + info!("Completed upgrade to {}", &r.version); + s.installed = Some(r); + if let Some(ref h) = *self.exit_handler.lock() { + (*h)(); + } + Ok(true) + } + Err(e) => { + s.ready = Some(r); + Err(format!("Unable to create soft-link for update {:?}", e)) + } + } + } else { + warn!("Execute upgrade called when no upgrade ready."); + Ok(false) + } + })().unwrap_or_else(|e| { warn!("{}", e); false }) + } + + /// Our version info. + pub fn version_info(&self) -> &VersionInfo { &self.this } + + /// Information gathered concerning the release. + pub fn info(&self) -> Option { self.state.lock().latest.clone() } + + /// Set a closure to call when we want to restart the client + pub fn set_exit_handler(&self, f: F) where F: Fn() + 'static + Send { + *self.exit_handler.lock() = Some(Box::new(f)); + } + + fn collect_release_info(operations: &Operations, release_id: &H256) -> Result { + let (fork, track, semver, is_critical) = operations.release(CLIENT_ID, release_id)?; + let latest_binary = operations.checksum(CLIENT_ID, release_id, &platform())?; + Ok(ReleaseInfo { + version: VersionInfo::from_raw(semver, track, release_id.clone().into()), + is_critical: is_critical, + fork: fork as u64, + binary: if latest_binary.is_zero() { None } else { Some(latest_binary) }, + }) + } + + fn collect_latest(&self) -> Result { + if let Some(ref operations) = *self.operations.lock() { + let this_fork = operations.release(CLIENT_ID, &self.this.hash.into()).ok() + .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); + + if self.this.track == ReleaseTrack::Unknown { + return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); + } + + let latest_in_track = operations.latest_in_track(CLIENT_ID, self.this.track.into())?; + let in_track = Self::collect_release_info(operations, &latest_in_track)?; + let mut in_minor = Some(in_track.clone()); + const PROOF: &'static str = "in_minor initialised and assigned with Some; loop breaks if None assigned; qed"; + while in_minor.as_ref().expect(PROOF).version.track != self.this.track { + let track = match in_minor.as_ref().expect(PROOF).version.track { + ReleaseTrack::Beta => ReleaseTrack::Stable, + ReleaseTrack::Nightly => ReleaseTrack::Beta, + _ => { in_minor = None; break; } + }; + in_minor = Some(Self::collect_release_info(operations, &operations.latest_in_track(CLIENT_ID, track.into())?)?); + } + + Ok(OperationsInfo { + fork: operations.latest_fork()? as u64, + this_fork: this_fork, + track: in_track, + minor: in_minor, + }) + } else { + Err("Operations not available".into()) + } + } + + fn update_file_name(v: &VersionInfo) -> String { + format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash) + } + + fn updates_path(name: &str) -> PathBuf { + let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); + dest.push(".parity-updates"); + dest.push(name); + dest + } + + fn fetch_done(&self, result: Result) { + (|| -> Result<(), String> { + let auto = { + let mut s = self.state.lock(); + let fetched = s.fetching.take().unwrap(); + let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; + info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); + let dest = Self::updates_path(&Self::update_file_name(&fetched.version)); + fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; + fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; + info!("Copied file to {}", dest.display()); + let auto = match self.update_policy.filter { + UpdateFilter::All => true, + UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, + _ => false, + }; + s.ready = Some(fetched); + auto + }; + if auto { + // will lock self.state, so ensure it's outside of previous block. + self.execute_upgrade(); + } + Ok(()) + })().unwrap_or_else(|e| warn!("{}", e)); + } + + fn poll(&self) { + info!(target: "updater", "Current release is {}", self.this); + + if self.operations.lock().is_none() { + if let Some(ops_addr) = self.client.upgrade().and_then(|c| c.registry_address("operations".into())) { + trace!(target: "client", "Found operations at {}", ops_addr); + let client = self.client.clone(); + *self.operations.lock() = Some(Operations::new(ops_addr, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d)))); + } else { + // No Operations contract - bail. + return; + } + } + + let current_number = self.client.upgrade().map_or(0, |c| c.block_number(BlockId::Latest).unwrap_or(0)); + + let mut capability = CapState::Unknown; + let latest = self.collect_latest().ok(); + if let Some(ref latest) = latest { + info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", + latest.track.version, + if latest.track.is_critical {""} else {"non-"}, + platform(), + if let Some(ref b) = latest.track.binary { + format!("{}", b) + } else { + "unreleased".into() + } + ); + let mut s = self.state.lock(); + let running_latest = latest.track.version.hash == self.version_info().hash; + let already_have_latest = s.installed.as_ref().or(s.ready.as_ref()).map_or(false, |t| *t == latest.track); + if self.update_policy.enable_downloading && !running_latest && !already_have_latest { + if let Some(b) = latest.track.binary { + if s.fetching.is_none() { + info!("Attempting to get parity binary {}", b); + s.fetching = Some(latest.track.clone()); + let weak_self = self.weak_self.lock().clone(); + let f = move |r: Result| if let Some(this) = weak_self.upgrade() { this.fetch_done(r) }; + self.fetcher.lock().as_ref().expect("Created on `new`; qed").fetch(b, Box::new(f)).ok(); + } + } + } + info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); + + if let Some(this_fork) = latest.this_fork { + if this_fork < latest.fork { + // We're behind the latest fork. Now is the time to be upgrading; perhaps we're too late... + if let Some(c) = self.client.upgrade() { + let current_number = c.block_number(BlockId::Latest).unwrap_or(0); + if current_number >= latest.fork - 1 { + // We're at (or past) the last block we can import. Disable the client. + if self.update_policy.require_consensus { + c.disable(); + } + capability = CapState::IncapableSince(latest.fork); + } else { + capability = CapState::CapableUntil(latest.fork); + } + } + } else { + capability = CapState::Capable; + } + } + } + + let mut s = self.state.lock(); + s.latest = latest; + s.capability = capability; + } +} + +impl ChainNotify for Updater { + fn new_blocks(&self, _imported: Vec, _invalid: Vec, _enacted: Vec, _retracted: Vec, _sealed: Vec, _duration: u64) { + // TODO: something like this +// if !self.client.upgrade().map_or(true, |c| c.is_major_syncing()) { + self.poll(); +// } + } +} + +impl fetch::urlhint::ContractClient for Updater { + fn registrar(&self) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .registrar_address() + .ok_or_else(|| "Registrar not available".into()) + } + + fn call(&self, address: Address, data: Bytes) -> Result { + self.client.upgrade().ok_or_else(|| "Client not available".to_owned())? + .call_contract(address, data) + } +} From 3aab5dec9be057839a20e849f9d8c9288bd7b394 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 20:14:18 +0100 Subject: [PATCH 35/87] Refactor into a service. --- .gitignore | 2 + updater/src/lib.rs | 4 +- updater/src/service.rs | 84 +++++++++++++++++++++++++ updater/src/updater.rs | 138 +++++++++++++---------------------------- 4 files changed, 132 insertions(+), 96 deletions(-) create mode 100644 updater/src/service.rs diff --git a/.gitignore b/.gitignore index 47546d0ed08..e3bb529c437 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ out/ .vscode + +parity.* diff --git a/updater/src/lib.rs b/updater/src/lib.rs index bc1d2d2c311..08ed57717cb 100644 --- a/updater/src/lib.rs +++ b/updater/src/lib.rs @@ -24,5 +24,7 @@ extern crate ethabi; mod updater; mod operations; +mod service; -pub use updater::{Updater, UpdateFilter, UpdatePolicy, ReleaseInfo, OperationsInfo, CapState}; \ No newline at end of file +pub use service::{Service, ReleaseInfo, OperationsInfo, CapState}; +pub use updater::{Updater, UpdateFilter, UpdatePolicy}; \ No newline at end of file diff --git a/updater/src/service.rs b/updater/src/service.rs new file mode 100644 index 00000000000..2343a95f721 --- /dev/null +++ b/updater/src/service.rs @@ -0,0 +1,84 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +use util::{H256}; +use util::misc::{VersionInfo}; + +/// Information regarding a particular release of Parity +#[derive(Debug, Clone, PartialEq)] +pub struct ReleaseInfo { + /// Information on the version. + pub version: VersionInfo, + /// Does this release contain critical security updates? + pub is_critical: bool, + /// The latest fork that this release can handle. + pub fork: u64, + /// Our platform's binary, if known. + pub binary: Option, +} + +/// Information on our operations environment. +#[derive(Debug, Clone, PartialEq)] +pub struct OperationsInfo { + /// Our blockchain's latest fork. + pub fork: u64, + + /// Last fork our client supports, if known. + pub this_fork: Option, + + /// Information on our track's latest release. + pub track: ReleaseInfo, + /// Information on our minor version's latest release. + pub minor: Option, +} + +/// Information on the current version's consensus capabililty. +#[derive(Debug, Clone, Copy, PartialEq)] +pub enum CapState { + /// Unknown. + Unknown, + /// Capable of consensus indefinitely. + Capable, + /// Capable of consensus up until a definite block. + CapableUntil(u64), + /// Incapable of consensus since a particular block. + IncapableSince(u64), +} + +impl Default for CapState { + fn default() -> Self { CapState::Unknown } +} + +pub trait Service: Send + Sync { + /// Is the currently running client capable of supporting the current chain? + /// We default to true if there's no clear information. + fn capability(&self) -> CapState; + + /// The release which is ready to be upgraded to, if any. If this returns `Some`, then + /// `execute_upgrade` may be called. + fn upgrade_ready(&self) -> Option; + + /// Actually upgrades the client. Assumes that the binary has been downloaded. + /// @returns `true` on success. + fn execute_upgrade(&self) -> bool; + + /// Our version info. + fn version_info(&self) -> VersionInfo; + + /// Information gathered concerning the release. + fn info(&self) -> Option; +} + diff --git a/updater/src/updater.rs b/updater/src/updater.rs index b400d5fc813..f0226f9e007 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -23,6 +23,7 @@ use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; use hash_fetch::{self as fetch, HashFetch}; use operations::Operations; +use service::{Service, ReleaseInfo, OperationsInfo, CapState}; /// Filter for releases. #[derive(Debug, Eq, PartialEq, Clone)] @@ -56,51 +57,6 @@ impl Default for UpdatePolicy { } } -/// Information regarding a particular release of Parity -#[derive(Debug, Clone, PartialEq)] -pub struct ReleaseInfo { - /// Information on the version. - pub version: VersionInfo, - /// Does this release contain critical security updates? - pub is_critical: bool, - /// The latest fork that this release can handle. - pub fork: u64, - /// Our platform's binary, if known. - pub binary: Option, -} - -/// Information on our operations environment. -#[derive(Debug, Clone, PartialEq)] -pub struct OperationsInfo { - /// Our blockchain's latest fork. - pub fork: u64, - - /// Last fork our client supports, if known. - pub this_fork: Option, - - /// Information on our track's latest release. - pub track: ReleaseInfo, - /// Information on our minor version's latest release. - pub minor: Option, -} - -/// Information on the current version's consensus capabililty. -#[derive(Debug, Clone, Copy, PartialEq)] -pub enum CapState { - /// Unknown. - Unknown, - /// Capable of consensus indefinitely. - Capable, - /// Capable of consensus up until a definite block. - CapableUntil(u64), - /// Incapable of consensus since a particular block. - IncapableSince(u64), -} - -impl Default for CapState { - fn default() -> Self { CapState::Unknown } -} - #[derive(Debug, Default)] struct UpdaterState { latest: Option, @@ -157,60 +113,10 @@ impl Updater { let r = Arc::new(u); *r.fetcher.lock() = Some(fetch::Client::new(r.clone())); *r.weak_self.lock() = Arc::downgrade(&r); - r.poll(); - r } - /// Is the currently running client capable of supporting the current chain? - /// We default to true if there's no clear information. - pub fn capability(&self) -> CapState { - self.state.lock().capability - } - - /// The release which is ready to be upgraded to, if any. If this returns `Some`, then - /// `execute_upgrade` may be called. - pub fn upgrade_ready(&self) -> Option { - self.state.lock().ready.clone() - } - - /// Actually upgrades the client. Assumes that the binary has been downloaded. - /// @returns `true` on success. - pub fn execute_upgrade(&self) -> bool { - (|| -> Result { - let mut s = self.state.lock(); - if let Some(r) = s.ready.take() { - let p = Self::update_file_name(&r.version); - let n = Self::updates_path("latest"); - // TODO: creating then writing is a bit fragile. would be nice to make it atomic. - match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { - Ok(_) => { - info!("Completed upgrade to {}", &r.version); - s.installed = Some(r); - if let Some(ref h) = *self.exit_handler.lock() { - (*h)(); - } - Ok(true) - } - Err(e) => { - s.ready = Some(r); - Err(format!("Unable to create soft-link for update {:?}", e)) - } - } - } else { - warn!("Execute upgrade called when no upgrade ready."); - Ok(false) - } - })().unwrap_or_else(|e| { warn!("{}", e); false }) - } - - /// Our version info. - pub fn version_info(&self) -> &VersionInfo { &self.this } - - /// Information gathered concerning the release. - pub fn info(&self) -> Option { self.state.lock().latest.clone() } - /// Set a closure to call when we want to restart the client pub fn set_exit_handler(&self, f: F) where F: Fn() + 'static + Send { *self.exit_handler.lock() = Some(Box::new(f)); @@ -391,3 +297,45 @@ impl fetch::urlhint::ContractClient for Updater { .call_contract(address, data) } } + +impl Service for Updater { + fn capability(&self) -> CapState { + self.state.lock().capability + } + + fn upgrade_ready(&self) -> Option { + self.state.lock().ready.clone() + } + + fn execute_upgrade(&self) -> bool { + (|| -> Result { + let mut s = self.state.lock(); + if let Some(r) = s.ready.take() { + let p = Self::update_file_name(&r.version); + let n = Self::updates_path("latest"); + // TODO: creating then writing is a bit fragile. would be nice to make it atomic. + match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { + Ok(_) => { + info!("Completed upgrade to {}", &r.version); + s.installed = Some(r); + if let Some(ref h) = *self.exit_handler.lock() { + (*h)(); + } + Ok(true) + } + Err(e) => { + s.ready = Some(r); + Err(format!("Unable to create soft-link for update {:?}", e)) + } + } + } else { + warn!("Execute upgrade called when no upgrade ready."); + Ok(false) + } + })().unwrap_or_else(|e| { warn!("{}", e); false }) + } + + fn version_info(&self) -> VersionInfo { self.this.clone() } + + fn info(&self) -> Option { self.state.lock().latest.clone() } +} \ No newline at end of file From d8ad09b654876c4959486645529dd0f56df23044 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 22:47:43 +0100 Subject: [PATCH 36/87] Make updater an IPC module. --- Cargo.lock | 15 ++- ipc-common-types/Cargo.toml | 20 ++++ ipc-common-types/build.rs | 21 ++++ ipc-common-types/src/lib.rs | 26 +++++ ipc-common-types/src/types/mod.rs | 21 ++++ ipc-common-types/src/types/mod.rs.in | 21 ++++ ipc-common-types/src/types/release_track.rs | 76 ++++++++++++++ ipc-common-types/src/types/version_info.rs | 68 +++++++++++++ ipc/codegen/src/serialization.rs | 1 - ipc/rpc/src/binary.rs | 11 ++ ipc/rpc/src/lib.rs | 2 +- updater/Cargo.toml | 6 ++ updater/build.rs | 22 ++++ updater/src/lib.rs | 12 ++- updater/src/service.rs | 50 +-------- updater/src/types/all.rs | 65 ++++++++++++ updater/src/types/mod.rs | 21 ++++ updater/src/types/mod.rs.in | 17 ++++ updater/src/updater.rs | 6 +- util/Cargo.toml | 1 - util/src/lib.rs | 1 - util/src/misc.rs | 107 +------------------- 22 files changed, 432 insertions(+), 158 deletions(-) create mode 100644 ipc-common-types/Cargo.toml create mode 100644 ipc-common-types/build.rs create mode 100644 ipc-common-types/src/lib.rs create mode 100644 ipc-common-types/src/types/mod.rs create mode 100644 ipc-common-types/src/types/mod.rs.in create mode 100644 ipc-common-types/src/types/release_track.rs create mode 100644 ipc-common-types/src/types/version_info.rs create mode 100644 updater/build.rs create mode 100644 updater/src/types/all.rs create mode 100644 updater/src/types/mod.rs create mode 100644 updater/src/types/mod.rs.in diff --git a/Cargo.lock b/Cargo.lock index 381bca2ae23..f109ae3c41c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -594,7 +594,6 @@ dependencies = [ "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (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.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.1.0", "table 0.1.0", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -829,6 +828,17 @@ dependencies = [ "xmltree 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ipc-common-types" +version = "1.5.0" +dependencies = [ + "ethcore-ipc 1.5.0", + "ethcore-ipc-codegen 1.5.0", + "ethcore-util 1.5.0", + "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "isatty" version = "0.1.1" @@ -1305,7 +1315,10 @@ version = "1.5.0" dependencies = [ "ethabi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.5.0", + "ethcore-ipc 1.5.0", + "ethcore-ipc-codegen 1.5.0", "ethcore-util 1.5.0", + "ipc-common-types 1.5.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-hash-fetch 1.5.0", ] diff --git a/ipc-common-types/Cargo.toml b/ipc-common-types/Cargo.toml new file mode 100644 index 00000000000..a483edadca9 --- /dev/null +++ b/ipc-common-types/Cargo.toml @@ -0,0 +1,20 @@ +[package] +description = "Types that implement IPC and are common to multiple modules." +name = "ipc-common-types" +version = "1.5.0" +license = "GPL-3.0" +authors = ["Parity Technologies "] +build = "build.rs" + +[build-dependencies] +ethcore-ipc-codegen = { path = "../ipc/codegen" } + +[dependencies] +log = "0.3" +semver = "0.5" +ethcore-ipc = { path = "../ipc/rpc" } +ethcore-util = { path = "../util" } + +[profile.release] +debug = true +lto = false diff --git a/ipc-common-types/build.rs b/ipc-common-types/build.rs new file mode 100644 index 00000000000..a8e3ec1e03b --- /dev/null +++ b/ipc-common-types/build.rs @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +extern crate ethcore_ipc_codegen; + +fn main() { + ethcore_ipc_codegen::derive_binary("src/types/mod.rs.in").unwrap(); +} diff --git a/ipc-common-types/src/lib.rs b/ipc-common-types/src/lib.rs new file mode 100644 index 00000000000..116921312b1 --- /dev/null +++ b/ipc-common-types/src/lib.rs @@ -0,0 +1,26 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Updater for Parity executables + +#[macro_use] extern crate log; +extern crate semver; +extern crate ethcore_util as util; +extern crate ethcore_ipc as ipc; + +mod types; + +pub use types::*; \ No newline at end of file diff --git a/ipc-common-types/src/types/mod.rs b/ipc-common-types/src/types/mod.rs new file mode 100644 index 00000000000..57e33ad3fb6 --- /dev/null +++ b/ipc-common-types/src/types/mod.rs @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Types used in the public api + +#![allow(dead_code, unused_assignments, unused_variables)] // codegen issues +include!(concat!(env!("OUT_DIR"), "/mod.rs.in")); + diff --git a/ipc-common-types/src/types/mod.rs.in b/ipc-common-types/src/types/mod.rs.in new file mode 100644 index 00000000000..c1177d636eb --- /dev/null +++ b/ipc-common-types/src/types/mod.rs.in @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +pub mod release_track; +pub mod version_info; + +pub use release_track::{ReleaseTrack}; +pub use version_info::{VersionInfo}; \ No newline at end of file diff --git a/ipc-common-types/src/types/release_track.rs b/ipc-common-types/src/types/release_track.rs new file mode 100644 index 00000000000..9b9e7d1e671 --- /dev/null +++ b/ipc-common-types/src/types/release_track.rs @@ -0,0 +1,76 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Types used in the public API + +use std::fmt; + +/// A release's track. +#[derive(PartialEq, Eq, Clone, Copy, Debug, Binary)] +pub enum ReleaseTrack { + /// Stable track. + Stable, + /// Beta track. + Beta, + /// Nightly track. + Nightly, + /// No known track. + Unknown, +} + +impl fmt::Display for ReleaseTrack { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + write!(f, "{}", match *self { + ReleaseTrack::Stable => "stable", + ReleaseTrack::Beta => "beta", + ReleaseTrack::Nightly => "nightly", + ReleaseTrack::Unknown => "unknown", + }) + } +} + +impl<'a> From<&'a str> for ReleaseTrack { + fn from(s: &'a str) -> Self { + match s { + "stable" => ReleaseTrack::Stable, + "beta" => ReleaseTrack::Beta, + "nightly" => ReleaseTrack::Nightly, + _ => ReleaseTrack::Unknown, + } + } +} + +impl From for ReleaseTrack { + fn from(i: u8) -> Self { + match i { + 1 => ReleaseTrack::Stable, + 2 => ReleaseTrack::Beta, + 3 => ReleaseTrack::Nightly, + _ => ReleaseTrack::Unknown, + } + } +} + +impl Into for ReleaseTrack { + fn into(self) -> u8 { + match self { + ReleaseTrack::Stable => 1, + ReleaseTrack::Beta => 2, + ReleaseTrack::Nightly => 3, + ReleaseTrack::Unknown => 0, + } + } +} diff --git a/ipc-common-types/src/types/version_info.rs b/ipc-common-types/src/types/version_info.rs new file mode 100644 index 00000000000..cbffbe198ea --- /dev/null +++ b/ipc-common-types/src/types/version_info.rs @@ -0,0 +1,68 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Types used in the public API + +use std::fmt; +use semver::{Version}; +use util::{H160}; +use util::misc::raw_package_info; +use release_track::ReleaseTrack; + +/// Version information of a particular release. +#[derive(Debug, Clone, PartialEq, Binary)] +pub struct VersionInfo { + /// The track on which it was released. + pub track: ReleaseTrack, + /// The version. + pub version: Version, + /// The (SHA1?) 160-bit hash of this build's code base. + pub hash: H160, +} + +impl fmt::Display for VersionInfo { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + write!(f, "{}.{}.{}-{}-{}", self.version.major, self.version.minor, self.version.patch, self.track, self.hash) + } +} + +impl VersionInfo { + /// Get information for this (currently running) binary. + pub fn this() -> Self { + let raw = raw_package_info(); + VersionInfo { + track: raw.0.into(), + version: { let mut v = Version::parse(raw.1).expect("Environment variables are known to be valid; qed"); v.build = vec![]; v.pre = vec![]; v }, + hash: raw.2.into(), + } + } + + /// Compose the information from the provided raw fields. + pub fn from_raw(semver: u32, track: u8, hash: H160) -> Self { + let t = track.into(); + VersionInfo { + version: Version { + major: (semver >> 16) as u64, + minor: ((semver >> 8) & 0xff) as u64, + patch: (semver & 0xff) as u64, + build: vec![], + pre: vec![], + }, + track: t, + hash: hash, + } + } +} diff --git a/ipc/codegen/src/serialization.rs b/ipc/codegen/src/serialization.rs index c7d2880105b..983d63f112a 100644 --- a/ipc/codegen/src/serialization.rs +++ b/ipc/codegen/src/serialization.rs @@ -286,7 +286,6 @@ fn binary_expr_struct( post_write_stmts.push(quote_stmt!(cx, if $range_ident.end - $range_ident.start > 0 { if let Err(e) = $member_expr .to_bytes(&mut buffer[$range_ident], length_stack) { - warn!(target: "ipc", $error_message_literal); return Err(e) }; } diff --git a/ipc/rpc/src/binary.rs b/ipc/rpc/src/binary.rs index 3c7060260f2..eed894fce69 100644 --- a/ipc/rpc/src/binary.rs +++ b/ipc/rpc/src/binary.rs @@ -804,6 +804,17 @@ binary_fixed_size!(H512); binary_fixed_size!(H2048); binary_fixed_size!(Address); binary_fixed_size!(BinHandshake); +binary_fixed_size!(BinVersion); + +impl BinaryConvertable for ::semver::Version { + fn from_bytes(bytes: &[u8], length_stack: &mut ::std::collections::VecDeque) -> Result { + BinVersion::from_bytes(bytes, length_stack).map(BinVersion::to_semver) + } + + fn to_bytes(&self, buffer: &mut [u8], length_stack: &mut ::std::collections::VecDeque) -> Result<(), BinaryConvertError> { + BinVersion::from(self.clone()).to_bytes(buffer, length_stack) + } +} #[test] fn vec_serialize() { diff --git a/ipc/rpc/src/lib.rs b/ipc/rpc/src/lib.rs index c17acff98ba..e6586397a08 100644 --- a/ipc/rpc/src/lib.rs +++ b/ipc/rpc/src/lib.rs @@ -24,4 +24,4 @@ extern crate ethcore_util as util; pub mod interface; pub mod binary; pub use interface::{IpcInterface, IpcSocket, invoke, IpcConfig, Handshake, Error, WithSocket}; -pub use binary::{BinaryConvertable, BinaryConvertError, BinHandshake}; +pub use binary::{BinaryConvertable, BinaryConvertError, BinVersion, BinHandshake}; diff --git a/updater/Cargo.toml b/updater/Cargo.toml index a018f5f29ec..b97e057d755 100644 --- a/updater/Cargo.toml +++ b/updater/Cargo.toml @@ -4,6 +4,10 @@ name = "parity-updater" version = "1.5.0" license = "GPL-3.0" authors = ["Parity Technologies "] +build = "build.rs" + +[build-dependencies] +ethcore-ipc-codegen = { path = "../ipc/codegen" } [dependencies] log = "0.3" @@ -11,6 +15,8 @@ ethabi = "0.2.2" ethcore = { path = "../ethcore" } ethcore-util = { path = "../util" } parity-hash-fetch = { path = "../hash-fetch" } +ipc-common-types = { path = "../ipc-common-types" } +ethcore-ipc = { path = "../ipc/rpc" } [profile.release] debug = true diff --git a/updater/build.rs b/updater/build.rs new file mode 100644 index 00000000000..a4d42d43aa2 --- /dev/null +++ b/updater/build.rs @@ -0,0 +1,22 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +extern crate ethcore_ipc_codegen; + +fn main() { + ethcore_ipc_codegen::derive_binary("src/types/mod.rs.in").unwrap(); + ethcore_ipc_codegen::derive_ipc_cond("src/service.rs", cfg!(feature="ipc")).unwrap(); +} diff --git a/updater/src/lib.rs b/updater/src/lib.rs index 08ed57717cb..1567a88a089 100644 --- a/updater/src/lib.rs +++ b/updater/src/lib.rs @@ -18,13 +18,21 @@ #[macro_use] extern crate log; extern crate ethcore_util as util; +extern crate ipc_common_types; extern crate parity_hash_fetch as hash_fetch; extern crate ethcore; extern crate ethabi; +extern crate ethcore_ipc as ipc; mod updater; mod operations; -mod service; +mod types; -pub use service::{Service, ReleaseInfo, OperationsInfo, CapState}; +mod service { + #![allow(dead_code, unused_assignments, unused_variables, missing_docs)] // codegen issues + include!(concat!(env!("OUT_DIR"), "/service.rs")); +} + +pub use service::{Service}; +pub use types::all::{ReleaseInfo, OperationsInfo, CapState, VersionInfo, ReleaseTrack}; pub use updater::{Updater, UpdateFilter, UpdatePolicy}; \ No newline at end of file diff --git a/updater/src/service.rs b/updater/src/service.rs index 2343a95f721..ffc905fb7bf 100644 --- a/updater/src/service.rs +++ b/updater/src/service.rs @@ -14,54 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use util::{H256}; -use util::misc::{VersionInfo}; - -/// Information regarding a particular release of Parity -#[derive(Debug, Clone, PartialEq)] -pub struct ReleaseInfo { - /// Information on the version. - pub version: VersionInfo, - /// Does this release contain critical security updates? - pub is_critical: bool, - /// The latest fork that this release can handle. - pub fork: u64, - /// Our platform's binary, if known. - pub binary: Option, -} - -/// Information on our operations environment. -#[derive(Debug, Clone, PartialEq)] -pub struct OperationsInfo { - /// Our blockchain's latest fork. - pub fork: u64, - - /// Last fork our client supports, if known. - pub this_fork: Option, - - /// Information on our track's latest release. - pub track: ReleaseInfo, - /// Information on our minor version's latest release. - pub minor: Option, -} - -/// Information on the current version's consensus capabililty. -#[derive(Debug, Clone, Copy, PartialEq)] -pub enum CapState { - /// Unknown. - Unknown, - /// Capable of consensus indefinitely. - Capable, - /// Capable of consensus up until a definite block. - CapableUntil(u64), - /// Incapable of consensus since a particular block. - IncapableSince(u64), -} - -impl Default for CapState { - fn default() -> Self { CapState::Unknown } -} +use types::all::{CapState, ReleaseInfo, OperationsInfo}; +use ipc_common_types::VersionInfo; +#[ipc(client_ident="RemoteUpdater")] pub trait Service: Send + Sync { /// Is the currently running client capable of supporting the current chain? /// We default to true if there's no clear information. diff --git a/updater/src/types/all.rs b/updater/src/types/all.rs new file mode 100644 index 00000000000..5a602afcdd2 --- /dev/null +++ b/updater/src/types/all.rs @@ -0,0 +1,65 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Types used in the public API + +use util::{H256}; +pub use ipc_common_types::{VersionInfo, ReleaseTrack}; + +/// Information regarding a particular release of Parity +#[derive(Debug, Clone, PartialEq, Binary)] +pub struct ReleaseInfo { + /// Information on the version. + pub version: VersionInfo, + /// Does this release contain critical security updates? + pub is_critical: bool, + /// The latest fork that this release can handle. + pub fork: u64, + /// Our platform's binary, if known. + pub binary: Option, +} + +/// Information on our operations environment. +#[derive(Debug, Clone, PartialEq, Binary)] +pub struct OperationsInfo { + /// Our blockchain's latest fork. + pub fork: u64, + + /// Last fork our client supports, if known. + pub this_fork: Option, + + /// Information on our track's latest release. + pub track: ReleaseInfo, + /// Information on our minor version's latest release. + pub minor: Option, +} + +/// Information on the current version's consensus capabililty. +#[derive(Debug, Clone, Copy, PartialEq, Binary)] +pub enum CapState { + /// Unknown. + Unknown, + /// Capable of consensus indefinitely. + Capable, + /// Capable of consensus up until a definite block. + CapableUntil(u64), + /// Incapable of consensus since a particular block. + IncapableSince(u64), +} + +impl Default for CapState { + fn default() -> Self { CapState::Unknown } +} diff --git a/updater/src/types/mod.rs b/updater/src/types/mod.rs new file mode 100644 index 00000000000..57e33ad3fb6 --- /dev/null +++ b/updater/src/types/mod.rs @@ -0,0 +1,21 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Types used in the public api + +#![allow(dead_code, unused_assignments, unused_variables)] // codegen issues +include!(concat!(env!("OUT_DIR"), "/mod.rs.in")); + diff --git a/updater/src/types/mod.rs.in b/updater/src/types/mod.rs.in new file mode 100644 index 00000000000..10037f932e2 --- /dev/null +++ b/updater/src/types/mod.rs.in @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +pub mod all; diff --git a/updater/src/updater.rs b/updater/src/updater.rs index f0226f9e007..3b793623e14 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -18,12 +18,14 @@ use std::sync::{Arc, Weak}; use std::{fs, env}; use std::io::Write; use std::path::{PathBuf}; -use util::misc::{VersionInfo, ReleaseTrack/*, platform*/}; +//use util::misc::platform; +use ipc_common_types::{VersionInfo, ReleaseTrack}; use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; use hash_fetch::{self as fetch, HashFetch}; use operations::Operations; -use service::{Service, ReleaseInfo, OperationsInfo, CapState}; +use service::{Service}; +use types::all::{ReleaseInfo, OperationsInfo, CapState}; /// Filter for releases. #[derive(Debug, Eq, PartialEq, Clone)] diff --git a/util/Cargo.toml b/util/Cargo.toml index c9f347bfbea..594024f3f16 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -37,7 +37,6 @@ tiny-keccak= "1.0" ethcore-bloom-journal = { path = "bloom" } regex = "0.1" lru-cache = "0.1.0" -semver = "0.5" [features] default = [] diff --git a/util/src/lib.rs b/util/src/lib.rs index 74e4418cedd..e37214879f6 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -106,7 +106,6 @@ extern crate tiny_keccak; extern crate rlp; extern crate regex; extern crate lru_cache; -extern crate semver; #[macro_use] extern crate heapsize; diff --git a/util/src/misc.rs b/util/src/misc.rs index eea44339629..0c3a3255485 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -17,7 +17,6 @@ //! Diff misc. use common::*; -use semver::{Identifier, Version}; use rlp::{Stream, RlpStream}; use target_info::Target; @@ -33,107 +32,6 @@ pub enum Filth { Dirty, } -/// A release's track. -#[derive(PartialEq, Eq, Clone, Copy, Debug)] -pub enum ReleaseTrack { - /// Stable track. - Stable, - /// Beta track. - Beta, - /// Nightly track. - Nightly, - /// No known track. - Unknown, -} - -impl fmt::Display for ReleaseTrack { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!(f, "{}", match *self { - ReleaseTrack::Stable => "stable", - ReleaseTrack::Beta => "beta", - ReleaseTrack::Nightly => "nightly", - ReleaseTrack::Unknown => "unknown", - }) - } -} - -impl<'a> From<&'a str> for ReleaseTrack { - fn from(s: &'a str) -> Self { - match s { - "stable" => ReleaseTrack::Stable, - "beta" => ReleaseTrack::Beta, - "nightly" => ReleaseTrack::Nightly, - _ => ReleaseTrack::Unknown, - } - } -} - -impl From for ReleaseTrack { - fn from(i: u8) -> Self { - match i { - 1 => ReleaseTrack::Stable, - 2 => ReleaseTrack::Beta, - 3 => ReleaseTrack::Nightly, - _ => ReleaseTrack::Unknown, - } - } -} - -impl Into for ReleaseTrack { - fn into(self) -> u8 { - match self { - ReleaseTrack::Stable => 1, - ReleaseTrack::Beta => 2, - ReleaseTrack::Nightly => 3, - ReleaseTrack::Unknown => 0, - } - } -} - -/// Version information of a particular release. -#[derive(Debug, Clone, PartialEq)] -pub struct VersionInfo { - /// The track on which it was released. - pub track: ReleaseTrack, - /// The version. - pub version: Version, - /// The (SHA1?) 160-bit hash of this build's code base. - pub hash: H160, -} - -impl fmt::Display for VersionInfo { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!(f, "{}-{}", self.version, self.hash) - } -} - -impl VersionInfo { - /// Get information for this (currently running) binary. - pub fn this() -> Self { - VersionInfo { - track: env!["CARGO_PKG_VERSION_PRE"].into(), - version: Version::parse(env!["CARGO_PKG_VERSION"]).expect("Environment variables are known to be valid; qed"), - hash: sha().into(), - } - } - - /// Compose the information from the provided raw fields. - pub fn from_raw(semver: u32, track: u8, hash: H160) -> Self { - let t = track.into(); - VersionInfo { - version: Version { - major: (semver >> 16) as u64, - minor: ((semver >> 8) & 0xff) as u64, - patch: (semver & 0xff) as u64, - build: vec![], - pre: vec![Identifier::AlphaNumeric(format!("{}", t))] - }, - track: t, - hash: hash, - } - } -} - /// Get the platform identifier. pub fn platform() -> String { let env = Target::env(); @@ -163,3 +61,8 @@ pub fn version_data() -> Bytes { s.append(&&Target::os()[0..2]); s.out() } + +/// Provide raw information on the package. +pub fn raw_package_info() -> (&'static str, &'static str, &'static str) { + (env!["CARGO_PKG_VERSION_PRE"], env!["CARGO_PKG_VERSION"], sha()) +} \ No newline at end of file From d81d9d77b2a4e93c2e33188ba5490c39945f81b5 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 23:15:52 +0100 Subject: [PATCH 37/87] Wire-in Updater to parity RPC --- Cargo.lock | 1 + parity/rpc_apis.rs | 1 + rpc/Cargo.toml | 1 + rpc/src/lib.rs | 1 + rpc/src/v1/impls/parity.rs | 15 +++++++++++---- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f109ae3c41c..17ee175d24a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -521,6 +521,7 @@ dependencies = [ "jsonrpc-http-server 6.1.1 (git+https://github.com/ethcore/jsonrpc.git)", "jsonrpc-ipc-server 0.2.4 (git+https://github.com/ethcore/jsonrpc.git)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-updater 1.5.0", "rlp 0.1.0", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index ffd50b76285..b52e5affcc0 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -225,6 +225,7 @@ pub fn setup_rpc(server: T, deps: Arc, apis: ApiSet &deps.client, &deps.miner, &deps.sync, + &deps.updater, &deps.net_service, &deps.secret_store, deps.logger.clone(), diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 5d974e59ffd..81da64f4de4 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -25,6 +25,7 @@ ethash = { path = "../ethash" } ethsync = { path = "../sync" } ethjson = { path = "../json" } ethcore-devtools = { path = "../devtools" } +parity-updater = { path = "../updater" } rlp = { path = "../util/rlp" } fetch = { path = "../util/fetch" } rustc-serialize = "0.3" diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index bbd4a51646a..18a0a535d21 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -37,6 +37,7 @@ extern crate ethcore_ipc; extern crate time; extern crate rlp; extern crate fetch; +extern crate parity_updater as updater; #[macro_use] extern crate log; diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index 1f995749a11..af44f6cb8ef 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -30,6 +30,7 @@ use ethcore::miner::MinerService; use ethcore::client::{MiningBlockChainClient}; use ethcore::mode::Mode; use ethcore::account_provider::AccountProvider; +use updater::{Service as UpdateService}; use jsonrpc_core::Error; use v1::traits::Parity; @@ -44,14 +45,16 @@ use v1::helpers::dispatch::DEFAULT_MAC; use v1::helpers::auto_args::Trailing; /// Parity implementation. -pub struct ParityClient where +pub struct ParityClient where C: MiningBlockChainClient, M: MinerService, S: SyncProvider, + U: UpdateService, { client: Weak, miner: Weak, sync: Weak, + updater: Weak, net: Weak, accounts: Weak, logger: Arc, @@ -61,16 +64,18 @@ pub struct ParityClient where dapps_port: Option, } -impl ParityClient where +impl ParityClient where C: MiningBlockChainClient, M: MinerService, S: SyncProvider, + U: UpdateService, { /// Creates new `ParityClient`. pub fn new( client: &Arc, miner: &Arc, sync: &Arc, + updater: &Arc, net: &Arc, store: &Arc, logger: Arc, @@ -83,6 +88,7 @@ impl ParityClient where client: Arc::downgrade(client), miner: Arc::downgrade(miner), sync: Arc::downgrade(sync), + updater: Arc::downgrade(updater), net: Arc::downgrade(net), accounts: Arc::downgrade(store), logger: logger, @@ -100,10 +106,11 @@ impl ParityClient where } } -impl Parity for ParityClient where +impl Parity for ParityClient where M: MinerService + 'static, C: MiningBlockChainClient + 'static, - S: SyncProvider + 'static { + S: SyncProvider + 'static, + U: UpdateService + 'static { fn transactions_limit(&self) -> Result { try!(self.active()); From 2d0d4682ad610e3af2abf55c4061be7e9f3a8159 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 11 Dec 2016 23:36:38 +0100 Subject: [PATCH 38/87] Add first Updater RPC. --- rpc/src/v1/impls/parity.rs | 8 ++++- rpc/src/v1/traits/parity.rs | 6 +++- rpc/src/v1/types/consensus_status.rs | 46 ++++++++++++++++++++++++++++ rpc/src/v1/types/mod.rs.in | 2 ++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 rpc/src/v1/types/consensus_status.rs diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index af44f6cb8ef..db616da24d8 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -38,7 +38,7 @@ use v1::types::{ Bytes, U256, H160, H256, H512, Peers, Transaction, RpcSettings, Histogram, TransactionStats, LocalTransactionStatus, - BlockNumber, + BlockNumber, ConsensusCapability }; use v1::helpers::{errors, SigningQueue, SignerService, NetworkSettings}; use v1::helpers::dispatch::DEFAULT_MAC; @@ -360,4 +360,10 @@ impl Parity for ParityClient where (format!("0x{}", a.hex()), m) }).collect()) } + + fn consensus_capability(&self) -> Result { + try!(self.active()); + let updater = take_weak!(self.updater); + Ok(updater.capability().into()) + } } diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index ba651416836..32d2a041c18 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -23,7 +23,7 @@ use v1::types::{ H160, H256, H512, U256, Bytes, Peers, Transaction, RpcSettings, Histogram, TransactionStats, LocalTransactionStatus, - BlockNumber + BlockNumber, ConsensusCapability }; build_rpc_trait! { @@ -155,5 +155,9 @@ build_rpc_trait! { /// Returns accounts information. #[rpc(name = "parity_accounts")] fn accounts(&self) -> Result>, Error>; + + /// Returns information on current consensus capability. + #[rpc(name = "parity_consensusCapability")] + fn consensus_capability(&self) -> Result; } } diff --git a/rpc/src/v1/types/consensus_status.rs b/rpc/src/v1/types/consensus_status.rs new file mode 100644 index 00000000000..f919fcd58bf --- /dev/null +++ b/rpc/src/v1/types/consensus_status.rs @@ -0,0 +1,46 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +use updater::CapState; + +/// Capability info +#[derive(Debug, Serialize, PartialEq)] +pub enum ConsensusCapability { + /// Unknown. + #[serde(rename="unknown")] + Unknown, + /// Capable of consensus indefinitely. + #[serde(rename="capable")] + Capable, + /// Capable of consensus up until a definite block. + #[serde(rename="capableUntil")] + CapableUntil(u64), + /// Incapable of consensus since a particular block. + #[serde(rename="incapableSince")] + IncapableSince(u64), +} + +impl Into for CapState { + fn into(self) -> ConsensusCapability { + match self { + CapState::Unknown => ConsensusCapability::Unknown, + CapState::Capable => ConsensusCapability::Capable, + CapState::CapableUntil(n) => ConsensusCapability::CapableUntil(n), + CapState::IncapableSince(n) => ConsensusCapability::IncapableSince(n), + } + } +} + diff --git a/rpc/src/v1/types/mod.rs.in b/rpc/src/v1/types/mod.rs.in index c5509bd575f..a7acfe5c6e1 100644 --- a/rpc/src/v1/types/mod.rs.in +++ b/rpc/src/v1/types/mod.rs.in @@ -34,6 +34,7 @@ mod trace_filter; mod uint; mod work; mod histogram; +mod consensus_status; pub use self::bytes::Bytes; pub use self::block::{RichBlock, Block, BlockTransactions}; @@ -55,3 +56,4 @@ pub use self::trace_filter::TraceFilter; pub use self::uint::{U128, U256}; pub use self::work::Work; pub use self::histogram::Histogram; +pub use self::consensus_status::ConsensusCapability; \ No newline at end of file From 758744449f8e6594f97f4126671ef2cc83f3c453 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 02:57:19 +0100 Subject: [PATCH 39/87] Expose all other RPCs. --- Cargo.lock | 1 + js/src/api/rpc/parity/parity.js | 25 ++++++ parity/rpc_apis.rs | 2 +- rpc/Cargo.toml | 1 + rpc/src/lib.rs | 1 + rpc/src/v1/impls/parity.rs | 15 +++- rpc/src/v1/impls/parity_set.rs | 37 +++++++-- rpc/src/v1/traits/parity.rs | 11 ++- rpc/src/v1/traits/parity_set.rs | 10 ++- rpc/src/v1/types/consensus_status.rs | 119 ++++++++++++++++++++++++++- rpc/src/v1/types/mod.rs.in | 2 +- updater/src/updater.rs | 9 +- 12 files changed, 215 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17ee175d24a..ff03d07f6cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -524,6 +524,7 @@ dependencies = [ "parity-updater 1.5.0", "rlp 0.1.0", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js index 2c1d04d935e..36de46df02b 100644 --- a/js/src/api/rpc/parity/parity.js +++ b/js/src/api/rpc/parity/parity.js @@ -315,4 +315,29 @@ export default class Parity { .execute('parity_unsignedTransactionsCount') .then(outNumber); } + + consensusCapability () { + return this._transport + .execute('parity_consensusCapability') + } + + versionInfo () { + return this._transport + .execute('parity_versionInfo') + } + + releasesInfo () { + return this._transport + .execute('parity_releasesInfo') + } + + upgradeReady () { + return this._transport + .execute('parity_upgradeReady') + } + + executeUpgrade () { + return this._transport + .execute('parity_executeUpgrade') + } } diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index b52e5affcc0..30a8c596c0f 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -242,7 +242,7 @@ pub fn setup_rpc(server: T, deps: Arc, apis: ApiSet server.add_delegate(ParityAccountsClient::new(&deps.secret_store, &deps.client).to_delegate()); }, Api::ParitySet => { - server.add_delegate(ParitySetClient::new(&deps.client, &deps.miner, &deps.net_service).to_delegate()) + server.add_delegate(ParitySetClient::new(&deps.client, &deps.miner, &deps.updater, &deps.net_service).to_delegate()) }, Api::Traces => { server.add_delegate(TracesClient::new(&deps.client, &deps.miner).to_delegate()) diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 81da64f4de4..56230db16c9 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -34,6 +34,7 @@ serde_macros = { version = "0.8.0", optional = true } clippy = { version = "0.0.103", optional = true} ethcore-ipc = { path = "../ipc/rpc" } time = "0.1" +semver = "0.5" [build-dependencies] serde_codegen = { version = "0.8.0", optional = true } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 18a0a535d21..22a2164ffbe 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -19,6 +19,7 @@ #![cfg_attr(feature="nightly", feature(custom_derive, custom_attribute, plugin))] #![cfg_attr(feature="nightly", plugin(serde_macros, clippy))] +extern crate semver; extern crate rustc_serialize; extern crate serde; extern crate serde_json; diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index db616da24d8..dd8c498320b 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -38,7 +38,8 @@ use v1::types::{ Bytes, U256, H160, H256, H512, Peers, Transaction, RpcSettings, Histogram, TransactionStats, LocalTransactionStatus, - BlockNumber, ConsensusCapability + BlockNumber, ConsensusCapability, VersionInfo, + OperationsInfo }; use v1::helpers::{errors, SigningQueue, SignerService, NetworkSettings}; use v1::helpers::dispatch::DEFAULT_MAC; @@ -366,4 +367,16 @@ impl Parity for ParityClient where let updater = take_weak!(self.updater); Ok(updater.capability().into()) } + + fn version_info(&self) -> Result { + try!(self.active()); + let updater = take_weak!(self.updater); + Ok(updater.version_info().into()) + } + + fn releases_info(&self) -> Result, Error> { + try!(self.active()); + let updater = take_weak!(self.updater); + Ok(updater.info().map(Into::into)) + } } diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index b63adaa6704..7aa598d6a34 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -24,45 +24,51 @@ use ethcore::mode::Mode; use ethsync::ManageNetwork; use fetch::{Client as FetchClient, Fetch}; use util::{Mutex, sha3}; +use updater::{Service as UpdateService}; use jsonrpc_core::Error; use v1::helpers::auto_args::Ready; use v1::helpers::errors; use v1::traits::ParitySet; -use v1::types::{Bytes, H160, H256, U256}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo}; /// Parity-specific rpc interface for operations altering the settings. -pub struct ParitySetClient where +pub struct ParitySetClient where C: MiningBlockChainClient, M: MinerService, + U: UpdateService, F: Fetch, { client: Weak, miner: Weak, + updater: Weak, net: Weak, fetch: Mutex, } -impl ParitySetClient where +impl ParitySetClient where C: MiningBlockChainClient, - M: MinerService + M: MinerService, + U: UpdateService, { /// Creates new `ParitySetClient` with default `FetchClient`. - pub fn new(client: &Arc, miner: &Arc, net: &Arc) -> Self { - Self::with_fetch(client, miner, net) + pub fn new(client: &Arc, miner: &Arc, updater: &Arc, net: &Arc) -> Self { + Self::with_fetch(client, miner, updater, net) } } -impl ParitySetClient where +impl ParitySetClient where C: MiningBlockChainClient, M: MinerService, + U: UpdateService, F: Fetch, { /// Creates new `ParitySetClient` with default `FetchClient`. - pub fn with_fetch(client: &Arc, miner: &Arc, net: &Arc) -> Self { + pub fn with_fetch(client: &Arc, miner: &Arc, updater: &Arc, net: &Arc) -> Self { ParitySetClient { client: Arc::downgrade(client), miner: Arc::downgrade(miner), + updater: Arc::downgrade(updater), net: Arc::downgrade(net), fetch: Mutex::new(F::default()), } @@ -75,9 +81,10 @@ impl ParitySetClient where } } -impl ParitySet for ParitySetClient where +impl ParitySet for ParitySetClient where C: MiningBlockChainClient + 'static, M: MinerService + 'static, + U: UpdateService + 'static, F: Fetch + 'static, { @@ -230,4 +237,16 @@ impl ParitySet for ParitySetClient where } } } + + fn upgrade_ready(&self) -> Result, Error> { + try!(self.active()); + let updater = take_weak!(self.updater); + Ok(updater.upgrade_ready().map(Into::into)) + } + + fn execute_upgrade(&self) -> Result { + try!(self.active()); + let updater = take_weak!(self.updater); + Ok(updater.execute_upgrade()) + } } diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 32d2a041c18..f2efac0ec6c 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -23,7 +23,8 @@ use v1::types::{ H160, H256, H512, U256, Bytes, Peers, Transaction, RpcSettings, Histogram, TransactionStats, LocalTransactionStatus, - BlockNumber, ConsensusCapability + BlockNumber, ConsensusCapability, VersionInfo, + OperationsInfo }; build_rpc_trait! { @@ -159,5 +160,13 @@ build_rpc_trait! { /// Returns information on current consensus capability. #[rpc(name = "parity_consensusCapability")] fn consensus_capability(&self) -> Result; + + /// Get our version information in a nice object. + #[rpc(name = "parity_versionInfo")] + fn version_info(&self) -> Result; + + /// Get information concerning the latest releases if available. + #[rpc(name = "parity_releasesInfo")] + fn releases_info(&self) -> Result, Error>; } } diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index 486f7fb4245..2f997bb1efb 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 v1::helpers::auto_args::{Wrap, WrapAsync, Ready}; -use v1::types::{Bytes, H160, H256, U256}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo}; build_rpc_trait! { /// Parity-specific rpc interface for operations altering the settings. @@ -91,5 +91,13 @@ build_rpc_trait! { /// Hash a file content under given URL. #[rpc(async, name = "parity_hashContent")] fn hash_content(&self, Ready, String); + + /// Is there a release ready for install? + #[rpc(name = "parity_upgradeReady")] + fn upgrade_ready(&self) -> Result, Error>; + + /// Execute a release which is ready according to upgrade_ready(). + #[rpc(name = "parity_executeUpgrade")] + fn execute_upgrade(&self) -> Result; } } diff --git a/rpc/src/v1/types/consensus_status.rs b/rpc/src/v1/types/consensus_status.rs index f919fcd58bf..c9820b13873 100644 --- a/rpc/src/v1/types/consensus_status.rs +++ b/rpc/src/v1/types/consensus_status.rs @@ -14,10 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use updater::CapState; +use semver; +use v1::types::{H160, H256}; +use updater::{self, CapState}; /// Capability info -#[derive(Debug, Serialize, PartialEq)] +#[derive(Debug, PartialEq, Serialize)] pub enum ConsensusCapability { /// Unknown. #[serde(rename="unknown")] @@ -44,3 +46,116 @@ impl Into for CapState { } } +/// A release's track. +#[derive(Debug, PartialEq, Serialize)] +pub enum ReleaseTrack { + /// Stable track. + Stable, + /// Beta track. + Beta, + /// Nightly track. + Nightly, + /// No known track. + Unknown, +} + +impl Into for updater::ReleaseTrack { + fn into(self) -> ReleaseTrack { + match self { + updater::ReleaseTrack::Stable => ReleaseTrack::Stable, + updater::ReleaseTrack::Beta => ReleaseTrack::Beta, + updater::ReleaseTrack::Nightly => ReleaseTrack::Nightly, + updater::ReleaseTrack::Unknown => ReleaseTrack::Unknown, + } + } +} + +/// Semantic version. +#[derive(Debug, PartialEq, Serialize)] +pub struct Version { + /// Major part. + major: u64, + /// Minor part. + minor: u64, + /// Patch part. + patch: u64, +} + +impl Into for semver::Version { + fn into(self) -> Version { + Version { + major: self.major, + minor: self.minor, + patch: self.patch, + } + } +} + +/// Version information of a particular release. +#[derive(Debug, PartialEq, Serialize)] +pub struct VersionInfo { + /// The track on which it was released. + pub track: ReleaseTrack, + /// The version. + pub version: Version, + /// The (SHA1?) 160-bit hash of this build's code base. + pub hash: H160, +} + +impl Into for updater::VersionInfo { + fn into(self) -> VersionInfo { + VersionInfo { + track: self.track.into(), + version: self.version.into(), + hash: self.hash.into(), + } + } +} + +/// Information regarding a particular release of Parity +#[derive(Debug, PartialEq, Serialize)] +pub struct ReleaseInfo { + /// Information on the version. + pub version: VersionInfo, + /// Does this release contain critical security updates? + pub is_critical: bool, + /// The latest fork that this release can handle. + pub fork: u64, + /// Our platform's binary, if known. + pub binary: Option, +} + +impl Into for updater::ReleaseInfo { + fn into(self) -> ReleaseInfo { + ReleaseInfo { + version: self.version.into(), + is_critical: self.is_critical, + fork: self.fork, + binary: self.binary.map(Into::into), + } + } +} + +/// Information on our operations environment. +#[derive(Debug, PartialEq, Serialize)] +pub struct OperationsInfo { + /// Our blockchain's latest fork. + pub fork: u64, + /// Last fork our client supports, if known. + pub this_fork: Option, + /// Information on our track's latest release. + pub track: ReleaseInfo, + /// Information on our minor version's latest release. + pub minor: Option, +} + +impl Into for updater::OperationsInfo { + fn into(self) -> OperationsInfo { + OperationsInfo { + fork: self.fork, + this_fork: self.this_fork, + track: self.track.into(), + minor: self.minor.map(Into::into), + } + } +} diff --git a/rpc/src/v1/types/mod.rs.in b/rpc/src/v1/types/mod.rs.in index a7acfe5c6e1..b5d467886d9 100644 --- a/rpc/src/v1/types/mod.rs.in +++ b/rpc/src/v1/types/mod.rs.in @@ -56,4 +56,4 @@ pub use self::trace_filter::TraceFilter; pub use self::uint::{U128, U256}; pub use self::work::Work; pub use self::histogram::Histogram; -pub use self::consensus_status::ConsensusCapability; \ No newline at end of file +pub use self::consensus_status::*; \ No newline at end of file diff --git a/updater/src/updater.rs b/updater/src/updater.rs index 3b793623e14..f10e15c28b2 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -137,8 +137,13 @@ impl Updater { fn collect_latest(&self) -> Result { if let Some(ref operations) = *self.operations.lock() { + let hh: H256 = self.this.hash.into(); + info!("Looking up this_fork for our release: {}/{:?}", CLIENT_ID, hh); let this_fork = operations.release(CLIENT_ID, &self.this.hash.into()).ok() - .and_then(|(fork, track, _, _)| if track > 0 {Some(fork as u64)} else {None}); + .and_then(|(fork, track, _, _)| { + info!("Operations returned fork={}, track={}", fork as u64, track); + if track > 0 {Some(fork as u64)} else {None} + }); if self.this.track == ReleaseTrack::Unknown { return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); @@ -207,7 +212,7 @@ impl Updater { } fn poll(&self) { - info!(target: "updater", "Current release is {}", self.this); + info!(target: "updater", "Current release is {} ({:?})", self.this, self.this.hash); if self.operations.lock().is_none() { if let Some(ops_addr) = self.client.upgrade().and_then(|c| c.registry_address("operations".into())) { From 32746df706877e462a9b9acdf7c7d41da7d598fa Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 02:58:35 +0100 Subject: [PATCH 40/87] Add missing ;s --- js/src/api/rpc/parity/parity.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js index 36de46df02b..f00146d58d2 100644 --- a/js/src/api/rpc/parity/parity.js +++ b/js/src/api/rpc/parity/parity.js @@ -318,26 +318,26 @@ export default class Parity { consensusCapability () { return this._transport - .execute('parity_consensusCapability') + .execute('parity_consensusCapability'); } versionInfo () { return this._transport - .execute('parity_versionInfo') + .execute('parity_versionInfo'); } releasesInfo () { return this._transport - .execute('parity_releasesInfo') + .execute('parity_releasesInfo'); } upgradeReady () { return this._transport - .execute('parity_upgradeReady') + .execute('parity_upgradeReady'); } executeUpgrade () { return this._transport - .execute('parity_executeUpgrade') + .execute('parity_executeUpgrade'); } } From 382a0b2d8b45e7d9e0ee68327b87508702d092bb Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 03:00:18 +0100 Subject: [PATCH 41/87] Avoid warning. --- ipc/codegen/src/serialization.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/codegen/src/serialization.rs b/ipc/codegen/src/serialization.rs index 983d63f112a..ed5b490c3c4 100644 --- a/ipc/codegen/src/serialization.rs +++ b/ipc/codegen/src/serialization.rs @@ -263,7 +263,7 @@ fn binary_expr_struct( let range_ident = builder.id(format!("r{}", index)); let error_message = "Error serializing member: ".to_owned() + &::syntax::print::pprust::expr_to_string(&member_expr); - let error_message_literal = builder.expr().lit().str::<&str>(&error_message); + let _error_message_literal = builder.expr().lit().str::<&str>(&error_message); match raw_ident.as_ref() { "u8" => { From 77cb9370651b46c805cd3afc4b7e36a75765f711 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 03:02:27 +0100 Subject: [PATCH 42/87] Please info!s in updater target. --- updater/src/updater.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/updater/src/updater.rs b/updater/src/updater.rs index f10e15c28b2..050e52be214 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -138,10 +138,10 @@ impl Updater { fn collect_latest(&self) -> Result { if let Some(ref operations) = *self.operations.lock() { let hh: H256 = self.this.hash.into(); - info!("Looking up this_fork for our release: {}/{:?}", CLIENT_ID, hh); + info!(target: "updater", "Looking up this_fork for our release: {}/{:?}", CLIENT_ID, hh); let this_fork = operations.release(CLIENT_ID, &self.this.hash.into()).ok() .and_then(|(fork, track, _, _)| { - info!("Operations returned fork={}, track={}", fork as u64, track); + info!(target: "updater", "Operations returned fork={}, track={}", fork as u64, track); if track > 0 {Some(fork as u64)} else {None} }); @@ -190,11 +190,11 @@ impl Updater { let mut s = self.state.lock(); let fetched = s.fetching.take().unwrap(); let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; - info!("Fetched latest version ({}) OK to {}", fetched.version, b.display()); + info!(target: "updater", "Fetched latest version ({}) OK to {}", fetched.version, b.display()); let dest = Self::updates_path(&Self::update_file_name(&fetched.version)); fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; - info!("Copied file to {}", dest.display()); + info!(target: "updater", "Copied file to {}", dest.display()); let auto = match self.update_policy.filter { UpdateFilter::All => true, UpdateFilter::Critical if fetched.is_critical /* TODO: or is on a bad fork */ => true, @@ -216,7 +216,7 @@ impl Updater { if self.operations.lock().is_none() { if let Some(ops_addr) = self.client.upgrade().and_then(|c| c.registry_address("operations".into())) { - trace!(target: "client", "Found operations at {}", ops_addr); + trace!(target: "updater", "Found operations at {}", ops_addr); let client = self.client.clone(); *self.operations.lock() = Some(Operations::new(ops_addr, move |a, d| client.upgrade().ok_or("No client!".into()).and_then(|c| c.call_contract(a, d)))); } else { @@ -246,7 +246,7 @@ impl Updater { if self.update_policy.enable_downloading && !running_latest && !already_have_latest { if let Some(b) = latest.track.binary { if s.fetching.is_none() { - info!("Attempting to get parity binary {}", b); + info!(target: "updater", "Attempting to get parity binary {}", b); s.fetching = Some(latest.track.clone()); let weak_self = self.weak_self.lock().clone(); let f = move |r: Result| if let Some(this) = weak_self.upgrade() { this.fetch_done(r) }; @@ -323,7 +323,7 @@ impl Service for Updater { // TODO: creating then writing is a bit fragile. would be nice to make it atomic. match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { Ok(_) => { - info!("Completed upgrade to {}", &r.version); + info!(target: "updater", "Completed upgrade to {}", &r.version); s.installed = Some(r); if let Some(ref h) = *self.exit_handler.lock() { (*h)(); @@ -336,7 +336,7 @@ impl Service for Updater { } } } else { - warn!("Execute upgrade called when no upgrade ready."); + warn!(target: "updater", "Execute upgrade called when no upgrade ready."); Ok(false) } })().unwrap_or_else(|e| { warn!("{}", e); false }) From 4c9ea55e490db1d57c43536e847114e9dc15f80e Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 03:49:50 +0100 Subject: [PATCH 43/87] Add an Updater mockup and provide a test for it. --- rpc/src/v1/tests/helpers/mod.rs | 4 +- rpc/src/v1/tests/helpers/update_service.rs | 92 ++++++++++++++++++++++ rpc/src/v1/tests/mocked/parity.rs | 18 ++++- rpc/src/v1/tests/mocked/parity_set.rs | 33 +++++--- 4 files changed, 133 insertions(+), 14 deletions(-) create mode 100644 rpc/src/v1/tests/helpers/update_service.rs diff --git a/rpc/src/v1/tests/helpers/mod.rs b/rpc/src/v1/tests/helpers/mod.rs index ce0f40271ea..6c97ce8186a 100644 --- a/rpc/src/v1/tests/helpers/mod.rs +++ b/rpc/src/v1/tests/helpers/mod.rs @@ -20,8 +20,10 @@ mod sync_provider; mod miner_service; mod fetch; mod snapshot_service; +mod update_service; pub use self::sync_provider::{Config, TestSyncProvider}; pub use self::miner_service::TestMinerService; pub use self::fetch::TestFetch; -pub use self::snapshot_service::TestSnapshotService; \ No newline at end of file +pub use self::snapshot_service::TestSnapshotService; +pub use self::update_service::TestUpdater; \ No newline at end of file diff --git a/rpc/src/v1/tests/helpers/update_service.rs b/rpc/src/v1/tests/helpers/update_service.rs new file mode 100644 index 00000000000..23f1c702c87 --- /dev/null +++ b/rpc/src/v1/tests/helpers/update_service.rs @@ -0,0 +1,92 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Test implementation of fetch client. + +use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; +use semver::Version; +use updater::{Service as UpdateService, CapState, ReleaseInfo, VersionInfo, OperationsInfo, ReleaseTrack}; + +/// Test implementation of fetcher. Will always return the same file. +#[derive(Default)] +pub struct TestUpdater { + updated: AtomicBool, + current_block: AtomicUsize, +} + +impl TestUpdater { + /// Update the (faked) current block. + pub fn set_current_block(&self, n: usize) { + self.current_block.store(n, Ordering::Relaxed); + } +} + +impl UpdateService for TestUpdater { + fn capability(&self) -> CapState { + if self.updated.load(Ordering::Relaxed) { + CapState::Capable + } else { + if self.current_block.load(Ordering::Relaxed) < 15100 { + CapState::CapableUntil(15100) + } else { + CapState::IncapableSince(15100) + } + } + } + + fn upgrade_ready(&self) -> Option { + if self.updated.load(Ordering::Relaxed) { + None + } else { + self.info().map(|i| i.track) + } + } + + fn execute_upgrade(&self) -> bool { + if self.updated.load(Ordering::Relaxed) { + false + } else { + self.updated.store(true, Ordering::Relaxed); + true + } + } + + fn version_info(&self) -> VersionInfo { + VersionInfo { + track: ReleaseTrack::Beta, + version: Version{major: 1, minor: 5, patch: 0, build: vec![], pre: vec![]}, + hash: 150.into(), + } + } + + fn info(&self) -> Option { + Some(OperationsInfo { + fork: 15100, + this_fork: Some(15000), + track: ReleaseInfo { + version: VersionInfo { + track: ReleaseTrack::Beta, + version: Version{major: 1, minor: 5, patch: 1, build: vec![], pre: vec![]}, + hash: 151.into(), + }, + is_critical: true, + fork: 15100, + binary: Some(1510.into()), + }, + minor: None, + }) + } +} diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 01bc37ad3a1..7ce35651266 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -26,15 +26,16 @@ use ethstore::ethkey::{Generator, Random}; use jsonrpc_core::{IoHandler, GenericIoHandler}; use v1::{Parity, ParityClient}; use v1::helpers::{SignerService, NetworkSettings}; -use v1::tests::helpers::{TestSyncProvider, Config, TestMinerService}; +use v1::tests::helpers::{TestSyncProvider, Config, TestMinerService, TestUpdater}; use super::manage_network::TestManageNetwork; -pub type TestParityClient = ParityClient; +pub type TestParityClient = ParityClient; pub struct Dependencies { pub miner: Arc, pub client: Arc, pub sync: Arc, + pub updater: Arc, pub logger: Arc, pub settings: Arc, pub network: Arc, @@ -52,6 +53,7 @@ impl Dependencies { network_id: 3, num_peers: 120, })), + updater: Arc::new(TestUpdater::default()), logger: Arc::new(RotatingLogger::new("rpc=trace".to_owned())), settings: Arc::new(NetworkSettings { name: "mynode".to_owned(), @@ -73,6 +75,7 @@ impl Dependencies { &self.client, &self.miner, &self.sync, + &self.updater, &self.network, &self.accounts, self.logger.clone(), @@ -96,6 +99,17 @@ impl Dependencies { } } +#[test] +fn rpc_parity_consensus_capability() { + let deps = Dependencies::new(); + let io = deps.default_client(); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_consensusCapability", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"capableUntil":15100},"id":1}"#; + + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); +} + #[test] fn rpc_parity_extra_data() { let deps = Dependencies::new(); diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index d05c1277082..53b1ab3e6f1 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -25,7 +25,7 @@ use ethsync::ManageNetwork; use jsonrpc_core::{IoHandler, GenericIoHandler}; use v1::{ParitySet, ParitySetClient}; -use v1::tests::helpers::{TestMinerService, TestFetch}; +use v1::tests::helpers::{TestMinerService, TestFetch, TestUpdater}; use super::manage_network::TestManageNetwork; fn miner_service() -> Arc { @@ -40,10 +40,14 @@ fn network_service() -> Arc { Arc::new(TestManageNetwork) } -pub type TestParitySetClient = ParitySetClient; +fn updater_service() -> Arc { + Arc::new(TestUpdater::default()) +} + +pub type TestParitySetClient = ParitySetClient; -fn parity_set_client(client: &Arc, miner: &Arc, net: &Arc) -> TestParitySetClient { - ParitySetClient::with_fetch(client, miner, &(net.clone() as Arc)) +fn parity_set_client(client: &Arc, miner: &Arc, updater: &Arc, net: &Arc) -> TestParitySetClient { + ParitySetClient::with_fetch(client, miner, updater, &(net.clone() as Arc)) } #[test] @@ -51,8 +55,9 @@ fn rpc_parity_set_min_gas_price() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_setMinGasPrice", "params":["0xcd1722f3947def4cf144679da39c4c32bdc35681"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -66,8 +71,9 @@ fn rpc_parity_set_gas_floor_target() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_setGasFloorTarget", "params":["0xcd1722f3947def4cf144679da39c4c32bdc35681"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -81,8 +87,9 @@ fn rpc_parity_set_extra_data() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_setExtraData", "params":["0xcd1722f3947def4cf144679da39c4c32bdc35681"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -96,8 +103,9 @@ fn rpc_parity_set_author() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_setAuthor", "params":["0xcd1722f3947def4cf144679da39c4c32bdc35681"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -111,8 +119,9 @@ fn rpc_parity_set_engine_signer() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_setEngineSigner", "params":["0xcd1722f3947def4cf144679da39c4c32bdc35681", "password"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -128,8 +137,9 @@ fn rpc_parity_set_transactions_limit() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_setTransactionsLimit", "params":[10240240], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -143,8 +153,9 @@ fn rpc_parity_set_hash_content() { let miner = miner_service(); let client = client_service(); let network = network_service(); + let updater = updater_service(); let io = IoHandler::new(); - io.add_delegate(parity_set_client(&client, &miner, &network).to_delegate()); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_hashContent", "params":["https://ethcore.io/assets/images/ethcore-black-horizontal.png"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":"0x2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e","id":1}"#; From 7975d475e1d85c92be4e5481380c2afdfe74e8a8 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 04:29:55 +0100 Subject: [PATCH 44/87] Flesh out RPC tests. --- rpc/src/v1/tests/helpers/update_service.rs | 5 +++ rpc/src/v1/tests/mocked/parity.rs | 38 ++++++++++++++++++---- rpc/src/v1/tests/mocked/parity_set.rs | 38 ++++++++++++++++++++++ rpc/src/v1/types/consensus_status.rs | 4 +++ 4 files changed, 79 insertions(+), 6 deletions(-) diff --git a/rpc/src/v1/tests/helpers/update_service.rs b/rpc/src/v1/tests/helpers/update_service.rs index 23f1c702c87..b2d5a7e6d03 100644 --- a/rpc/src/v1/tests/helpers/update_service.rs +++ b/rpc/src/v1/tests/helpers/update_service.rs @@ -32,6 +32,11 @@ impl TestUpdater { pub fn set_current_block(&self, n: usize) { self.current_block.store(n, Ordering::Relaxed); } + + /// Update the (faked) current block. + pub fn set_updated(&self, v: bool) { + self.updated.store(v, Ordering::Relaxed); + } } impl UpdateService for TestUpdater { diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index 7ce35651266..ca5c9b8dbc7 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -106,7 +106,38 @@ fn rpc_parity_consensus_capability() { let request = r#"{"jsonrpc": "2.0", "method": "parity_consensusCapability", "params": [], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":{"capableUntil":15100},"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); + + deps.updater.set_current_block(15101); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_consensusCapability", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"incapableSince":15100},"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); + + deps.updater.set_updated(true); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_consensusCapability", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":"capable","id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); +} + +#[test] +fn rpc_parity_version_info() { + let deps = Dependencies::new(); + let io = deps.default_client(); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_versionInfo", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"hash":"0x0000000000000000000000000000000000000096","track":"beta","version":{"major":1,"minor":5,"patch":0}},"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); +} + +#[test] +fn rpc_parity_releases_info() { + let deps = Dependencies::new(); + let io = deps.default_client(); + let request = r#"{"jsonrpc": "2.0", "method": "parity_releasesInfo", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"fork":15100,"minor":null,"this_fork":15000,"track":{"binary":"0x00000000000000000000000000000000000000000000000000000000000005e6","fork":15100,"is_critical":true,"version":{"hash":"0x0000000000000000000000000000000000000097","track":"beta","version":{"major":1,"minor":5,"patch":1}}}},"id":1}"#; assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } @@ -210,12 +241,7 @@ fn rpc_parity_net_peers() { let io = deps.default_client(); let request = r#"{"jsonrpc": "2.0", "method": "parity_netPeers", "params":[], "id": 1}"#; - let response = "{\"jsonrpc\":\"2.0\",\"result\":{\"active\":0,\"connected\":120,\"max\":50,\"peers\":[{\"caps\":[\"eth/62\",\"eth/63\"],\ -\"id\":\"node1\",\"name\":\"Parity/1\",\"network\":{\"localAddress\":\"127.0.0.1:8888\",\"remoteAddress\":\"127.0.0.1:7777\"}\ -,\"protocols\":{\"eth\":{\"difficulty\":\"0x28\",\"head\":\"0000000000000000000000000000000000000000000000000000000000000032\"\ -,\"version\":62}}},{\"caps\":[\"eth/63\",\"eth/64\"],\"id\":null,\"name\":\"Parity/2\",\"network\":{\"localAddress\":\ -\"127.0.0.1:3333\",\"remoteAddress\":\"Handshake\"},\"protocols\":{\"eth\":{\"difficulty\":null,\"head\":\ -\"000000000000000000000000000000000000000000000000000000000000003c\",\"version\":64}}}]},\"id\":1}"; + let response = r#"{"jsonrpc":"2.0","result":{"active":0,"connected":120,"max":50,"peers":[{"caps":["eth/62","eth/63"],"id":"node1","name":"Parity/1","network":{"localAddress":"127.0.0.1:8888","remoteAddress":"127.0.0.1:7777"},"protocols":{"eth":{"difficulty":"0x28","head":"0000000000000000000000000000000000000000000000000000000000000032","version":62}}},{"caps":["eth/63","eth/64"],"id":null,"name":"Parity/2","network":{"localAddress":"127.0.0.1:3333","remoteAddress":"Handshake"},"protocols":{"eth":{"difficulty":null,"head":"000000000000000000000000000000000000000000000000000000000000003c","version":64}}}]},"id":1}"#; assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index 53b1ab3e6f1..a9d62d21ae7 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -50,6 +50,44 @@ fn parity_set_client(client: &Arc, miner: &Arc)) } +#[test] +fn rpc_parity_execute_upgrade() { + let miner = miner_service(); + let client = client_service(); + let network = network_service(); + let updater = updater_service(); + let io = IoHandler::new(); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_executeUpgrade", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_executeUpgrade", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":false,"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); +} + +#[test] +fn rpc_parity_upgrade_ready() { + let miner = miner_service(); + let client = client_service(); + let network = network_service(); + let updater = updater_service(); + let io = IoHandler::new(); + io.add_delegate(parity_set_client(&client, &miner, &updater, &network).to_delegate()); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_upgradeReady", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"binary":"0x00000000000000000000000000000000000000000000000000000000000005e6","fork":15100,"is_critical":true,"version":{"hash":"0x0000000000000000000000000000000000000097","track":"beta","version":{"major":1,"minor":5,"patch":1}}},"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); + + updater.set_updated(true); + + let request = r#"{"jsonrpc": "2.0", "method": "parity_upgradeReady", "params": [], "id": 1}"#; + let response = r#"{"jsonrpc":"2.0","result":null,"id":1}"#; + assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); +} + #[test] fn rpc_parity_set_min_gas_price() { let miner = miner_service(); diff --git a/rpc/src/v1/types/consensus_status.rs b/rpc/src/v1/types/consensus_status.rs index c9820b13873..fabc3a1d866 100644 --- a/rpc/src/v1/types/consensus_status.rs +++ b/rpc/src/v1/types/consensus_status.rs @@ -50,12 +50,16 @@ impl Into for CapState { #[derive(Debug, PartialEq, Serialize)] pub enum ReleaseTrack { /// Stable track. + #[serde(rename="stable")] Stable, /// Beta track. + #[serde(rename="beta")] Beta, /// Nightly track. + #[serde(rename="nightly")] Nightly, /// No known track. + #[serde(rename="null")] Unknown, } From a659adfd33ecccac7474f8a76b92a4ca75472567 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 15:43:24 +0100 Subject: [PATCH 45/87] Only ignore parity.* files in root --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e3bb529c437..f311450394a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,4 @@ out/ .vscode -parity.* +/parity.* From c784ab55d27f5de206f5aad7c21062496952dd45 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 15:43:59 +0100 Subject: [PATCH 46/87] Extend jsapi interfaces with documentation --- js/src/api/rpc/parity/parity.js | 34 +++++++++++----------- js/src/jsonrpc/interfaces/parity.js | 45 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 17 deletions(-) diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js index f00146d58d2..2605e41e5cf 100644 --- a/js/src/api/rpc/parity/parity.js +++ b/js/src/api/rpc/parity/parity.js @@ -54,6 +54,11 @@ export default class Parity { .execute('parity_checkRequest', inNumber16(requestId)); } + consensusCapability () { + return this._transport + .execute('parity_consensusCapability'); + } + dappsPort () { return this._transport .execute('parity_dappsPort') @@ -90,6 +95,11 @@ export default class Parity { .execute('parity_enode'); } + executeUpgrade () { + return this._transport + .execute('parity_executeUpgrade'); + } + extraData () { return this._transport .execute('parity_extraData'); @@ -243,6 +253,11 @@ export default class Parity { .then(outAddress); } + releasesInfo () { + return this._transport + .execute('parity_releasesInfo'); + } + removeReservedPeer (encode) { return this._transport .execute('parity_removeReservedPeer', encode); @@ -316,28 +331,13 @@ export default class Parity { .then(outNumber); } - consensusCapability () { - return this._transport - .execute('parity_consensusCapability'); - } - - versionInfo () { - return this._transport - .execute('parity_versionInfo'); - } - - releasesInfo () { - return this._transport - .execute('parity_releasesInfo'); - } - upgradeReady () { return this._transport .execute('parity_upgradeReady'); } - executeUpgrade () { + versionInfo () { return this._transport - .execute('parity_executeUpgrade'); + .execute('parity_versionInfo'); } } diff --git a/js/src/jsonrpc/interfaces/parity.js b/js/src/jsonrpc/interfaces/parity.js index bab9ad6e321..57fa791a867 100644 --- a/js/src/jsonrpc/interfaces/parity.js +++ b/js/src/jsonrpc/interfaces/parity.js @@ -100,6 +100,15 @@ export default { } }, + consensusCapability: { + desc: 'Returns an object or string detailing the state of parity capability of maintaining consensus', + params: [], + returns: [ + type: Object, + desc: 'Either "capable", {"capableUntil":N}, {"incapableSince":N} or "unknown" (N is a block number)' + ] + }, + dappsPort: { desc: 'Returns the port the dapps are running on, error if not enabled', params: [], @@ -163,6 +172,15 @@ export default { } }, + executeUpgrade: { + desc: 'Performs an upgrade', + params: [], + returns: [ + type: Boolean, + desc: 'returns true if the upgrade to the release specified in parity_upgradeReady was successfully executed, false if not' + ] + }, + extraData: { desc: 'Returns currently set extra data', params: [], @@ -468,6 +486,15 @@ export default { } }, + releasesInfo: { + desc: 'returns a ReleasesInfo object describing the current status of releases' + params: [], + returns: [ + type: Object, + desc: '"fork":N,"minor":null,"this_fork":MN,"track":R} (N is a block number representing the latest known fork of this chain which may be in the future, MN is a block number representing the latest known fork that the currently running binary can sync past or null if not known, R is a ReleaseInfo object describing the latest release in this release track)' + ] + }, + removeReservedPeer: { desc: '?', params: [ @@ -651,5 +678,23 @@ export default { type: Quantity, desc: 'Number of unsigned transactions' } + }, + + upgradeReady: { + desc: 'returns a ReleaseInfo object describing the release which is available for upgrade or null if none is available', + params: [], + returns: { + type: Object, + desc: '{"binary":H,"fork":15100,"is_critical":true,"version":V} where H is the Keccak-256 checksum of the release parity binary and V is a VersionInfo object describing the release' + } + }, + + versionInfo: { + desc: 'returns a VersionInfo object describing our current version', + params: [], + returns: { + type: Object, + desc: '{"hash":H,"track":T,"version":{"major":N,"minor":N,"patch":N}} (H is a 160-bit Git commit hash, T is a ReleaseTrack, either "stable", "beta", "nightly" or "unknown" and N is a version number)' + } } }; From 1135674eaa62f7f6845893cc05c28844924d67cf Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 15:51:36 +0100 Subject: [PATCH 47/87] WIP UI (dialog available) --- js/src/modals/UpgradeParity/Info/index.js | 0 js/src/modals/UpgradeParity/Info/info.js | 31 +++++++ js/src/modals/UpgradeParity/Upgrade/index.js | 17 ++++ .../modals/UpgradeParity/Upgrade/upgrade.js | 33 +++++++ js/src/modals/UpgradeParity/store.js | 86 +++++++++++++++++++ js/src/modals/UpgradeParity/upgradeParity.js | 47 ++++++++++ js/src/modals/index.js | 10 ++- .../views/Application/Container/container.js | 13 +-- 8 files changed, 227 insertions(+), 10 deletions(-) create mode 100644 js/src/modals/UpgradeParity/Info/index.js create mode 100644 js/src/modals/UpgradeParity/Info/info.js create mode 100644 js/src/modals/UpgradeParity/Upgrade/index.js create mode 100644 js/src/modals/UpgradeParity/Upgrade/upgrade.js create mode 100644 js/src/modals/UpgradeParity/store.js create mode 100644 js/src/modals/UpgradeParity/upgradeParity.js diff --git a/js/src/modals/UpgradeParity/Info/index.js b/js/src/modals/UpgradeParity/Info/index.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/js/src/modals/UpgradeParity/Info/info.js b/js/src/modals/UpgradeParity/Info/info.js new file mode 100644 index 00000000000..53955971024 --- /dev/null +++ b/js/src/modals/UpgradeParity/Info/info.js @@ -0,0 +1,31 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import { observer } from 'mobx-react'; +import React, { Component, PropTypes } from 'react'; + +@observer +export default class Info extends Component { + static propTypes = { + store: PropTypes.object.isRequired + } + + render () { + return ( +
info
+ ); + } +} diff --git a/js/src/modals/UpgradeParity/Upgrade/index.js b/js/src/modals/UpgradeParity/Upgrade/index.js new file mode 100644 index 00000000000..ff2da57b573 --- /dev/null +++ b/js/src/modals/UpgradeParity/Upgrade/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +export default from './upgrade'; diff --git a/js/src/modals/UpgradeParity/Upgrade/upgrade.js b/js/src/modals/UpgradeParity/Upgrade/upgrade.js new file mode 100644 index 00000000000..75637058c3a --- /dev/null +++ b/js/src/modals/UpgradeParity/Upgrade/upgrade.js @@ -0,0 +1,33 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import { observer } from 'mobx-react'; +import React, { Component, PropTypes } from 'react'; + +import styles from './.css'; + +@observer +export default class Upgrade extends Component { + static propTypes = { + store: PropTypes.object.isRequired + } + + render () { + return ( +
hello
+ ); + } +} diff --git a/js/src/modals/UpgradeParity/store.js b/js/src/modals/UpgradeParity/store.js new file mode 100644 index 00000000000..57446ead897 --- /dev/null +++ b/js/src/modals/UpgradeParity/store.js @@ -0,0 +1,86 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import { action, observable, transaction } from 'mobx'; +import store from 'store'; + +const AN_HOUR = 60 * 60 * 1000; +const A_DAY = 24 * AN_HOUR; +const CHECK_INTERVAL = AN_HOUR; +const LS_UPDATE = '_parity::update'; + +export default class Store { + @observable availableUpgrade = null; + @observable remindAt = 0; + @observable showUpgrade = false; + + constructor (api) { + this._api = api; + + this.checkUpgrade(); + setInterval(this.pollUpgrade, CHECK_INTERVAL); + } + + @action loadStorage () { + const values = store.get(LS_UPDATE) || {}; + + this.remindAt = values.remindAt ? values.remindAt : 0; + + return values; + } + + @action setAvailableUpgrade (availableUpgrade, consensusCapability) { + transaction(() => { + this.setConsensusCapability(consensusCapability); + this.availableUpgrade = availableUpgrade; + + if (availableUpgrade && Date.now() >= this.remindAt) { + this.showUpgrade = true; + } + }); + } + + @action setConsensusCapability (consensusCapability) { + this.consensusCapability = consensusCapability; + } + + @action snoozeTillTomorrow () { + store.set(LS_UPDATE, Object.assign(this.loadStorage(), { + remindAt: Date.now() + A_DAY + })); + } + + checkUpgrade = () => { + this.loadStorage(); + + return Promise + .all([ + this._api.parity.upgradeReady(), + this._api.parity.consensusCapability() + ]) + .then(([availableUpgrade, consensusCapability]) => { + this.setAvailableUpgrade(availableUpgrade, consensusCapability); + }) + .catch((error) => { + console.warn('checkUpgrade', error); + }); + } + + executeUpgrade = () => { + return this._api.parity + .executeUpgrade(); + } +} diff --git a/js/src/modals/UpgradeParity/upgradeParity.js b/js/src/modals/UpgradeParity/upgradeParity.js new file mode 100644 index 00000000000..41a28d6668b --- /dev/null +++ b/js/src/modals/UpgradeParity/upgradeParity.js @@ -0,0 +1,47 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import { observer } from 'mobx-react'; +import React, { Component, PropTypes } from 'react'; + +import { Button, Modal } from '~/ui'; + +import Store from './store'; + +@observer +export default class UpgradeParity extends Component { + static contextTypes = { + api: PropTypes.object.isRequired + }; + + store = new Store(this.context.api); + + render () { + if (!this.store.showUpgrade) { + return null; + } + + return ( + + ] } + visible> +
+ + ); + } +} diff --git a/js/src/modals/index.js b/js/src/modals/index.js index d3574fdc72f..37377275777 100644 --- a/js/src/modals/index.js +++ b/js/src/modals/index.js @@ -23,12 +23,13 @@ import DeployContract from './DeployContract'; import EditMeta from './EditMeta'; import ExecuteContract from './ExecuteContract'; import FirstRun from './FirstRun'; +import LoadContract from './LoadContract'; +import SaveContract from './SaveContract'; import Shapeshift from './Shapeshift'; import SMSVerification from './SMSVerification'; import Transfer from './Transfer'; import PasswordManager from './PasswordManager'; -import SaveContract from './SaveContract'; -import LoadContract from './LoadContract'; +import UpgradeParity from './UpgradeParity'; import WalletSettings from './WalletSettings'; export { @@ -41,11 +42,12 @@ export { EditMeta, ExecuteContract, FirstRun, + LoadContract, + SaveContract, Shapeshift, SMSVerification, Transfer, PasswordManager, - LoadContract, - SaveContract, + UpgradeParity, WalletSettings }; diff --git a/js/src/views/Application/Container/container.js b/js/src/views/Application/Container/container.js index c5cd529a507..275f8999c6c 100644 --- a/js/src/views/Application/Container/container.js +++ b/js/src/views/Application/Container/container.js @@ -16,7 +16,7 @@ import React, { Component, PropTypes } from 'react'; -import { FirstRun } from '~/modals'; +import { FirstRun, UpgradeParity } from '~/modals'; import { Errors, ParityBackground, Tooltips } from '~/ui'; import styles from '../application.css'; @@ -28,20 +28,21 @@ export default class Container extends Component { static propTypes = { children: PropTypes.node.isRequired, - showFirstRun: PropTypes.bool, - onCloseFirstRun: PropTypes.func + onCloseFirstRun: PropTypes.func, + showFirstRun: PropTypes.bool }; render () { - const { children, showFirstRun, onCloseFirstRun } = this.props; const { muiTheme } = this.context; + const { children, onCloseFirstRun, showFirstRun } = this.props; return ( + onClose={ onCloseFirstRun } + visible={ showFirstRun } /> + { children } From 988ac8a22db0dd58d9f4367878abaf7005c3e1bc Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 12 Dec 2016 16:47:57 +0100 Subject: [PATCH 48/87] Add forks supported. --- ethcore/src/ethereum/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs index 3a20f1e4333..0f76830461b 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -29,6 +29,12 @@ pub use self::denominations::*; use super::spec::*; +/// Most recent fork block that we support on Mainnet. +pub const FORK_SUPPORTED_FRONTIER: u64 = 2675000; + +/// Most recent fork block that we support on Ropsten. +pub const FORK_SUPPORTED_ROPSTEN: u64 = 10; + fn load(b: &[u8]) -> Spec { Spec::load(b).expect("chain spec is invalid") } From 9a26caf548271b9e1d1d210a5e7cec311ce540fb Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 18:29:45 +0100 Subject: [PATCH 49/87] Build settings --- js/package.json | 2 +- js/webpack/dev.server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/package.json b/js/package.json index 1e0ea8b685d..2b5563f8cc7 100644 --- a/js/package.json +++ b/js/package.json @@ -36,7 +36,7 @@ "ci:build:npm": "NODE_ENV=production webpack --config webpack/npm", "start": "npm install && npm run build:lib && npm run build:dll && npm run start:app", "start:app": "node webpack/dev.server", - "clean": "rm -rf ./build ./coverage", + "clean": "rm -rf ./.build ./.coverage ./.happypack ./.npmjs ./build", "coveralls": "npm run testCoverage && coveralls < coverage/lcov.info", "lint": "eslint --ignore-path .gitignore ./src/", "lint:cached": "eslint --cache --ignore-path .gitignore ./src/", diff --git a/js/webpack/dev.server.js b/js/webpack/dev.server.js index 9e8bd1524a4..5ce28526253 100644 --- a/js/webpack/dev.server.js +++ b/js/webpack/dev.server.js @@ -60,7 +60,7 @@ app.use(webpackHotMiddleware(compiler, { app.use(webpackDevMiddleware(compiler, { noInfo: false, - quiet: true, + quiet: false, progress: true, publicPath: webpackConfig.output.publicPath, stats: { From 7a0fccf4172e5a4d152b83356645b155f2ae1590 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 18:30:05 +0100 Subject: [PATCH 50/87] Add shared icons --- js/src/ui/Icons/icons.js | 31 +++++++++++++++++++++++++++++++ js/src/ui/Icons/index.js | 17 +++++++++++++++++ js/src/ui/index.js | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 js/src/ui/Icons/icons.js create mode 100644 js/src/ui/Icons/index.js diff --git a/js/src/ui/Icons/icons.js b/js/src/ui/Icons/icons.js new file mode 100644 index 00000000000..b9cf70ba0bc --- /dev/null +++ b/js/src/ui/Icons/icons.js @@ -0,0 +1,31 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import AddIcon from 'material-ui/svg-icons/content/add'; +import CancelIcon from 'material-ui/svg-icons/content/clear'; +import DoneIcon from 'material-ui/svg-icons/action/done-all'; +import PrevIcon from 'material-ui/svg-icons/navigation/arrow-back'; +import NextIcon from 'material-ui/svg-icons/navigation/arrow-forward'; +import SnoozeIcon from 'material-ui/svg-icons/av/snooze'; + +export { + AddIcon, + CancelIcon, + DoneIcon, + PrevIcon, + NextIcon, + SnoozeIcon +}; diff --git a/js/src/ui/Icons/index.js b/js/src/ui/Icons/index.js new file mode 100644 index 00000000000..3d68a7e6b61 --- /dev/null +++ b/js/src/ui/Icons/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +export * from './icons'; diff --git a/js/src/ui/index.js b/js/src/ui/index.js index e1ebb16a6cf..d7875b72b50 100644 --- a/js/src/ui/index.js +++ b/js/src/ui/index.js @@ -33,6 +33,7 @@ import Errors from './Errors'; import Form, { AddressSelect, FormWrap, TypedInput, Input, InputAddress, InputAddressSelect, InputChip, InputInline, Select, RadioButtons } from './Form'; import GasPriceEditor from './GasPriceEditor'; import GasPriceSelector from './GasPriceSelector'; +import Icons from './Icons'; import IdentityIcon from './IdentityIcon'; import IdentityName from './IdentityName'; import LanguageSelector from './LanguageSelector'; @@ -72,6 +73,7 @@ export { FormWrap, GasPriceEditor, GasPriceSelector, + Icons, Input, InputAddress, InputAddressSelect, From a2a89f7e59fa6ef7d5a73ac9c32e62ed9fa22de6 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 12 Dec 2016 18:30:41 +0100 Subject: [PATCH 51/87] Basic UI structure in-place --- .../{Upgrade => Updating}/index.js | 2 +- .../upgrade.js => Updating/updating.js} | 6 +- js/src/modals/UpgradeParity/index.js | 17 ++++ js/src/modals/UpgradeParity/modalStore.js | 97 +++++++++++++++++++ js/src/modals/UpgradeParity/store.js | 86 ---------------- js/src/modals/UpgradeParity/upgradeParity.js | 83 ++++++++++++++-- js/src/modals/UpgradeParity/upgradeStore.js | 57 +++++++++++ js/src/ui/Modal/modal.js | 6 +- 8 files changed, 253 insertions(+), 101 deletions(-) rename js/src/modals/UpgradeParity/{Upgrade => Updating}/index.js (95%) rename js/src/modals/UpgradeParity/{Upgrade/upgrade.js => Updating/updating.js} (87%) create mode 100644 js/src/modals/UpgradeParity/index.js create mode 100644 js/src/modals/UpgradeParity/modalStore.js delete mode 100644 js/src/modals/UpgradeParity/store.js create mode 100644 js/src/modals/UpgradeParity/upgradeStore.js diff --git a/js/src/modals/UpgradeParity/Upgrade/index.js b/js/src/modals/UpgradeParity/Updating/index.js similarity index 95% rename from js/src/modals/UpgradeParity/Upgrade/index.js rename to js/src/modals/UpgradeParity/Updating/index.js index ff2da57b573..59e363f11a8 100644 --- a/js/src/modals/UpgradeParity/Upgrade/index.js +++ b/js/src/modals/UpgradeParity/Updating/index.js @@ -14,4 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -export default from './upgrade'; +export default from './updating'; diff --git a/js/src/modals/UpgradeParity/Upgrade/upgrade.js b/js/src/modals/UpgradeParity/Updating/updating.js similarity index 87% rename from js/src/modals/UpgradeParity/Upgrade/upgrade.js rename to js/src/modals/UpgradeParity/Updating/updating.js index 75637058c3a..f1bbc722ae5 100644 --- a/js/src/modals/UpgradeParity/Upgrade/upgrade.js +++ b/js/src/modals/UpgradeParity/Updating/updating.js @@ -17,17 +17,15 @@ import { observer } from 'mobx-react'; import React, { Component, PropTypes } from 'react'; -import styles from './.css'; - @observer -export default class Upgrade extends Component { +export default class Updating extends Component { static propTypes = { store: PropTypes.object.isRequired } render () { return ( -
hello
+
hello
); } } diff --git a/js/src/modals/UpgradeParity/index.js b/js/src/modals/UpgradeParity/index.js new file mode 100644 index 00000000000..523e372fad3 --- /dev/null +++ b/js/src/modals/UpgradeParity/index.js @@ -0,0 +1,17 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +export default from './upgradeParity'; diff --git a/js/src/modals/UpgradeParity/modalStore.js b/js/src/modals/UpgradeParity/modalStore.js new file mode 100644 index 00000000000..d677aa01d7e --- /dev/null +++ b/js/src/modals/UpgradeParity/modalStore.js @@ -0,0 +1,97 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import { action, computed, observable, transaction } from 'mobx'; +import store from 'store'; + +const LS_UPDATE = '_parity::update'; + +const A_DAY = 24 * 60 * 60 * 1000; + +const STEP_INFO = 1; +const STEP_UPDATING = 2; +const STEP_COMPLETED = 3; +const STEP_ERROR = 4; + +export default class ModalStore { + @observable closed = false; + @observable error = null; + @observable step = 0; + @observable upgrade = null; + + constructor (upgradeStore) { + this.upgrade = upgradeStore; + + this.loadStorage(); + } + + @computed get showUpgrade () { + return !closed && Date.now() >= this.remindAt; + } + + @action closeModal = () => { + transaction(() => { + this.closed = true; + this.setStep(STEP_INFO); + }); + } + + @action loadStorage = () => { + const values = store.get(LS_UPDATE) || {}; + + this.remindAt = values.remindAt ? values.remindAt : 0; + + return values; + } + + @action setStep = (step, error = null) => { + transaction(() => { + this.error = error; + this.setp = step; + }); + } + + @action snoozeTillTomorrow = () => { + this.remindAt = Date.now() + A_DAY; + store.set(LS_UPDATE, Object.assign(this.loadStorage(), { remindAt: this.remindAt })); + } + + @action upgradeNow = () => { + this.setStep(STEP_UPDATING); + + this.upgrade + .executeUpgrade() + .then((result) => { + if (!result) { + throw new Error('Unable to complete update'); + } + + this.setStep(STEP_COMPLETED); + }) + .catch((error) => { + console.error('upgradeNow', error); + + this.setStep(STEP_ERROR, error); + }); + } +} + +export { + STEP_COMPLETED, + STEP_ERROR, + STEP_INFO, + STEP_UPDATING +}; diff --git a/js/src/modals/UpgradeParity/store.js b/js/src/modals/UpgradeParity/store.js deleted file mode 100644 index 57446ead897..00000000000 --- a/js/src/modals/UpgradeParity/store.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2015, 2016 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import { action, observable, transaction } from 'mobx'; -import store from 'store'; - -const AN_HOUR = 60 * 60 * 1000; -const A_DAY = 24 * AN_HOUR; -const CHECK_INTERVAL = AN_HOUR; -const LS_UPDATE = '_parity::update'; - -export default class Store { - @observable availableUpgrade = null; - @observable remindAt = 0; - @observable showUpgrade = false; - - constructor (api) { - this._api = api; - - this.checkUpgrade(); - setInterval(this.pollUpgrade, CHECK_INTERVAL); - } - - @action loadStorage () { - const values = store.get(LS_UPDATE) || {}; - - this.remindAt = values.remindAt ? values.remindAt : 0; - - return values; - } - - @action setAvailableUpgrade (availableUpgrade, consensusCapability) { - transaction(() => { - this.setConsensusCapability(consensusCapability); - this.availableUpgrade = availableUpgrade; - - if (availableUpgrade && Date.now() >= this.remindAt) { - this.showUpgrade = true; - } - }); - } - - @action setConsensusCapability (consensusCapability) { - this.consensusCapability = consensusCapability; - } - - @action snoozeTillTomorrow () { - store.set(LS_UPDATE, Object.assign(this.loadStorage(), { - remindAt: Date.now() + A_DAY - })); - } - - checkUpgrade = () => { - this.loadStorage(); - - return Promise - .all([ - this._api.parity.upgradeReady(), - this._api.parity.consensusCapability() - ]) - .then(([availableUpgrade, consensusCapability]) => { - this.setAvailableUpgrade(availableUpgrade, consensusCapability); - }) - .catch((error) => { - console.warn('checkUpgrade', error); - }); - } - - executeUpgrade = () => { - return this._api.parity - .executeUpgrade(); - } -} diff --git a/js/src/modals/UpgradeParity/upgradeParity.js b/js/src/modals/UpgradeParity/upgradeParity.js index 41a28d6668b..4c4d9f1efde 100644 --- a/js/src/modals/UpgradeParity/upgradeParity.js +++ b/js/src/modals/UpgradeParity/upgradeParity.js @@ -16,10 +16,16 @@ import { observer } from 'mobx-react'; import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { Button, Modal } from '~/ui'; +import { CancelIcon, DoneIcon, NextIcon, SnoozeIcon } from '~/ui/Icons'; -import Store from './store'; +import Info from './Info'; +import Updating from './Updating'; + +import ModalStore, { STEP_COMPLETED, STEP_ERROR, STEP_INFO, STEP_UPDATING } from './modalStore'; +import UpgradeStore from './upgradeStore'; @observer export default class UpgradeParity extends Component { @@ -27,21 +33,84 @@ export default class UpgradeParity extends Component { api: PropTypes.object.isRequired }; - store = new Store(this.context.api); + store = new ModalStore(new UpgradeStore(this.context.api)); render () { - if (!this.store.showUpgrade) { + if (!this.store.upgrade.available || !this.store.showUpgrade) { return null; } return ( - ] } + actions={ this.renderActions() } visible> -
+ { this.renderStep() } ); } + + renderActions () { + const closeButton = +
-
+
-
+
{ this.renderSettings() }
@@ -102,6 +102,7 @@ export default class Status extends Component {
+ +
+
+ +
+
); } From a8f428ccca44c25687d80c5f4f6815372214edc5 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 14 Dec 2016 14:37:25 +0100 Subject: [PATCH 67/87] Display capability status on statusbar --- .../UpgradeParity/{modalStore.js => store.js} | 61 +++++++++--- js/src/modals/UpgradeParity/upgradeParity.js | 51 +++++----- js/src/modals/UpgradeParity/upgradeStore.js | 67 ------------- .../views/Application/Container/container.js | 11 ++- js/src/views/Application/Status/status.css | 63 ++++++------- js/src/views/Application/Status/status.js | 94 +++++++++++++------ js/src/views/Application/application.css | 2 +- js/src/views/Application/application.js | 30 +++--- 8 files changed, 199 insertions(+), 180 deletions(-) rename js/src/modals/UpgradeParity/{modalStore.js => store.js} (56%) delete mode 100644 js/src/modals/UpgradeParity/upgradeStore.js diff --git a/js/src/modals/UpgradeParity/modalStore.js b/js/src/modals/UpgradeParity/store.js similarity index 56% rename from js/src/modals/UpgradeParity/modalStore.js rename to js/src/modals/UpgradeParity/store.js index 994e42003d9..461231fd7ec 100644 --- a/js/src/modals/UpgradeParity/modalStore.js +++ b/js/src/modals/UpgradeParity/store.js @@ -14,41 +14,70 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import { action, computed, observable, transaction } from 'mobx'; +import { action, observable, transaction } from 'mobx'; import store from 'store'; const LS_UPDATE = '_parity::update'; -const A_DAY = 24 * 60 * 60 * 1000; +const A_MINUTE = 60 * 1000; +const A_DAY = 24 * 60 * A_MINUTE; const STEP_INFO = 1; const STEP_UPDATING = 2; const STEP_COMPLETED = 3; const STEP_ERROR = 4; -export default class ModalStore { - @observable closed = false; +const CHECK_INTERVAL = 1 * A_MINUTE; + +export default class Store { + @observable available = null; + @observable consensusCapability = null; + @observable closed = true; @observable error = null; @observable step = 0; - @observable upgrade = null; + @observable upgrading = null; + @observable version = null; - constructor (upgradeStore) { - this.upgrade = upgradeStore; + constructor (api) { + this._api = api; this.loadStorage(); + this.checkUpgrade(); + + setInterval(this.checkUpgrade, CHECK_INTERVAL); } - @computed get showUpgrade () { - return !this.closed && Date.now() >= this.remindAt; + @action setUpgrading () { + transaction(() => { + this.upgrading = this.available; + this.setStep(STEP_UPDATING); + }); } - @action closeModal = () => { + @action setVersions (available, version, consensusCapability) { transaction(() => { - this.closed = true; - this.setStep(STEP_INFO); + this.available = available; + this.consensusCapability = consensusCapability; + this.version = version; }); } + checkUpgrade = () => { + Promise + .all([ + this._api.parity.upgradeReady(), + this._api.parity.consensusCapability(), + this._api.parity.versionInfo() + ]) + .then(([available, consensusCapability, version]) => { + console.log('[checkUpgrade]', 'available:', available, 'version:', version, 'consensusCapability:', consensusCapability); + this.setVersions(available, version, consensusCapability); + }) + .catch((error) => { + console.warn('checkUpgrade', error); + }); + } + @action loadStorage = () => { const values = store.get(LS_UPDATE) || {}; @@ -57,6 +86,10 @@ export default class ModalStore { return values; } + @action openModal = () => { + this.closed = false; + } + @action setStep = (step, error = null) => { transaction(() => { this.error = error; @@ -70,9 +103,9 @@ export default class ModalStore { } @action upgradeNow = () => { - this.setStep(STEP_UPDATING); + this.setUpgrading(); - this.upgrade + return this._api.parity .executeUpgrade() .then((result) => { if (!result) { diff --git a/js/src/modals/UpgradeParity/upgradeParity.js b/js/src/modals/UpgradeParity/upgradeParity.js index c1ba9d39598..7f13d87ea87 100644 --- a/js/src/modals/UpgradeParity/upgradeParity.js +++ b/js/src/modals/UpgradeParity/upgradeParity.js @@ -22,8 +22,7 @@ import { Button } from '~/ui'; import { CancelIcon, DoneIcon, NextIcon, SnoozeIcon } from '~/ui/Icons'; import Modal, { Busy, Completed } from '~/ui/Modal'; -import ModalStore, { STEP_COMPLETED, STEP_ERROR, STEP_INFO, STEP_UPDATING } from './modalStore'; -import UpgradeStore from './upgradeStore'; +import { STEP_COMPLETED, STEP_ERROR, STEP_INFO, STEP_UPDATING } from './store'; import styles from './upgradeParity.css'; @observer @@ -32,17 +31,21 @@ export default class UpgradeParity extends Component { api: PropTypes.object.isRequired }; - store = new ModalStore(new UpgradeStore(this.context.api)); + static propTypes = { + store: PropTypes.object.isRequired + } render () { - if (!this.store.upgrade.available || !this.store.showUpgrade) { + const { store } = this.props; + + if (!store.showUpgrade) { return null; } return ( , - this.store.step === STEP_ERROR + store.step === STEP_ERROR ? @@ -65,6 +68,8 @@ export default class UpgradeParity extends Component { } renderActions () { + const { store } = this.props; + const closeButton =
- { error.message } + { store.error.message }
); diff --git a/js/src/modals/UpgradeParity/upgradeStore.js b/js/src/modals/UpgradeParity/upgradeStore.js deleted file mode 100644 index 8ac2f24b0ae..00000000000 --- a/js/src/modals/UpgradeParity/upgradeStore.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2015, 2016 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -import { action, observable, transaction } from 'mobx'; - -const CHECK_INTERVAL = 1 * 60 * 1000; - -export default class UpgradeStore { - @observable available = null; - @observable consensusCapability = null; - @observable upgrading = null; - @observable version = null; - - constructor (api) { - this._api = api; - - this.checkUpgrade(); - setInterval(this.checkUpgrade, CHECK_INTERVAL); - } - - @action setUpgrading () { - this.upgrading = this.available; - } - - @action setVersions (available, version, consensusCapability) { - transaction(() => { - this.available = available; - this.consensusCapability = consensusCapability; - this.version = version; - }); - } - - checkUpgrade = () => { - Promise - .all([ - this._api.parity.upgradeReady(), - this._api.parity.consensusCapability(), - this._api.parity.versionInfo() - ]) - .then(([available, consensusCapability, version]) => { - console.log('[checkUpgrade]', 'available:', available, 'version:', version, 'consensusCapability:', consensusCapability); - this.setVersions(available, version, consensusCapability); - }) - .catch((error) => { - console.warn('checkUpgrade', error); - }); - } - - executeUpgrade = () => { - this.setUpgrading(); - - return this._api.parity.executeUpgrade(); - } -} diff --git a/js/src/views/Application/Container/container.js b/js/src/views/Application/Container/container.js index 275f8999c6c..421483e54ce 100644 --- a/js/src/views/Application/Container/container.js +++ b/js/src/views/Application/Container/container.js @@ -29,20 +29,23 @@ export default class Container extends Component { static propTypes = { children: PropTypes.node.isRequired, onCloseFirstRun: PropTypes.func, - showFirstRun: PropTypes.bool + showFirstRun: PropTypes.bool, + upgradeStore: PropTypes.object.isRequired }; render () { const { muiTheme } = this.context; - const { children, onCloseFirstRun, showFirstRun } = this.props; + const { children, onCloseFirstRun, showFirstRun, upgradeStore } = this.props; return ( - + - + { children } diff --git a/js/src/views/Application/Status/status.css b/js/src/views/Application/Status/status.css index 8721bc4c2b8..4eeb4b918e3 100644 --- a/js/src/views/Application/Status/status.css +++ b/js/src/views/Application/Status/status.css @@ -14,55 +14,52 @@ /* You should have received a copy of the GNU General Public License /* along with Parity. If not, see . */ + .status { - position: fixed; + align-items: center; + background-color: rgba(0, 0, 0, 0.8); bottom: 0; + color: #ccc; + display: flex; + font-size: 0.75em; left: 0; + padding: .4em .5em; + position: fixed; right: 0; z-index: 1000; - display: flex; - align-items: center; - padding: .4em .5em; - font-size: x-small; - color: #ccc; - background-color: rgba(0, 0, 0, 0.8); -} - -.enode { - word-wrap: break-word; -} - -.enode > * { - display: inline-block; - margin: 0 .25em; - vertical-align: middle; -} -.enode > :last-child { - margin-right: 0; } .netinfo { - display: flex; - flex-grow: 1; - align-items: center; color: #ddd; -} + flex-grow: 1; + text-align: right; + vertical-align: middle; + text-align: right; -.netinfo > * { - margin-left: 1em; + div { + display: inline-block; + margin-left: 1em; + } } .network { - padding: 0.25em 0.5em; - border-radius: .4em; + border-radius: 0.4em; line-height: 1.2; + padding: 0.25em 0.5em; text-transform: uppercase; -} -.networklive { - background: rgb(0, 136, 0); + &.live { + background: rgb(0, 136, 0); + } + + &.test { + background: rgb(136, 0, 0); + } } -.networktest { - background: rgb(136, 0, 0); +.upgrade { + div { + display: inline-block; + margin-left: 1em; + } } diff --git a/js/src/views/Application/Status/status.js b/js/src/views/Application/Status/status.js index 8d772483880..1aded4b887e 100644 --- a/js/src/views/Application/Status/status.js +++ b/js/src/views/Application/Status/status.js @@ -15,78 +15,118 @@ // along with Parity. If not, see . import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { BlockStatus } from '~/ui'; -import CopyToClipboard from '~/ui/CopyToClipboard'; import styles from './status.css'; class Status extends Component { static propTypes = { - blockNumber: PropTypes.object.isRequired, clientVersion: PropTypes.string, - enode: PropTypes.string, - netPeers: PropTypes.object, + isTest: PropTypes.bool, netChain: PropTypes.string, - isTest: PropTypes.bool + netPeers: PropTypes.object, + upgradeStore: PropTypes.object.isRequired } render () { - const { blockNumber, clientVersion, netChain, netPeers, isTest } = this.props; - const netStyle = `${styles.network} ${styles[isTest ? 'networktest' : 'networklive']}`; - - if (!blockNumber) { - return null; - } + const { clientVersion, isTest, netChain, netPeers } = this.props; return (
{ clientVersion }
+
+ { this.renderConsensus() } + { this.renderUpgradeButton() } +
-
- { isTest ? 'test' : netChain } +
+ { netChain }
{ netPeers.active.toFormat() }/{ netPeers.connected.toFormat() }/{ netPeers.max.toFormat() } peers
- { this.renderEnode() }
); } - renderEnode () { - const { enode } = this.props; + renderConsensus () { + const { upgradeStore } = this.props; - if (!enode) { - return null; + if (upgradeStore.consensusCapability === 'capable') { + return ( +
+ +
+ ); + } else if (upgradeStore.consensusCapability.capableUntil) { + return ( +
+ +
+ ); + } else if (upgradeStore.consensusCapability.incapableSince) { + return ( +
+ +
+ ); } - const [protocol, rest] = enode.split('://'); - const [id, host] = rest.split('@'); - const abbreviated = `${protocol}://${id.slice(0, 3)}…${id.slice(-3)}@${host}`; + return ( +
+ +
+ ); + } + + renderUpgradeButton () { + const { upgradeStore } = this.props; + + if (!upgradeStore.available) { + return null; + } return ( -
- -
{ abbreviated }
+ ); } } function mapStateToProps (state) { - const { blockNumber, clientVersion, enode, netPeers, netChain, isTest } = state.nodeStatus; + const { clientVersion, netPeers, netChain, isTest } = state.nodeStatus; return { - blockNumber, clientVersion, - enode, netPeers, netChain, isTest diff --git a/js/src/views/Application/application.css b/js/src/views/Application/application.css index e6f97f10526..9d957d6c913 100644 --- a/js/src/views/Application/application.css +++ b/js/src/views/Application/application.css @@ -22,5 +22,5 @@ } .content { - padding-bottom: 1em; + padding-bottom: 1.25em; } diff --git a/js/src/views/Application/application.js b/js/src/views/Application/application.js index c536f10dfe4..49d299661ee 100644 --- a/js/src/views/Application/application.js +++ b/js/src/views/Application/application.js @@ -19,6 +19,8 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { observer } from 'mobx-react'; +import UpgradeStore from '~/modals/UpgradeParity/store'; + import Connection from '../Connection'; import ParityBar from '../ParityBar'; @@ -42,14 +44,15 @@ class Application extends Component { } static propTypes = { + blockNumber: PropTypes.object, children: PropTypes.node, - netChain: PropTypes.string, isTest: PropTypes.bool, - pending: PropTypes.array, - blockNumber: PropTypes.object + netChain: PropTypes.string, + pending: PropTypes.array } store = new Store(this.context.api); + upgradeStore = new UpgradeStore(this.context.api); render () { const [root] = (window.location.hash || '').replace('#/', '').split('/'); @@ -71,12 +74,13 @@ class Application extends Component { } renderApp () { - const { children, pending, netChain, isTest, blockNumber } = this.props; + const { blockNumber, children, pending, netChain, isTest } = this.props; return ( + upgradeStore={ this.upgradeStore } + onCloseFirstRun={ this.store.closeFirstrun } + showFirstRun={ this.store.firstrunVisible }> { children }
- { blockNumber ? () : null } + { + blockNumber + ? + : null + } ); @@ -102,16 +110,16 @@ class Application extends Component { } function mapStateToProps (state) { - const { netChain, isTest, blockNumber } = state.nodeStatus; + const { blockNumber, netChain, isTest } = state.nodeStatus; const { hasAccounts } = state.personal; const { pending } = state.signer; return { + blockNumber, hasAccounts, - netChain, isTest, - pending, - blockNumber + netChain, + pending }; } From 7330612bfbccd2880dc41503d17807587d2040b3 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 14 Dec 2016 15:56:01 +0100 Subject: [PATCH 68/87] Toggle upgrade modal via upgrade link --- js/src/modals/UpgradeParity/store.js | 80 ++++++----- js/src/modals/UpgradeParity/store.spec.js | 58 ++++++++ js/src/modals/UpgradeParity/upgradeParity.css | 10 +- js/src/modals/UpgradeParity/upgradeParity.js | 131 ++++++++++-------- js/src/ui/Modal/Title/title.js | 12 +- js/src/ui/Modal/modal.js | 4 +- 6 files changed, 199 insertions(+), 96 deletions(-) create mode 100644 js/src/modals/UpgradeParity/store.spec.js diff --git a/js/src/modals/UpgradeParity/store.js b/js/src/modals/UpgradeParity/store.js index 461231fd7ec..466a588e6e1 100644 --- a/js/src/modals/UpgradeParity/store.js +++ b/js/src/modals/UpgradeParity/store.js @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import { action, observable, transaction } from 'mobx'; +import { action, computed, observable, transaction } from 'mobx'; import store from 'store'; const LS_UPDATE = '_parity::update'; @@ -22,10 +22,10 @@ const LS_UPDATE = '_parity::update'; const A_MINUTE = 60 * 1000; const A_DAY = 24 * 60 * A_MINUTE; -const STEP_INFO = 1; -const STEP_UPDATING = 2; -const STEP_COMPLETED = 3; -const STEP_ERROR = 4; +const STEP_INFO = 0; +const STEP_UPDATING = 1; +const STEP_COMPLETED = 2; +const STEP_ERROR = 3; const CHECK_INTERVAL = 1 * A_MINUTE; @@ -34,6 +34,7 @@ export default class Store { @observable consensusCapability = null; @observable closed = true; @observable error = null; + @observable remindAt = 0; @observable step = 0; @observable upgrading = null; @observable version = null; @@ -47,37 +48,17 @@ export default class Store { setInterval(this.checkUpgrade, CHECK_INTERVAL); } - @action setUpgrading () { - transaction(() => { - this.upgrading = this.available; - this.setStep(STEP_UPDATING); - }); + @computed get isVisible () { + return !this.closed && Date.now() >= this.remindAt; } - @action setVersions (available, version, consensusCapability) { + @action closeModal = () => { transaction(() => { - this.available = available; - this.consensusCapability = consensusCapability; - this.version = version; + this.closed = true; + this.setStep(0, null); }); } - checkUpgrade = () => { - Promise - .all([ - this._api.parity.upgradeReady(), - this._api.parity.consensusCapability(), - this._api.parity.versionInfo() - ]) - .then(([available, consensusCapability, version]) => { - console.log('[checkUpgrade]', 'available:', available, 'version:', version, 'consensusCapability:', consensusCapability); - this.setVersions(available, version, consensusCapability); - }) - .catch((error) => { - console.warn('checkUpgrade', error); - }); - } - @action loadStorage = () => { const values = store.get(LS_UPDATE) || {}; @@ -93,7 +74,22 @@ export default class Store { @action setStep = (step, error = null) => { transaction(() => { this.error = error; - this.setp = step; + this.step = step; + }); + } + + @action setUpgrading () { + transaction(() => { + this.upgrading = this.available; + this.setStep(STEP_UPDATING, null); + }); + } + + @action setVersions (available, version, consensusCapability) { + transaction(() => { + this.available = available; + this.consensusCapability = consensusCapability; + this.version = version; }); } @@ -112,7 +108,7 @@ export default class Store { throw new Error('Unable to complete update'); } - this.setStep(STEP_COMPLETED); + this.setStep(STEP_COMPLETED, null); }) .catch((error) => { console.error('upgradeNow', error); @@ -120,6 +116,26 @@ export default class Store { this.setStep(STEP_ERROR, error); }); } + + checkUpgrade = () => { + if (!this._api) { + return; + } + + Promise + .all([ + this._api.parity.upgradeReady(), + this._api.parity.consensusCapability(), + this._api.parity.versionInfo() + ]) + .then(([available, consensusCapability, version]) => { + console.log('[checkUpgrade]', 'available:', available, 'version:', version, 'consensusCapability:', consensusCapability); + this.setVersions(available, version, consensusCapability); + }) + .catch((error) => { + console.warn('checkUpgrade', error); + }); + } } export { diff --git a/js/src/modals/UpgradeParity/store.spec.js b/js/src/modals/UpgradeParity/store.spec.js new file mode 100644 index 00000000000..1e0111284b9 --- /dev/null +++ b/js/src/modals/UpgradeParity/store.spec.js @@ -0,0 +1,58 @@ +// Copyright 2015, 2016 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import Store from './store'; + +let store; + +describe('modals/UpgradeParity/store', () => { + describe('@actions', () => { + beforeEach(() => { + store = new Store(); + }); + + describe('openModal & closeModal', () => { + it('toggles between the closed states', () => { + expect(store.closed).to.be.true; + store.openModal(); + expect(store.closed).to.be.false; + store.closeModal(); + expect(store.closed).to.be.true; + }); + + it('resets the step state upon closing', () => { + store.setStep(5, 'soem error'); + store.closeModal(); + expect(store.step).to.equal(0); + expect(store.error).to.be.null; + }); + }); + + describe('setStep', () => { + it('sets the step as provided', () => { + expect(store.step).to.equal(0); + store.setStep(3); + expect(store.step).to.equal(3); + }); + + it('sets the error when provided', () => { + expect(store.error).to.be.null; + store.setStep(3, new Error('some error')); + expect(store.error).to.match(/some error/); + }); + }); + }); +}); diff --git a/js/src/modals/UpgradeParity/upgradeParity.css b/js/src/modals/UpgradeParity/upgradeParity.css index 962bbc58cb1..bca0fe47d46 100644 --- a/js/src/modals/UpgradeParity/upgradeParity.css +++ b/js/src/modals/UpgradeParity/upgradeParity.css @@ -16,11 +16,17 @@ */ .error { - padding-top: 1.5em; + padding-top: 1.25em; } .infoStep { div+div { - padding-top: 1.5em; + padding-top: 1.25em; } } + +.version { + display: inline; + opacity: 0.5; + white-space: normal; +} diff --git a/js/src/modals/UpgradeParity/upgradeParity.js b/js/src/modals/UpgradeParity/upgradeParity.js index 7f13d87ea87..3e67c42f29a 100644 --- a/js/src/modals/UpgradeParity/upgradeParity.js +++ b/js/src/modals/UpgradeParity/upgradeParity.js @@ -19,7 +19,7 @@ import React, { Component, PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; import { Button } from '~/ui'; -import { CancelIcon, DoneIcon, NextIcon, SnoozeIcon } from '~/ui/Icons'; +import { CancelIcon, DoneIcon, NextIcon } from '~/ui/Icons'; import Modal, { Busy, Completed } from '~/ui/Modal'; import { STEP_COMPLETED, STEP_ERROR, STEP_INFO, STEP_UPDATING } from './store'; @@ -38,7 +38,7 @@ export default class UpgradeParity extends Component { render () { const { store } = this.props; - if (!store.showUpgrade) { + if (!store.isVisible) { return null; } @@ -55,11 +55,11 @@ export default class UpgradeParity extends Component { defaultMessage='upgrading parity' />, store.step === STEP_ERROR ? - : + : ] } visible> { this.renderStep() } @@ -73,6 +73,7 @@ export default class UpgradeParity extends Component { const closeButton =
- ); - } else if (store.consensusCapability.capableUntil) { - consensusInfo = ( -
- -
- ); - } else if (store.consensusCapability.incapableSince) { - consensusInfo = ( -
- -
- ); - } - return (
@@ -174,11 +136,11 @@ export default class UpgradeParity extends Component { id='upgradeParity.info.upgrade' defaultMessage='A new version of Parity, version {newversion} is available as an upgrade from your current version {currentversion}' values={ { - currentversion, - newversion + currentversion:
{ currentversion }
, + newversion:
{ newversion }
} } />
- { consensusInfo } + { this.renderConsensusInfo() }
); @@ -190,7 +152,7 @@ export default class UpgradeParity extends Component { id='upgradeParity.busy' defaultMessage='Your upgrade to Parity {newversion} is currently in progress' values={ { - newversion + newversion:
{ newversion }
} } /> } /> ); @@ -202,7 +164,7 @@ export default class UpgradeParity extends Component { id='upgradeParity.completed' defaultMessage='Your upgrade to Parity {newversion} has been successfully completed.' values={ { - newversion + newversion:
{ newversion }
} } /> ); @@ -215,7 +177,7 @@ export default class UpgradeParity extends Component { id='upgradeParity.failed' defaultMessage='Your upgrade to Parity {newversion} has failed with an error.' values={ { - newversion + newversion:
{ newversion }
} } />
@@ -226,8 +188,63 @@ export default class UpgradeParity extends Component { } } - renderVersion (versionInfo) { - const { track, version } = versionInfo; + renderConsensusInfo () { + const { store } = this.props; + const { consensusCapability } = store; + + if (consensusCapability) { + if (consensusCapability === 'capable') { + return ( +
+ +
+ ); + } else if (consensusCapability.capableUntil) { + return ( +
+ +
+ ); + } else if (consensusCapability.incapableSince) { + return ( +
+ +
+ ); + } + } + + return ( +
+ +
+ ); + } + + formatVersion (struct) { + if (!struct || !struct.version) { + return ( + + ); + } + + const { track, version } = struct.version; return `${version.major}.${version.minor}.${version.patch}-${track}`; } diff --git a/js/src/ui/Modal/Title/title.js b/js/src/ui/Modal/Title/title.js index 14308ee0b4a..920d1b13c50 100644 --- a/js/src/ui/Modal/Title/title.js +++ b/js/src/ui/Modal/Title/title.js @@ -36,7 +36,13 @@ export default class Title extends Component { return (
-

{ steps ? steps[current] : title }

+

+ { + steps + ? steps[current] + : title + } +

{ this.renderSteps() } { this.renderWaiting() }
@@ -63,10 +69,10 @@ export default class Title extends Component { renderTimeline () { const { steps } = this.props; - return steps.map((label) => { + return steps.map((label, index) => { return ( + key={ index }> { label } diff --git a/js/src/ui/Modal/modal.js b/js/src/ui/Modal/modal.js index f72c3ffb1b5..0b56692a8a1 100644 --- a/js/src/ui/Modal/modal.js +++ b/js/src/ui/Modal/modal.js @@ -14,10 +14,10 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . +import { Dialog } from 'material-ui'; import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Dialog } from 'material-ui'; import { nodeOrStringProptype } from '~/util/proptypes'; @@ -51,7 +51,7 @@ class Modal extends Component { render () { const { muiTheme } = this.context; - const { actions, busy, className, current, children, compact, steps, waiting, title, visible, settings } = this.props; + const { actions, busy, children, className, current, compact, settings, steps, title, visible, waiting } = this.props; const contentStyle = muiTheme.parity.getBackgroundStyle(null, settings.backgroundSeed); const header = ( Date: Wed, 14 Dec 2016 21:59:00 +0100 Subject: [PATCH 69/87] Don't put sha3s. --- .gitlab-ci.yml | 4 ---- ethcore/res/ethereum/tests | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index def1c0466cb..81eb9f7b219 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,6 @@ linux-stable: - aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/parity --body target/release/parity - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/parity.md5 --body parity.md5 - - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/parity.sha3 --body parity.sha3 - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/"parity_"$VER"_amd64.deb" --body "parity_"$VER"_amd64.deb" - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/"parity_"$VER"_amd64.deb.md5" --body "parity_"$VER"_amd64.deb.md5" - curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://icarus.parity.io/push-build/$CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu @@ -143,7 +142,6 @@ linux-i686: - aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/$PLATFORM - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/parity --body target/$PLATFORM/release/parity - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/parity.md5 --body parity.md5 - - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/parity.sha3 --body parity.sha3 - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/"parity_"$VER"_i386.deb" --body "parity_"$VER"_i386.deb" - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/"parity_"$VER"_i386.deb.md5" --body "parity_"$VER"_i386.deb.md5" - curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://icarus.parity.io/push-build/$CI_BUILD_REF_NAME/$PLATFORM @@ -340,7 +338,6 @@ darwin: - aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/$PLATFORM - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/parity --body target/release/parity - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/parity.md5 --body parity.md5 - - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/parity.sha3 --body parity.sha3 - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/"parity-"$VER"-osx-installer-EXPERIMENTAL.pkg" --body "parity-"$VER"-osx-installer-EXPERIMENTAL.pkg" - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$PLATFORM/"parity-"$VER"-osx-installer-EXPERIMENTAL.pkg.md5" --body "parity-"$VER"-osx-installer-EXPERIMENTAL.pkg.md5" - curl --data "commit=$CI_BUILD_REF&sha3=$SHA3&filename=parity&secret=$RELEASES_SECRET" http://icarus.parity.io/push-build/$CI_BUILD_REF_NAME/$PLATFORM @@ -397,7 +394,6 @@ windows: - aws s3 rm --recursive s3://%S3_BUCKET%/%CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc - aws s3api put-object --bucket %S3_BUCKET% --key %CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc/parity.exe --body target\release\parity.exe - aws s3api put-object --bucket %S3_BUCKET% --key %CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc/parity.exe.md5 --body target\release\parity.exe.md5 - - aws s3api put-object --bucket %S3_BUCKET% --key %CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc/parity.exe.sha3 --body target\release\parity.exe.sha3 - aws s3api put-object --bucket %S3_BUCKET% --key %CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc/parity.zip --body target\release\parity.zip - aws s3api put-object --bucket %S3_BUCKET% --key %CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc/parity.zip.md5 --body target\release\parity.zip.md5 - aws s3api put-object --bucket %S3_BUCKET% --key %CI_BUILD_REF_NAME%/x86_64-pc-windows-msvc/InstallParity.exe --body nsis\InstallParity.exe diff --git a/ethcore/res/ethereum/tests b/ethcore/res/ethereum/tests index 9028c4801fd..e8f4624b7f1 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8 +Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be From 5e59e0b9d30ec3cac34b1eb9572a44327d6f15c2 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 15:35:46 +0100 Subject: [PATCH 70/87] Fix build. --- updater/src/updater.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/src/updater.rs b/updater/src/updater.rs index 75637f1392c..aed62873da1 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -289,7 +289,7 @@ impl Updater { } impl ChainNotify for Updater { - fn new_blocks(&self, _imported: Vec<H256>, _invalid: Vec<H256>, _enacted: Vec<H256>, _retracted: Vec<H256>, _sealed: Vec<H256>, _duration: u64) { + fn new_blocks(&self, _imported: Vec<H256>, _invalid: Vec<H256>, _enacted: Vec<H256>, _retracted: Vec<H256>, _sealed: Vec<H256>, _proposed: Vec<Bytes>, _duration: u64) { // TODO: something like this // if !self.client.upgrade().map_or(true, |c| c.is_major_syncing()) { self.poll(); From 9dd1268b69c7d924ba14751a2effca397bb34e79 Mon Sep 17 00:00:00 2001 From: Jaco Greeff <jaco@ethcore.io> Date: Thu, 15 Dec 2016 15:56:50 +0100 Subject: [PATCH 71/87] Add keys for steps (future-proof) --- js/src/modals/UpgradeParity/store.js | 2 +- js/src/modals/UpgradeParity/upgradeParity.js | 40 +++++++++++--------- js/src/ui/Modal/Title/title.js | 2 +- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/js/src/modals/UpgradeParity/store.js b/js/src/modals/UpgradeParity/store.js index 466a588e6e1..d7a4efd3e69 100644 --- a/js/src/modals/UpgradeParity/store.js +++ b/js/src/modals/UpgradeParity/store.js @@ -25,7 +25,7 @@ const A_DAY = 24 * 60 * A_MINUTE; const STEP_INFO = 0; const STEP_UPDATING = 1; const STEP_COMPLETED = 2; -const STEP_ERROR = 3; +const STEP_ERROR = 2; const CHECK_INTERVAL = 1 * A_MINUTE; diff --git a/js/src/modals/UpgradeParity/upgradeParity.js b/js/src/modals/UpgradeParity/upgradeParity.js index 3e67c42f29a..a11e1a1fe96 100644 --- a/js/src/modals/UpgradeParity/upgradeParity.js +++ b/js/src/modals/UpgradeParity/upgradeParity.js @@ -49,16 +49,20 @@ export default class UpgradeParity extends Component { steps={ [ <FormattedMessage id='upgradeParity.step.info' + key='info' defaultMessage='upgrade available' />, <FormattedMessage + key='updating' id='upgradeParity.step.updating' defaultMessage='upgrading parity' />, store.step === STEP_ERROR ? <FormattedMessage id='upgradeParity.step.error' + key='error' defaultMessage='error' /> : <FormattedMessage id='upgradeParity.step.completed' + key='completed' defaultMessage='upgrade completed' /> ] } visible> @@ -158,6 +162,25 @@ export default class UpgradeParity extends Component { ); case STEP_COMPLETED: + case STEP_ERROR: + if (store.error) { + return ( + <Completed> + <div> + <FormattedMessage + id='upgradeParity.failed' + defaultMessage='Your upgrade to Parity {newversion} has failed with an error.' + values={ { + newversion: <div className={ styles.version }>{ newversion }</div> + } } /> + </div> + <div className={ styles.error }> + { store.error.message } + </div> + </Completed> + ); + } + return ( <Completed> <FormattedMessage @@ -168,23 +191,6 @@ export default class UpgradeParity extends Component { } } /> </Completed> ); - - case STEP_ERROR: - return ( - <Completed> - <div> - <FormattedMessage - id='upgradeParity.failed' - defaultMessage='Your upgrade to Parity {newversion} has failed with an error.' - values={ { - newversion: <div className={ styles.version }>{ newversion }</div> - } } /> - </div> - <div className={ styles.error }> - { store.error.message } - </div> - </Completed> - ); } } diff --git a/js/src/ui/Modal/Title/title.js b/js/src/ui/Modal/Title/title.js index 920d1b13c50..27197be283a 100644 --- a/js/src/ui/Modal/Title/title.js +++ b/js/src/ui/Modal/Title/title.js @@ -72,7 +72,7 @@ export default class Title extends Component { return steps.map((label, index) => { return ( <Step - key={ index }> + key={ label.key || index }> <StepLabel> { label } </StepLabel> From fa319ff64cbe432864c1f60b0dd4c3214fa3b0d8 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 18:24:18 +0100 Subject: [PATCH 72/87] Remove duplicate line. --- Cargo.lock | 6 +++--- Cargo.toml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 83b7e78dcca..7ad67559f7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1329,7 +1329,6 @@ dependencies = [ ] [[package]] -<<<<<<< HEAD name = "parity-hash-fetch" version = "1.5.0" dependencies = [ @@ -1339,7 +1338,9 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", -======= +] + +[[package]] name = "parity-rpc-client" version = "1.4.0" dependencies = [ @@ -1357,7 +1358,6 @@ dependencies = [ "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "ws 0.5.3 (git+https://github.com/ethcore/ws-rs.git?branch=mio-upstream-stable)", ->>>>>>> origin/master ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8c621b3873e..632d8d2a7b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,6 @@ ethcore-ipc-hypervisor = { path = "ipc/hypervisor" } ethcore-logger = { path = "logger" } ethcore-stratum = { path = "stratum" } ethcore-dapps = { path = "dapps", optional = true } -clippy = { version = "0.0.103", optional = true} rpc-cli = { path = "rpc_cli" } parity-rpc-client = { path = "rpc_client" } ethcore-light = { path = "ethcore/light" } From 4a2b418fc28c998e670033e0489c3ebba4057bbe Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 18:51:59 +0100 Subject: [PATCH 73/87] Configurable update tracks to help testing. --- Cargo.lock | 17 +++++++++-- ipc-common-types/src/types/release_track.rs | 10 ++++-- parity/cli/config.full.toml | 1 + parity/cli/mod.rs | 4 +++ parity/cli/usage.txt | 13 ++++++-- parity/configuration.rs | 10 +++++- rpc/src/v1/types/consensus_status.rs | 4 +++ updater/src/updater.rs | 34 ++++++++++----------- 8 files changed, 67 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ad67559f7a..847e36134e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,8 +33,8 @@ dependencies = [ "num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-hash-fetch 1.5.0", - "parity-updater 1.5.0", "parity-rpc-client 1.4.0", + "parity-updater 1.5.0", "regex 0.1.68 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.1.0", "rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -890,7 +890,7 @@ version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "parking_lot 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1398,6 +1398,17 @@ dependencies = [ "parity-hash-fetch 1.5.0", ] +[[package]] +name = "parking_lot" +version = "0.2.8" +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)", + "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)", +] + [[package]] name = "parking_lot" version = "0.3.6" @@ -1650,6 +1661,7 @@ 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)", "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)", ] [[package]] @@ -2265,6 +2277,7 @@ dependencies = [ "checksum owning_ref 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8d91377085359426407a287ab16884a0111ba473aa6844ff01d4ec20ce3d75e7" "checksum parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "98378dec0a185da2b7180308752f0bad73aaa949c3e0a3b0528d0e067945f7ab" "checksum parity-ui-precompiled 1.4.0 (git+https://github.com/ethcore/js-precompiled.git)" = "<none>" +"checksum parking_lot 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "968f685642555d2f7e202c48b8b11de80569e9bfea817f7f12d7c61aac62d4e6" "checksum parking_lot 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e1435e7a2a00dfebededd6c6bdbd54008001e94b4a2aadd6aef0dc4c56317621" "checksum parking_lot_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb1b97670a2ffadce7c397fb80a3d687c4f3060140b885621ef1653d0e5d5068" "checksum phf 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)" = "447d9d45f2e0b4a9b532e808365abf18fc211be6ca217202fcd45236ef12f026" diff --git a/ipc-common-types/src/types/release_track.rs b/ipc-common-types/src/types/release_track.rs index 9b9e7d1e671..3fcc0bb6497 100644 --- a/ipc-common-types/src/types/release_track.rs +++ b/ipc-common-types/src/types/release_track.rs @@ -27,7 +27,9 @@ pub enum ReleaseTrack { Beta, /// Nightly track. Nightly, - /// No known track. + /// Testing track. + Testing, + /// No known track, also "current executable's track" when it's not yet known. Unknown, } @@ -37,7 +39,8 @@ impl fmt::Display for ReleaseTrack { ReleaseTrack::Stable => "stable", ReleaseTrack::Beta => "beta", ReleaseTrack::Nightly => "nightly", - ReleaseTrack::Unknown => "unknown", + ReleaseTrack::Testing => "testing", + ReleaseTrack::Unknown => "unknown", }) } } @@ -48,6 +51,7 @@ impl<'a> From<&'a str> for ReleaseTrack { "stable" => ReleaseTrack::Stable, "beta" => ReleaseTrack::Beta, "nightly" => ReleaseTrack::Nightly, + "testing" => ReleaseTrack::Testing, _ => ReleaseTrack::Unknown, } } @@ -59,6 +63,7 @@ impl From<u8> for ReleaseTrack { 1 => ReleaseTrack::Stable, 2 => ReleaseTrack::Beta, 3 => ReleaseTrack::Nightly, + 4 => ReleaseTrack::Testing, _ => ReleaseTrack::Unknown, } } @@ -70,6 +75,7 @@ impl Into<u8> for ReleaseTrack { ReleaseTrack::Stable => 1, ReleaseTrack::Beta => 2, ReleaseTrack::Nightly => 3, + ReleaseTrack::Testing => 4, ReleaseTrack::Unknown => 0, } } diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index 2f420e0a7f9..ed204e0f31e 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -3,6 +3,7 @@ mode = "last" mode_timeout = 300 mode_alarm = 3600 auto_update = "critical" +releases_track = "current" no_download = false no_consensus = false diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 91f407e1e6e..3ae20be03a8 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -86,6 +86,7 @@ usage! { flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(), flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(), flag_auto_update: String = "critical", or |c: &Config| otry!(c.parity).auto_update.clone(), + flag_releases_track: String = "current", or |c: &Config| otry!(c.parity).releases_track.clone(), flag_no_download: bool = false, or |c: &Config| otry!(c.parity).no_download.clone(), flag_no_consensus: bool = false, or |c: &Config| otry!(c.parity).no_consensus.clone(), flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(), @@ -313,6 +314,7 @@ struct Operating { mode_timeout: Option<u64>, mode_alarm: Option<u64>, auto_update: Option<String>, + releases_track: Option<String>, no_download: Option<bool>, no_consensus: Option<bool>, chain: Option<String>, @@ -540,6 +542,7 @@ mod tests { flag_mode_timeout: 300u64, flag_mode_alarm: 3600u64, flag_auto_update: "critical".into(), + flag_releases_track: "current".into(), flag_no_download: false, flag_no_consensus: false, flag_chain: "xyz".into(), @@ -717,6 +720,7 @@ mod tests { mode_timeout: Some(15u64), mode_alarm: Some(10u64), auto_update: None, + releases_track: None, no_download: None, no_consensus: None, chain: Some("./chain.json".into()), diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index e05d94751a9..b2f033bfc6f 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -34,12 +34,19 @@ Operating Options: --mode-alarm SECS Specify the number of seconds before auto sleep reawake timeout occurs when mode is passive (default: {flag_mode_alarm}). - --auto-update TRACK Set a release track to automatically update and + --auto-update SET Set a releases set to automatically update and install. - all - All updates in the current release track. + all - All updates in the our release track. critical - Only consensus/security updates. none - No updates will be auto-installed. (default: {flag_auto_update}). + --releases-track TRACK Set which release track we should use for updates. + stable - Stable releases. + beta - Beta releases. + nightly - Nightly releases (unstable). + testing - Testing releases (do not use). + current - Whatever track this executable was + released on (default: {flag_releases_track}). --no-download Normally new releases will be downloaded ready for updating. This disables it. Not recommended. (default: {flag_no_download}). @@ -47,7 +54,7 @@ Operating Options: issues regarding consensus. Not recommended. (default: {flag_no_consensus}). --force-direct Run the originally installed version of Parity, - ignoring any updates that have since been installed. + ignoring any updates that have since been installed. --chain CHAIN Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, diff --git a/parity/configuration.rs b/parity/configuration.rs index 4019c4ec3a9..577f8a6c9f1 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -37,7 +37,7 @@ use ethcore_logger::Config as LogConfig; use dir::Directories; use dapps::Configuration as DappsConfiguration; use signer::{Configuration as SignerConfiguration}; -use updater::{UpdatePolicy, UpdateFilter}; +use updater::{UpdatePolicy, UpdateFilter, ReleaseTrack}; use run::RunCmd; use blockchain::{BlockchainCmd, ImportBlockchain, ExportBlockchain, KillBlockchain, ExportState, DataFormat}; use presale::ImportWallet; @@ -693,6 +693,14 @@ impl Configuration { "all" => UpdateFilter::All, _ => return Err("Invalid value for `--auto-update`. See `--help` for more information.".into()), }, + track: match self.args.flag_releases_track.as_ref() { + "stable" => ReleaseTrack::Stable, + "beta" => ReleaseTrack::Beta, + "nightly" => ReleaseTrack::Nightly, + "testing" => ReleaseTrack::Testing, + "current" => ReleaseTrack::Unknown, + _ => return Err("Invalid value for `--releases-track`. See `--help` for more information.".into()), + }, }) } diff --git a/rpc/src/v1/types/consensus_status.rs b/rpc/src/v1/types/consensus_status.rs index fabc3a1d866..f420d426e85 100644 --- a/rpc/src/v1/types/consensus_status.rs +++ b/rpc/src/v1/types/consensus_status.rs @@ -58,6 +58,9 @@ pub enum ReleaseTrack { /// Nightly track. #[serde(rename="nightly")] Nightly, + /// Testing track. + #[serde(rename="testing")] + Testing, /// No known track. #[serde(rename="null")] Unknown, @@ -69,6 +72,7 @@ impl Into<ReleaseTrack> for updater::ReleaseTrack { updater::ReleaseTrack::Stable => ReleaseTrack::Stable, updater::ReleaseTrack::Beta => ReleaseTrack::Beta, updater::ReleaseTrack::Nightly => ReleaseTrack::Nightly, + updater::ReleaseTrack::Testing => ReleaseTrack::Testing, updater::ReleaseTrack::Unknown => ReleaseTrack::Unknown, } } diff --git a/updater/src/updater.rs b/updater/src/updater.rs index aed62873da1..736d7e8a840 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -18,7 +18,7 @@ use std::sync::{Arc, Weak}; use std::{fs, env}; use std::io::Write; use std::path::{PathBuf}; -//use util::misc::platform; +use util::misc::platform; use ipc_common_types::{VersionInfo, ReleaseTrack}; use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; @@ -47,6 +47,8 @@ pub struct UpdatePolicy { pub require_consensus: bool, /// Which of those downloaded should be automatically installed. pub filter: UpdateFilter, + /// Which track we should be following. + pub track: ReleaseTrack, } impl Default for UpdatePolicy { @@ -55,6 +57,7 @@ impl Default for UpdatePolicy { enable_downloading: false, require_consensus: true, filter: UpdateFilter::None, + track: ReleaseTrack::Unknown, } } } @@ -89,14 +92,9 @@ pub struct Updater { const CLIENT_ID: &'static str = "parity"; -// TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -fn platform() -> String { - "test".to_owned() -} - impl Updater { pub fn new(client: Weak<BlockChainClient>, update_policy: UpdatePolicy) -> Arc<Self> { - let mut u = Updater { + let r = Arc::new(Updater { update_policy: update_policy, weak_self: Mutex::new(Default::default()), client: client.clone(), @@ -105,14 +103,7 @@ impl Updater { exit_handler: Mutex::new(None), this: VersionInfo::this(), state: Mutex::new(Default::default()), - }; - - // TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REMOVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - if u.this.track == ReleaseTrack::Unknown { - u.this.track = ReleaseTrack::Nightly; - } - - let r = Arc::new(u); + }); *r.fetcher.lock() = Some(fetch::Client::new(r.clone())); *r.weak_self.lock() = Arc::downgrade(&r); r.poll(); @@ -135,6 +126,13 @@ impl Updater { }) } + fn track(&self) -> ReleaseTrack { + match self.update_policy.track { + ReleaseTrack::Unknown => self.this.track, + x => x, + } + } + fn collect_latest(&self) -> Result<OperationsInfo, String> { if let Some(ref operations) = *self.operations.lock() { let hh: H256 = self.this.hash.into(); @@ -145,15 +143,15 @@ impl Updater { if track > 0 {Some(fork as u64)} else {None} }); - if self.this.track == ReleaseTrack::Unknown { + if self.track() == ReleaseTrack::Unknown { return Err(format!("Current executable ({}) is unreleased.", H160::from(self.this.hash))); } - let latest_in_track = operations.latest_in_track(CLIENT_ID, self.this.track.into())?; + let latest_in_track = operations.latest_in_track(CLIENT_ID, self.track().into())?; let in_track = Self::collect_release_info(operations, &latest_in_track)?; let mut in_minor = Some(in_track.clone()); const PROOF: &'static str = "in_minor initialised and assigned with Some; loop breaks if None assigned; qed"; - while in_minor.as_ref().expect(PROOF).version.track != self.this.track { + while in_minor.as_ref().expect(PROOF).version.track != self.track() { let track = match in_minor.as_ref().expect(PROOF).version.track { ReleaseTrack::Beta => ReleaseTrack::Stable, ReleaseTrack::Nightly => ReleaseTrack::Beta, From d737de0fc0ee89d6c574bbfd21709cd596a7412e Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 19:17:44 +0100 Subject: [PATCH 74/87] Fix tests. --- parity/configuration.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index 577f8a6c9f1..cb8b58f2ae9 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -817,7 +817,7 @@ mod tests { use params::SpecType; use account::{AccountCmd, NewAccount, ImportAccounts, ListAccounts}; use devtools::{RandomTempPath}; - use updater::{UpdatePolicy, UpdateFilter}; + use updater::{UpdatePolicy, UpdateFilter, ReleaseTrack}; use std::io::Write; use std::fs::{File, create_dir}; @@ -1011,7 +1011,7 @@ mod tests { acc_conf: Default::default(), gas_pricer: Default::default(), miner_extras: Default::default(), - update_policy: UpdatePolicy { enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical }, + update_policy: UpdatePolicy { enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Unknown }, mode: Default::default(), tracing: Default::default(), compaction: Default::default(), @@ -1058,15 +1058,15 @@ mod tests { #[test] fn should_parse_updater_options() { // when - let conf0 = parse(&["parity"]); + let conf0 = parse(&["parity", "--release-track=testing"]); let conf1 = parse(&["parity", "--auto-update", "all", "--no-consensus"]); let conf2 = parse(&["parity", "--no-download", "--auto-update=all"]); - let conf3 = parse(&["parity", "--auto-update=xxx"]); + let conf3 = parse(&["parity", "--auto-update=xxx", "--release-track=beta"]); // then - assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical}); - assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: false, filter: UpdateFilter::All}); - assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, require_consensus: true, filter: UpdateFilter::All}); + assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Testing}); + assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: false, filter: UpdateFilter::All, track: ReleaseTrack::Unknown}); + assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, require_consensus: true, filter: UpdateFilter::All, track: ReleaseTrack::Beta}); assert!(conf3.update_policy().is_err()); } From 995fafebee58060355d70e5a3405b7e9baa92b65 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 19:19:50 +0100 Subject: [PATCH 75/87] Fix last remaining test. --- parity/configuration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index cb8b58f2ae9..57be84dca21 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -1060,8 +1060,8 @@ mod tests { // when let conf0 = parse(&["parity", "--release-track=testing"]); let conf1 = parse(&["parity", "--auto-update", "all", "--no-consensus"]); - let conf2 = parse(&["parity", "--no-download", "--auto-update=all"]); - let conf3 = parse(&["parity", "--auto-update=xxx", "--release-track=beta"]); + let conf2 = parse(&["parity", "--no-download", "--auto-update=all", "--release-track=beta"]); + let conf3 = parse(&["parity", "--auto-update=xxx"]); // then assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Testing}); From 801596395e7fc88643d8872453635e436afb77fa Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 19:23:25 +0100 Subject: [PATCH 76/87] --release-track. --- parity/cli/config.full.toml | 2 +- parity/cli/mod.rs | 8 ++++---- parity/cli/usage.txt | 4 ++-- parity/configuration.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index ed204e0f31e..60571b46188 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -3,7 +3,7 @@ mode = "last" mode_timeout = 300 mode_alarm = 3600 auto_update = "critical" -releases_track = "current" +release_track = "current" no_download = false no_consensus = false diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 3ae20be03a8..1b86faadc1a 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -86,7 +86,7 @@ usage! { flag_mode_timeout: u64 = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(), flag_mode_alarm: u64 = 3600u64, or |c: &Config| otry!(c.parity).mode_alarm.clone(), flag_auto_update: String = "critical", or |c: &Config| otry!(c.parity).auto_update.clone(), - flag_releases_track: String = "current", or |c: &Config| otry!(c.parity).releases_track.clone(), + flag_release_track: String = "current", or |c: &Config| otry!(c.parity).release_track.clone(), flag_no_download: bool = false, or |c: &Config| otry!(c.parity).no_download.clone(), flag_no_consensus: bool = false, or |c: &Config| otry!(c.parity).no_consensus.clone(), flag_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(), @@ -314,7 +314,7 @@ struct Operating { mode_timeout: Option<u64>, mode_alarm: Option<u64>, auto_update: Option<String>, - releases_track: Option<String>, + release_track: Option<String>, no_download: Option<bool>, no_consensus: Option<bool>, chain: Option<String>, @@ -542,7 +542,7 @@ mod tests { flag_mode_timeout: 300u64, flag_mode_alarm: 3600u64, flag_auto_update: "critical".into(), - flag_releases_track: "current".into(), + flag_release_track: "current".into(), flag_no_download: false, flag_no_consensus: false, flag_chain: "xyz".into(), @@ -720,7 +720,7 @@ mod tests { mode_timeout: Some(15u64), mode_alarm: Some(10u64), auto_update: None, - releases_track: None, + release_track: None, no_download: None, no_consensus: None, chain: Some("./chain.json".into()), diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index b2f033bfc6f..baf898ad85a 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -40,13 +40,13 @@ Operating Options: critical - Only consensus/security updates. none - No updates will be auto-installed. (default: {flag_auto_update}). - --releases-track TRACK Set which release track we should use for updates. + --release-track TRACK Set which release track we should use for updates. stable - Stable releases. beta - Beta releases. nightly - Nightly releases (unstable). testing - Testing releases (do not use). current - Whatever track this executable was - released on (default: {flag_releases_track}). + released on (default: {flag_release_track}). --no-download Normally new releases will be downloaded ready for updating. This disables it. Not recommended. (default: {flag_no_download}). diff --git a/parity/configuration.rs b/parity/configuration.rs index 57be84dca21..9f9cf654e5d 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -693,7 +693,7 @@ impl Configuration { "all" => UpdateFilter::All, _ => return Err("Invalid value for `--auto-update`. See `--help` for more information.".into()), }, - track: match self.args.flag_releases_track.as_ref() { + track: match self.args.flag_release_track.as_ref() { "stable" => ReleaseTrack::Stable, "beta" => ReleaseTrack::Beta, "nightly" => ReleaseTrack::Nightly, From 4410fb635a6d71939e958fd762e40f55292f69ad Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 19:53:13 +0100 Subject: [PATCH 77/87] Respect system paths. --- parity/configuration.rs | 13 +++++++------ parity/dir.rs | 5 +++++ parity/main.rs | 5 ++--- updater/src/updater.rs | 14 ++++++++------ 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index 9f9cf654e5d..c46dc5e6b11 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -34,7 +34,7 @@ use helpers::{to_duration, to_mode, to_block_id, to_u256, to_pending_set, to_pri geth_ipc_path, parity_ipc_path, to_bootnodes, to_addresses, to_address, to_gas_limit, to_queue_strategy}; use params::{ResealPolicy, AccountsConfig, GasPricerConfig, MinerExtras}; use ethcore_logger::Config as LogConfig; -use dir::Directories; +use dir::{Directories, default_hypervisor_path}; use dapps::Configuration as DappsConfiguration; use signer::{Configuration as SignerConfiguration}; use updater::{UpdatePolicy, UpdateFilter, ReleaseTrack}; @@ -701,6 +701,7 @@ impl Configuration { "current" => ReleaseTrack::Unknown, _ => return Err("Invalid value for `--releases-track`. See `--help` for more information.".into()), }, + path: default_hypervisor_path(), }) } @@ -810,7 +811,7 @@ mod tests { use ethcore::miner::{MinerOptions, PrioritizationStrategy}; use helpers::{default_network_config}; use run::RunCmd; - use dir::Directories; + use dir::{Directories, default_hypervisor_path}; use signer::{Configuration as SignerConfiguration}; use blockchain::{BlockchainCmd, ImportBlockchain, ExportBlockchain, DataFormat, ExportState}; use presale::ImportWallet; @@ -1011,7 +1012,7 @@ mod tests { acc_conf: Default::default(), gas_pricer: Default::default(), miner_extras: Default::default(), - update_policy: UpdatePolicy { enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Unknown }, + update_policy: UpdatePolicy { enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Unknown, path: default_hypervisor_path() }, mode: Default::default(), tracing: Default::default(), compaction: Default::default(), @@ -1064,9 +1065,9 @@ mod tests { let conf3 = parse(&["parity", "--auto-update=xxx"]); // then - assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Testing}); - assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: false, filter: UpdateFilter::All, track: ReleaseTrack::Unknown}); - assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, require_consensus: true, filter: UpdateFilter::All, track: ReleaseTrack::Beta}); + assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: true, filter: UpdateFilter::Critical, track: ReleaseTrack::Testing, path: default_hypervisor_path()}); + assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, require_consensus: false, filter: UpdateFilter::All, track: ReleaseTrack::Unknown, path: default_hypervisor_path()}); + assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, require_consensus: true, filter: UpdateFilter::All, track: ReleaseTrack::Beta, path: default_hypervisor_path()}); assert!(conf3.update_policy().is_err()); } diff --git a/parity/dir.rs b/parity/dir.rs index f9c2f30c96f..05515fc8238 100644 --- a/parity/dir.rs +++ b/parity/dir.rs @@ -195,6 +195,11 @@ pub fn default_data_path() -> String { get_app_root(AppDataType::UserData, &app_info).map(|p| p.to_string_lossy().into_owned()).unwrap_or_else(|_| "$HOME/.parity".to_owned()) } +pub fn default_hypervisor_path() -> String { + let app_info = AppInfo { name: "parity-hypervisor", author: "parity" }; + get_app_root(AppDataType::UserData, &app_info).map(|p| p.to_string_lossy().into_owned()).unwrap_or_else(|_| "$HOME/.parity-hypervisor".to_owned()) +} + #[cfg(test)] mod tests { use super::Directories; diff --git a/parity/main.rs b/parity/main.rs index cd6dc8a170d..1fb290f4b30 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -126,6 +126,7 @@ use cli::Args; use configuration::{Cmd, Execute, Configuration}; use deprecated::find_deprecated; use ethcore_logger::setup_log; +use dir::default_hypervisor_path; fn print_hash_of(maybe_file: Option<String>) -> Result<String, String> { if let Some(file) = maybe_file { @@ -193,10 +194,8 @@ fn sync_main(alt_mains: &mut HashMap<String, fn()>) { alt_mains.insert("sync".to_owned(), sync::main); } -// TODO: merge with version in Updater. fn updates_path(name: &str) -> PathBuf { - let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); - dest.push(".parity-updates"); + let mut dest = PathBuf::from(default_hypervisor_path()); dest.push(name); dest } diff --git a/updater/src/updater.rs b/updater/src/updater.rs index 736d7e8a840..8f4977fc2f5 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see <http://www.gnu.org/licenses/>. use std::sync::{Arc, Weak}; -use std::{fs, env}; +use std::fs; use std::io::Write; use std::path::{PathBuf}; use util::misc::platform; @@ -49,6 +49,8 @@ pub struct UpdatePolicy { pub filter: UpdateFilter, /// Which track we should be following. pub track: ReleaseTrack, + /// Path for the updates to go. + pub path: String, } impl Default for UpdatePolicy { @@ -58,6 +60,7 @@ impl Default for UpdatePolicy { require_consensus: true, filter: UpdateFilter::None, track: ReleaseTrack::Unknown, + path: Default::default(), } } } @@ -175,9 +178,8 @@ impl Updater { format!("parity-{}.{}.{}-{:?}", v.version.major, v.version.minor, v.version.patch, v.hash) } - fn updates_path(name: &str) -> PathBuf { - let mut dest = PathBuf::from(env::home_dir().unwrap().to_str().expect("env filesystem paths really should be valid; qed")); - dest.push(".parity-updates"); + fn updates_path(&self, name: &str) -> PathBuf { + let mut dest = PathBuf::from(self.update_policy.path.clone()); dest.push(name); dest } @@ -189,7 +191,7 @@ impl Updater { let fetched = s.fetching.take().unwrap(); let b = result.map_err(|e| format!("Unable to fetch update ({}): {:?}", fetched.version, e))?; info!(target: "updater", "Fetched latest version ({}) OK to {}", fetched.version, b.display()); - let dest = Self::updates_path(&Self::update_file_name(&fetched.version)); + let dest = self.updates_path(&Self::update_file_name(&fetched.version)); fs::create_dir_all(dest.parent().expect("at least one thing pushed; qed")).map_err(|e| format!("Unable to create updates path: {:?}", e))?; fs::copy(&b, &dest).map_err(|e| format!("Unable to copy update: {:?}", e))?; info!(target: "updater", "Copied file to {}", dest.display()); @@ -322,7 +324,7 @@ impl Service for Updater { let mut s = self.state.lock(); if let Some(r) = s.ready.take() { let p = Self::update_file_name(&r.version); - let n = Self::updates_path("latest"); + let n = self.updates_path("latest"); // TODO: creating then writing is a bit fragile. would be nice to make it atomic. match fs::File::create(&n).and_then(|mut f| f.write_all(p.as_bytes())) { Ok(_) => { From 1a790b784fd32d5ae01441f75fc8798a577a17d2 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 20:49:09 +0100 Subject: [PATCH 78/87] Fix centos's reported build platform. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 757f5dac1b9..c1c10f0cf85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,7 +95,7 @@ linux-centos: script: - export CXX="g++" - export CC="gcc" - - export PLATFORM=x86_64-unknown-linux-gnu + - export PLATFORM=x86_64-unknown-centos-gnu - cargo build -j $(nproc) --release $CARGOFLAGS - strip target/release/parity - md5sum target/release/parity > parity.md5 From ca0d87da1006eeb920b0bb02b2a6e744c0e94e6b Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 22:05:54 +0100 Subject: [PATCH 79/87] 125 -> 69. --- Cargo.lock | 11 ----------- ethcore/src/client/client.rs | 1 + ethcore/src/client/traits.rs | 2 +- js/src/api/format/output.js | 3 ++- parity/cli/usage.txt | 2 +- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b402ae7838..f86b37a1486 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1409,17 +1409,6 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parking_lot" -version = "0.2.8" -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)", - "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)", -] - [[package]] name = "parking_lot" version = "0.3.6" diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 972960c7371..bd1cc85cc97 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -933,6 +933,7 @@ impl BlockChainClient for Client { fn disable(&self) { self.set_mode(IpcMode::Off); self.enabled.store(false, AtomicOrdering::Relaxed); + self.clear_queue(); } fn set_mode(&self, new_mode: IpcMode) { diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index b062990a003..407ecac2862 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -265,7 +265,7 @@ pub trait BlockChainClient : Sync + Send { /// Returns engine-related extra info for `BlockId`. fn block_extra_info(&self, id: BlockId) -> Option<BTreeMap<String, String>>; - /// Returns engine-related extra info for `UncleID`. + /// Returns engine-related extra info for `UncleId`. fn uncle_extra_info(&self, id: UncleId) -> Option<BTreeMap<String, String>>; /// Returns information about pruning/data availability. diff --git a/js/src/api/format/output.js b/js/src/api/format/output.js index 632ab6f28f1..2fb68445064 100644 --- a/js/src/api/format/output.js +++ b/js/src/api/format/output.js @@ -110,7 +110,8 @@ export function outPeers (peers) { return { active: outNumber(peers.active), connected: outNumber(peers.connected), - max: outNumber(peers.max) + max: outNumber(peers.max), + peers: peers.peers.map(p => { Object.keys(p.protocols).forEach(k => p.protocols[k].difficulty = outNumber(p.protocols[k].difficulty)); return p; }) }; } diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index baf898ad85a..29d65298986 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -361,7 +361,7 @@ Legacy Options: --cache MB Equivalent to --cache-size MB. Internal Options: - --can-restart Executable will auto-restart if exiting with 125. + --can-restart Executable will auto-restart if exiting with 69. Miscellaneous Options: -c --config CONFIG Specify a filename containing a configuration file. From 869fbf5108a559142eebffc2c514748c1b79389f Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 22:07:25 +0100 Subject: [PATCH 80/87] Fix linting. --- js/src/api/format/output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/api/format/output.js b/js/src/api/format/output.js index 2fb68445064..ca1d54ede59 100644 --- a/js/src/api/format/output.js +++ b/js/src/api/format/output.js @@ -111,7 +111,7 @@ export function outPeers (peers) { active: outNumber(peers.active), connected: outNumber(peers.connected), max: outNumber(peers.max), - peers: peers.peers.map(p => { Object.keys(p.protocols).forEach(k => p.protocols[k].difficulty = outNumber(p.protocols[k].difficulty)); return p; }) + peers: peers.peers.map(p => { Object.keys(p.protocols).forEach(k => { p.protocols[k].difficulty = outNumber(p.protocols[k].difficulty); }); return p; }) }; } From 7cac50601fad9dda83f364c8840f421c39f45a81 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 22:45:35 +0100 Subject: [PATCH 81/87] Add JS tests for parity_netPeers --- js/src/api/format/output.spec.js | 44 ++++++++++++++++++++++++++-- js/src/api/rpc/parity/parity.spec.js | 2 +- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/js/src/api/format/output.spec.js b/js/src/api/format/output.spec.js index b440476106f..d791e340c41 100644 --- a/js/src/api/format/output.spec.js +++ b/js/src/api/format/output.spec.js @@ -147,10 +147,50 @@ describe('api/format/output', () => { describe('outPeers', () => { it('converts all internal numbers to BigNumbers', () => { - expect(outPeers({ active: 789, connected: '456', max: 0x7b })).to.deep.equal({ + expect(outPeers({ + active: 789, + connected: '456', + max: 0x7b, + peers: [ + { + caps: ["par/1"], + id: "0x01", + name: "Parity", + network: { + localAddress: "10.0.0.1", + remoteAddress: "10.0.0.1" + }, + protocols: { + par: { + difficulty: "0x0f", + head: "0x02", + version: 63 + } + } + } + ] + })).to.deep.equal({ active: new BigNumber(789), connected: new BigNumber(456), - max: new BigNumber(123) + max: new BigNumber(123), + peers: [ + { + caps: ["par/1"], + id: "0x01", + name: "Parity", + network: { + localAddress: "10.0.0.1", + remoteAddress: "10.0.0.1" + }, + protocols: { + par: { + difficulty: new BigNumber(15), + head: "0x02", + version: 63 + } + } + } + ] }); }); }); diff --git a/js/src/api/rpc/parity/parity.spec.js b/js/src/api/rpc/parity/parity.spec.js index d0d97cd0b75..b58c8f85c87 100644 --- a/js/src/api/rpc/parity/parity.spec.js +++ b/js/src/api/rpc/parity/parity.spec.js @@ -80,7 +80,7 @@ describe('api/rpc/parity', () => { describe('newPeers', () => { it('returns the peer structure, formatted', () => { - mockHttp([{ method: 'parity_netPeers', reply: { result: { active: 123, connected: 456, max: 789 } } }]); + mockHttp([{ method: 'parity_netPeers', reply: { result: { active: 123, connected: 456, max: 789, peers: [] } } }]); return instance.netPeers().then((peers) => { expect(peers.active.eq(123)).to.be.true; From a6a8e431f5c4a6cacece255a052a3b11425cb659 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Thu, 15 Dec 2016 22:46:36 +0100 Subject: [PATCH 82/87] Fix lint --- js/src/api/format/output.spec.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/js/src/api/format/output.spec.js b/js/src/api/format/output.spec.js index d791e340c41..1958b57d8c1 100644 --- a/js/src/api/format/output.spec.js +++ b/js/src/api/format/output.spec.js @@ -153,17 +153,17 @@ describe('api/format/output', () => { max: 0x7b, peers: [ { - caps: ["par/1"], - id: "0x01", - name: "Parity", + caps: ['par/1'], + id: '0x01', + name: 'Parity', network: { - localAddress: "10.0.0.1", - remoteAddress: "10.0.0.1" + localAddress: '10.0.0.1', + remoteAddress: '10.0.0.1' }, protocols: { par: { - difficulty: "0x0f", - head: "0x02", + difficulty: '0x0f', + head: '0x02', version: 63 } } @@ -175,17 +175,17 @@ describe('api/format/output', () => { max: new BigNumber(123), peers: [ { - caps: ["par/1"], - id: "0x01", - name: "Parity", + caps: ['par/1'], + id: '0x01', + name: 'Parity', network: { - localAddress: "10.0.0.1", - remoteAddress: "10.0.0.1" + localAddress: '10.0.0.1', + remoteAddress: '10.0.0.1' }, protocols: { par: { difficulty: new BigNumber(15), - head: "0x02", + head: '0x02', version: 63 } } From ba60e046bea22a40bf72b0a614d90ad2186402b3 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 16 Dec 2016 10:02:42 +0100 Subject: [PATCH 83/87] Tone down logging. --- updater/src/updater.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/updater/src/updater.rs b/updater/src/updater.rs index 8f4977fc2f5..c5697c62367 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -139,10 +139,10 @@ impl Updater { fn collect_latest(&self) -> Result<OperationsInfo, String> { if let Some(ref operations) = *self.operations.lock() { let hh: H256 = self.this.hash.into(); - info!(target: "updater", "Looking up this_fork for our release: {}/{:?}", CLIENT_ID, hh); + trace!(target: "updater", "Looking up this_fork for our release: {}/{:?}", CLIENT_ID, hh); let this_fork = operations.release(CLIENT_ID, &self.this.hash.into()).ok() .and_then(|(fork, track, _, _)| { - info!(target: "updater", "Operations returned fork={}, track={}", fork as u64, track); + trace!(target: "updater", "Operations returned fork={}, track={}", fork as u64, track); if track > 0 {Some(fork as u64)} else {None} }); @@ -212,7 +212,7 @@ impl Updater { } fn poll(&self) { - info!(target: "updater", "Current release is {} ({:?})", self.this, self.this.hash); + trace!(target: "updater", "Current release is {} ({:?})", self.this, self.this.hash); // We rely on a secure state. Bail if we're unsure about it. if self.client.upgrade().map_or(true, |s| !s.chain_info().security_level().is_full()) { @@ -235,7 +235,7 @@ impl Updater { let mut capability = CapState::Unknown; let latest = self.collect_latest().ok(); if let Some(ref latest) = latest { - info!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", + trace!(target: "updater", "Latest release in our track is v{} it is {}critical ({} binary is {})", latest.track.version, if latest.track.is_critical {""} else {"non-"}, platform(), @@ -259,7 +259,7 @@ impl Updater { } } } - info!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); + trace!(target: "updater", "Fork: this/current/latest/latest-known: {}/#{}/#{}/#{}", match latest.this_fork { Some(f) => format!("#{}", f), None => "unknown".into(), }, current_number, latest.track.fork, latest.fork); if let Some(this_fork) = latest.this_fork { if this_fork < latest.fork { From 35b18485d408f71039a43578e4e437fcffca1b3b Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 16 Dec 2016 10:14:44 +0100 Subject: [PATCH 84/87] Don't check for updates while syncing. --- Cargo.lock | 1 + updater/Cargo.toml | 1 + updater/src/lib.rs | 1 + updater/src/updater.rs | 14 +++++++++----- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f86b37a1486..8000617df19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1393,6 +1393,7 @@ dependencies = [ "ethcore-ipc 1.5.0", "ethcore-ipc-codegen 1.5.0", "ethcore-util 1.5.0", + "ethsync 1.5.0", "ipc-common-types 1.5.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-hash-fetch 1.5.0", diff --git a/updater/Cargo.toml b/updater/Cargo.toml index b97e057d755..e166b4c6559 100644 --- a/updater/Cargo.toml +++ b/updater/Cargo.toml @@ -13,6 +13,7 @@ ethcore-ipc-codegen = { path = "../ipc/codegen" } log = "0.3" ethabi = "0.2.2" ethcore = { path = "../ethcore" } +ethsync = { path = "../sync" } ethcore-util = { path = "../util" } parity-hash-fetch = { path = "../hash-fetch" } ipc-common-types = { path = "../ipc-common-types" } diff --git a/updater/src/lib.rs b/updater/src/lib.rs index 1567a88a089..92992deb2af 100644 --- a/updater/src/lib.rs +++ b/updater/src/lib.rs @@ -22,6 +22,7 @@ extern crate ipc_common_types; extern crate parity_hash_fetch as hash_fetch; extern crate ethcore; extern crate ethabi; +extern crate ethsync; extern crate ethcore_ipc as ipc; mod updater; diff --git a/updater/src/updater.rs b/updater/src/updater.rs index c5697c62367..a82748c84e9 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -21,11 +21,13 @@ use std::path::{PathBuf}; use util::misc::platform; use ipc_common_types::{VersionInfo, ReleaseTrack}; use util::{Address, H160, H256, FixedHash, Mutex, Bytes}; +use ethsync::{SyncProvider}; use ethcore::client::{BlockId, BlockChainClient, ChainNotify}; use hash_fetch::{self as fetch, HashFetch}; use operations::Operations; use service::{Service}; use types::all::{ReleaseInfo, OperationsInfo, CapState}; +use ethcore_rpc::is_major_importing; /// Filter for releases. #[derive(Debug, Eq, PartialEq, Clone)] @@ -82,6 +84,7 @@ pub struct Updater { update_policy: UpdatePolicy, weak_self: Mutex<Weak<Updater>>, client: Weak<BlockChainClient>, + sync: Weak<SyncProvider>, fetcher: Mutex<Option<fetch::Client>>, operations: Mutex<Option<Operations>>, exit_handler: Mutex<Option<Box<Fn() + 'static + Send>>>, @@ -96,11 +99,12 @@ pub struct Updater { const CLIENT_ID: &'static str = "parity"; impl Updater { - pub fn new(client: Weak<BlockChainClient>, update_policy: UpdatePolicy) -> Arc<Self> { + pub fn new(client: Weak<BlockChainClient>, sync: Arc<SyncProvider>, update_policy: UpdatePolicy) -> Arc<Self> { let r = Arc::new(Updater { update_policy: update_policy, weak_self: Mutex::new(Default::default()), client: client.clone(), + sync: sync.clone(), fetcher: Mutex::new(None), operations: Mutex::new(None), exit_handler: Mutex::new(None), @@ -290,10 +294,10 @@ impl Updater { impl ChainNotify for Updater { fn new_blocks(&self, _imported: Vec<H256>, _invalid: Vec<H256>, _enacted: Vec<H256>, _retracted: Vec<H256>, _sealed: Vec<H256>, _proposed: Vec<Bytes>, _duration: u64) { - // TODO: something like this -// if !self.client.upgrade().map_or(true, |c| c.is_major_syncing()) { - self.poll(); -// } + match (self.client.upgrade(), self.sync.upgrade()) { + (Some(c), Some(s)) if is_major_importing(s.status().state, c.queue_info()) => self.poll(), + _ => {}, + } } } From 396ab5b361d80f5e8af39d1908652207886ce5af Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 16 Dec 2016 10:31:10 +0100 Subject: [PATCH 85/87] Refactor and make is_syncing. --- parity/run.rs | 2 +- sync/src/chain.rs | 32 +++++++++++++++++++++++++++++++- updater/src/updater.rs | 5 ++--- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/parity/run.rs b/parity/run.rs index 77d1bf1e701..23eebe18391 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -312,7 +312,7 @@ pub fn execute(cmd: RunCmd, can_restart: bool, logger: Arc<RotatingLogger>) -> R } // the updater service - let updater = Updater::new(Arc::downgrade(&(service.client() as Arc<BlockChainClient>)), update_policy); + let updater = Updater::new(Arc::downgrade(&(service.client() as Arc<BlockChainClient>)), Arc::downgrade(&sync_provider), update_policy); service.add_notify(updater.clone()); // set up dependencies for rpc servers diff --git a/sync/src/chain.rs b/sync/src/chain.rs index d3638f35d6b..5f969af354b 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -94,7 +94,7 @@ use rlp::*; use network::*; use ethcore::views::{HeaderView}; use ethcore::header::{BlockNumber, Header as BlockHeader}; -use ethcore::client::{BlockChainClient, BlockStatus, BlockId, BlockChainInfo, BlockImportError}; +use ethcore::client::{BlockChainClient, BlockStatus, BlockId, BlockChainInfo, BlockImportError, BlockQueueInfo}; use ethcore::error::*; use ethcore::snapshot::{ManifestData, RestorationStatus}; use sync_io::SyncIo; @@ -235,6 +235,13 @@ impl SyncStatus { min_peers } } + + /// Is it doing a major sync? + pub fn is_syncing(&self, queue_info: BlockQueueInfo) -> bool { + let is_syncing_state = match self.state { SyncState::Idle | SyncState::NewBlocks => false, _ => true }; + let is_verifying = queue_info.unverified_queue_size + queue_info.verified_queue_size > 3; + is_verifying || is_syncing_state + } } #[derive(PartialEq, Eq, Debug, Clone)] @@ -2112,6 +2119,29 @@ mod tests { rlp.out() } + fn queue_info(unverified: usize, verified: usize) -> BlockQueueInfo { + BlockQueueInfo { + unverified_queue_size: unverified, + verified_queue_size: verified, + verifying_queue_size: 0, + max_queue_size: 1000, + max_mem_use: 1000, + mem_used: 500 + } + } + + #[test] + fn is_still_verifying() { + assert!(!is_major_importing(None, queue_info(2, 1))); + assert!(is_major_importing(None, queue_info(2, 2))); + } + + #[test] + fn is_synced_state() { + assert!(is_major_importing(Some(SyncState::Blocks), queue_info(0, 0))); + assert!(!is_major_importing(Some(SyncState::Idle), queue_info(0, 0))); + } + #[test] fn return_receipts_empty() { let mut client = TestBlockChainClient::new(); diff --git a/updater/src/updater.rs b/updater/src/updater.rs index a82748c84e9..9f781ed5ad5 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -27,7 +27,6 @@ use hash_fetch::{self as fetch, HashFetch}; use operations::Operations; use service::{Service}; use types::all::{ReleaseInfo, OperationsInfo, CapState}; -use ethcore_rpc::is_major_importing; /// Filter for releases. #[derive(Debug, Eq, PartialEq, Clone)] @@ -99,7 +98,7 @@ pub struct Updater { const CLIENT_ID: &'static str = "parity"; impl Updater { - pub fn new(client: Weak<BlockChainClient>, sync: Arc<SyncProvider>, update_policy: UpdatePolicy) -> Arc<Self> { + pub fn new(client: Weak<BlockChainClient>, sync: Weak<SyncProvider>, update_policy: UpdatePolicy) -> Arc<Self> { let r = Arc::new(Updater { update_policy: update_policy, weak_self: Mutex::new(Default::default()), @@ -295,7 +294,7 @@ impl Updater { impl ChainNotify for Updater { fn new_blocks(&self, _imported: Vec<H256>, _invalid: Vec<H256>, _enacted: Vec<H256>, _retracted: Vec<H256>, _sealed: Vec<H256>, _proposed: Vec<Bytes>, _duration: u64) { match (self.client.upgrade(), self.sync.upgrade()) { - (Some(c), Some(s)) if is_major_importing(s.status().state, c.queue_info()) => self.poll(), + (Some(ref c), Some(ref s)) if s.status().is_syncing(c.queue_info()) => self.poll(), _ => {}, } } From 90d3d330f582c2e66b0f394519477de98b449914 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 16 Dec 2016 11:00:17 +0100 Subject: [PATCH 86/87] Use info! for blockchain status rather than stdout. --- parity/blockchain.rs | 24 ++++++++++++++---------- parity/main.rs | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/parity/blockchain.rs b/parity/blockchain.rs index c01bfdf756b..4129433f40b 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -133,7 +133,7 @@ pub struct ExportState { pub max_balance: Option<U256>, } -pub fn execute(cmd: BlockchainCmd) -> Result<String, String> { +pub fn execute(cmd: BlockchainCmd) -> Result<(), String> { match cmd { BlockchainCmd::Kill(kill_cmd) => kill_db(kill_cmd), BlockchainCmd::Import(import_cmd) => execute_import(import_cmd), @@ -142,7 +142,7 @@ pub fn execute(cmd: BlockchainCmd) -> Result<String, String> { } } -fn execute_import(cmd: ImportBlockchain) -> Result<String, String> { +fn execute_import(cmd: ImportBlockchain) -> Result<(), String> { let timer = Instant::now(); // Setup panic handler @@ -293,7 +293,7 @@ fn execute_import(cmd: ImportBlockchain) -> Result<String, String> { let report = client.report(); let ms = timer.elapsed().as_milliseconds(); - Ok(format!("Import completed in {} seconds, {} blocks, {} blk/s, {} transactions, {} tx/s, {} Mgas, {} Mgas/s", + info!("Import completed in {} seconds, {} blocks, {} blk/s, {} transactions, {} tx/s, {} Mgas, {} Mgas/s", ms / 1000, report.blocks_imported, (report.blocks_imported * 1000) as u64 / ms, @@ -301,7 +301,8 @@ fn execute_import(cmd: ImportBlockchain) -> Result<String, String> { (report.transactions_applied * 1000) as u64 / ms, report.gas_processed / From::from(1_000_000), (report.gas_processed / From::from(ms * 1000)).low_u64(), - ).into()) + ); + Ok(()) } fn start_client( @@ -368,7 +369,7 @@ fn start_client( Ok(service) } -fn execute_export(cmd: ExportBlockchain) -> Result<String, String> { +fn execute_export(cmd: ExportBlockchain) -> Result<(), String> { // Setup panic handler let service = try!(start_client(cmd.dirs, cmd.spec, cmd.pruning, cmd.pruning_history, cmd.tracing, cmd.fat_db, cmd.compaction, cmd.wal, cmd.cache_config)); let panic_handler = PanicHandler::new_in_arc(); @@ -396,10 +397,11 @@ fn execute_export(cmd: ExportBlockchain) -> Result<String, String> { } } - Ok("Export completed.".into()) + info!("Export completed."); + Ok(()) } -fn execute_export_state(cmd: ExportState) -> Result<String, String> { +fn execute_export_state(cmd: ExportState) -> Result<(), String> { // Setup panic handler let service = try!(start_client(cmd.dirs, cmd.spec, cmd.pruning, cmd.pruning_history, cmd.tracing, cmd.fat_db, cmd.compaction, cmd.wal, cmd.cache_config)); let panic_handler = PanicHandler::new_in_arc(); @@ -475,10 +477,11 @@ fn execute_export_state(cmd: ExportState) -> Result<String, String> { } } out.write_fmt(format_args!("\n]}}")).expect("Write error"); - Ok("Export completed.".into()) + info!("Export completed."); + Ok(()) } -pub fn kill_db(cmd: KillBlockchain) -> Result<String, String> { +pub fn kill_db(cmd: KillBlockchain) -> Result<(), String> { let spec = try!(cmd.spec.spec()); let genesis_hash = spec.genesis_header().hash(); let db_dirs = cmd.dirs.database(genesis_hash, None, spec.data_dir); @@ -487,7 +490,8 @@ pub fn kill_db(cmd: KillBlockchain) -> Result<String, String> { let algorithm = cmd.pruning.to_algorithm(&user_defaults); let dir = db_dirs.db_path(algorithm); try!(fs::remove_dir_all(&dir).map_err(|e| format!("Error removing database: {:?}", e))); - Ok("Database deleted.".to_owned()) + info!("Database deleted."); + Ok(()) } #[cfg(test)] diff --git a/parity/main.rs b/parity/main.rs index 1fb290f4b30..91aab42a787 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -156,7 +156,7 @@ fn execute(command: Execute, can_restart: bool) -> Result<PostExecutionAction, S Cmd::Hash(maybe_file) => print_hash_of(maybe_file).map(|s| PostExecutionAction::Print(s)), Cmd::Account(account_cmd) => account::execute(account_cmd).map(|s| PostExecutionAction::Print(s)), Cmd::ImportPresaleWallet(presale_cmd) => presale::execute(presale_cmd).map(|s| PostExecutionAction::Print(s)), - Cmd::Blockchain(blockchain_cmd) => blockchain::execute(blockchain_cmd).map(|s| PostExecutionAction::Print(s)), + Cmd::Blockchain(blockchain_cmd) => blockchain::execute(blockchain_cmd).map(|_| PostExecutionAction::Quit), Cmd::SignerToken(signer_cmd) => signer::execute(signer_cmd).map(|s| PostExecutionAction::Print(s)), Cmd::SignerSign { id, pwfile, port, authfile } => rpc_cli::signer_sign(id, pwfile, port, authfile).map(|s| PostExecutionAction::Print(s)), Cmd::SignerList { port, authfile } => rpc_cli::signer_list(port, authfile).map(|s| PostExecutionAction::Print(s)), From b4372650820910dc15ec606943e6da2592138813 Mon Sep 17 00:00:00 2001 From: Gav Wood <gavin@ethcore.io> Date: Fri, 16 Dec 2016 11:27:00 +0100 Subject: [PATCH 87/87] Fix build. --- .gitlab-ci.yml | 2 +- sync/src/chain.rs | 27 +++++++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1c10f0cf85..6deba8ec40b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -365,7 +365,7 @@ windows: - set RUSTFLAGS=%RUSTFLAGS% - rustup default stable-x86_64-pc-windows-msvc - cargo build --release #%CARGOFLAGS% - - FOR /F "delims=" %i IN ('target\release\parity.exe tools hash target\release\parity.exe') DO set SHA3=%i + - FOR /F "tokens=* USEBACKQ" %%i IN ('target\release\parity.exe tools hash target\release\parity.exe') DO set SHA3=%%i - curl -sL --url "https://github.com/ethcore/win-build/raw/master/SimpleFC.dll" -o nsis\SimpleFC.dll - curl -sL --url "https://github.com/ethcore/win-build/raw/master/vc_redist.x64.exe" -o nsis\vc_redist.x64.exe - signtool sign /f %keyfile% /p %certpass% target\release\parity.exe diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 5f969af354b..81c35fbf1c9 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -2130,16 +2130,35 @@ mod tests { } } + fn sync_status(state: SyncState) -> SyncStatus { + SyncStatus { + state: state, + protocol_version: 0, + network_id: 0, + start_block_number: 0, + last_imported_block_number: None, + highest_block_number: None, + blocks_total: 0, + blocks_received: 0, + num_peers: 0, + num_active_peers: 0, + mem_used: 0, + num_snapshot_chunks: 0, + snapshot_chunks_done: 0, + last_imported_old_block_number: None, + } + } + #[test] fn is_still_verifying() { - assert!(!is_major_importing(None, queue_info(2, 1))); - assert!(is_major_importing(None, queue_info(2, 2))); + assert!(!sync_status(SyncState::Idle).is_syncing(queue_info(2, 1))); + assert!(sync_status(SyncState::Idle).is_syncing(queue_info(2, 2))); } #[test] fn is_synced_state() { - assert!(is_major_importing(Some(SyncState::Blocks), queue_info(0, 0))); - assert!(!is_major_importing(Some(SyncState::Idle), queue_info(0, 0))); + assert!(sync_status(SyncState::Blocks).is_syncing(queue_info(0, 0))); + assert!(!sync_status(SyncState::Idle).is_syncing(queue_info(0, 0))); } #[test]