From 4bb4ed95516e8f8e31af774120fb434a6bf07855 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 13 Nov 2016 15:52:33 +0100 Subject: [PATCH 01/99] 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 c3fa096b3..b53b28426 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 667b40ace..439263794 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 ec59e01cf..400d53ed1 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 bf3e59171..59e45f381 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 b0452e85e..d9eab1af0 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/99] 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 000000000..573a45169 --- /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 400d53ed1..83f1f3709 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/99] 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 14558f6c6..b8111d77c 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 8dcc2b773..86297a26c 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 3898ab6cd..b49301bbd 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 000000000..bdc142b59 --- /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 000000000..f65661d88 --- /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 000000000..aaa6526be --- /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/99] 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 573a45169..000000000 --- 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 aaa6526be..d3b483ee6 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/99] 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 b8111d77c..3676f0a0a 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/99] 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 bdc142b59..3141f1c25 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 d3b483ee6..4fb210ca6 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/99] 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 | 215 +++++++++++++------------- ethcore/src/client/test_client.rs | 86 +++++------ ethcore/src/client/traits.rs | 70 ++++----- ethcore/src/client/updater.rs | 88 +++++++---- 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, 644 insertions(+), 476 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 300929e6e..d5e7fab1e 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 e3b5745b2..3a7706bef 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 66fad24d2..a4fa5aa57 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 3141f1c25..e0408cdb0 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,7 +69,19 @@ 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 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)?; @@ -106,7 +93,31 @@ impl Operations { Ok(()) } - /// Auto-generated from: `{"constant":false,"inputs":[],"name":"rejectFork","outputs":[],"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 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)?; @@ -118,31 +129,19 @@ impl Operations { 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":"","type":"bytes32"}],"name":"client","outputs":[{"name":"owner","type":"address"},{"name":"required","type":"bool"}],"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 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(_client.as_bytes().to_owned()), ethabi::Token::FixedBytes(_checksum.as_ref().to_owned())] + 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_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()) })) + 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":"_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::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)?; - - Ok(()) - } - - /// Auto-generated from: `{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setClientOwner","outputs":[],"type":"function"}` + /// 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,31 +213,19 @@ 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"}` - #[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"}` + /// 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)?; @@ -238,7 +237,31 @@ 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":false,"inputs":[],"name":"acceptFork","outputs":[],"type":"function"}` + /// 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)?; @@ -250,19 +273,7 @@ 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"}` + /// 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 84ed25b37..f7f572914 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 67092e986..a6605c434 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 4fb210ca6..211fdeb1f 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 Updater { - operations: Operations, +pub struct ReleaseInfo { + fork_supported: usize, + latest_known_fork: usize, + + latest: VersionInfo, + latest_fork: usize, + latest_binary: Option, } -fn platform() -> &'static str { - "linux_x64" +pub struct Updater { + client: Weak, + operations: Operations, + + 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 + } + + 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())?; + 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) }, + }) } 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); - - 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)); + 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 7ad18ebfc..29f28265f 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 d417695f0..cc84d8e48 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 3f63ac208..76695fbf2 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 c0d34a6a9..21725bc06 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 e136985c6..efdb12323 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 43439e437..ab4dde134 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 99b251d66..b96de22df 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 b021e750d..2da94b3d0 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 e3487e5f6..ecc997f71 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 1fe81f392..2c3c777b4 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 c17cc9e85..af9d7c3ee 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 56b2c1ccb..c86123d1a 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 4991c4714..3747431fb 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 5e077cfad..a3ea4d326 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 ff282a9f8..664716d95 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 6e37c7c89..5bc5a4e1c 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 133d9821e..8ad48b994 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 06f38922b..bf0a4ec44 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 0baeb1354..7696d1b38 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 89603d311..807de7977 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 61063aa18..e3f11685e 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 16ae4dd98..ec6fd8846 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 ab0dafddd..fe5303ec8 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 d3e3c8a20..1caeb1b7c 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 d8323084d..804047596 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 5f1449e07..36cdc3f99 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 dd1c937ac..695ff5251 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 1fdcbdef8..4a274627a 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 e85d961a1..0b287ce29 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 2f5131f32..9a298dde4 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 861bb5234..f0b6eeac1 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 01625f8ed..0a2b2f305 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 fc163c54b..bc07254e2 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 21e50e175..83ec6b06e 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 ff5411140..0a5d8550b 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 bf0c4b244..bcb9973dc 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 d98b142cb..fd3e82767 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 5fe34428e..30ae131aa 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 cc342eeca..2f8f5c6fb 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 2b4ac0fed..e62a47e41 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 d9eab1af0..62231da9a 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/99] 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 a4fa5aa57..102c4aab6 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 045b8ee05..bf06df462 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 b49301bbd..adeaaf64a 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 211fdeb1f..dc45a55ff 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 3ad6259b8..33a48b3b0 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 e12a2566e..0ac59da0e 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 a51d12273..e08c853bd 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/99] 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 e1774159b..6504900e6 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 102c4aab6..004f181d9 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 bf06df462..effa0b1dc 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 adeaaf64a..7759d08ef 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 dc45a55ff..f4f40cfad 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 7696d1b38..70326de3b 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 394892914..08474ea45 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 f905ec74a..1a6fe3b61 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 0f0c19814..3cb19fe37 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 fe5303ec8..d748caa6a 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 f56ba5b92..daa6aae05 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 804047596..d74adc1b4 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/99] 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 62282801d..7d2d53016 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 004f181d9..200527222 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 effa0b1dc..1b153d888 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 f4f40cfad..0b8330741 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 08474ea45..b9d4770be 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/99] 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 9028c4801..e8f4624b7 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 438852124..12e82bca2 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/99] 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 0b8330741..c21f47b4a 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, +} - pub latest: VersionInfo, - pub latest_fork: usize, - pub latest_binary: Option, +#[derive(Debug, Clone, PartialEq)] +pub struct OperationsInfo { + pub fork: u64, + + 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 62231da9a..f779b92e9 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/99] 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 f738d28b8..c8920f522 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 7c6576672..dd1c796a2 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 ffb74b260..b566121f5 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 e0408cdb0..2124884c7 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 c21f47b4a..11bdc0b5c 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 26db14744..c0ad612d2 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/99] 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 f5d19afa5..272c952e0 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 200527222..26750624d 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 000000000..a94e22b99 --- /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 7759d08ef..621a4c919 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 11bdc0b5c..9417df7bf 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/99] 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 44e56f540..eb4e9547d 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 7bffda6bc..a7e8041ef 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 9417df7bf..ada6749f0 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 26c6fec52..84996b5a5 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 5d50d2617..4031c7164 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/99] 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 340c06e8a..2e4996c06 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 4031c7164..3dee4054b 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/99] 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 ada6749f0..8ce942959 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/99] 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 8ce942959..d4a5b76ee 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/99] 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 264df0397..0feee1cab 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 fa47e4729..6d65f1cee 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 1b153d888..dd2ed2b49 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 50282895f..6ea2f3bf5 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 d4a5b76ee..fdbc9463a 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 814ccbcfb..3178cb30f 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 61b902ce6..0ee3f8a44 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/99] 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 6d65f1cee..f068b8d99 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 fdbc9463a..75768132c 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/99] 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 b6ebf57b2..ad541391d 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/99] 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 | 161 ++++++++---- {ethcore/src/client => parity}/operations.rs | 0 parity/run.rs | 81 +++--- {ethcore/src/client => parity}/updater.rs | 257 +++++++++++++------ util/src/log.rs | 5 +- 18 files changed, 392 insertions(+), 383 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 272c952e0..20bde788d 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 8e9b2beb8..092819300 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 dd2ed2b49..045b8ee05 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 a94e22b99..000000000 --- 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 73b286042..8d516d846 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 f65661d88..7693feaeb 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 2e08b22bf..d2646b105 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 a699c6ea2..a6956461e 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 77a14daad..d62f2b9bb 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 fae9ad3e8..797a5443e 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 8de7da9f4..25acfcc55 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 1caeb1b7c..1f3f3862a 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 0f1704049..000000000 --- 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 17f5ed74b..cf5ba7391 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(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 } - } -} - #[cfg(not(feature="stratum"))] -mod stratum_optional { - pub fn probably_run() -> bool { - false - } +fn stratum_main(_: &mut HashMap) {} + +#[cfg(feature="stratum")] +fn stratum_main(alt_mains: &mut HashMap) { + alt_mains.insert("stratum".to_owned(), stratum::main); } #[cfg(not(feature="ipc"))] -fn sync_main() -> bool { - false -} +fn sync_main(_: &mut HashMap) {} #[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 +fn sync_main(alt_mains: &mut HashMap) { + alt_mains.insert("sync".to_owned(), sync::main); +} + +// 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 +} + +// 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 println_trace_main(s: String) { + if env::var("RUST_LOG").ok().and_then(|s| s.find("main=trace")).is_some() { + println!("{}", s); + } +} + +#[macro_export] +macro_rules! trace_main { + ($arg:expr) => (println_trace_main($arg.into())); + ($($arg:tt)*) => (println_trace_main(format!("{}", format_args!($($arg)*)))); +} + fn main() { // Always print backtrace on panic. - ::std::env::set_var("RUST_BACKTRACE", "1"); + env::set_var("RUST_BACKTRACE", "1"); - if sync_main() { - return; - } - - if stratum_optional::probably_run() { return; } - - match start() { - Ok(result) => { - info!("{}", result); - }, - Err(err) => { - writeln!(&mut stdio::stderr(), "{}", err).expect("StdErr available; qed"); - process::exit(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 5c7375812..2a7ecf12e 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 75768132c..42def8b5a 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() } -impl Updater { - 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, - fetching: Mutex::new(None), - this: VersionInfo::this(), - this_fork: None, - latest: None, - ready: None, - installed: None, - }; +#[cfg(windows)] +fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { + os::windows::fs::symlink_file(src, dst) +} - 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}); +#[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 { + update_policy: update_policy, + weak_self: Default::default(), + client: client.clone(), + fetcher: 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; } - 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 97f3e347f..056459b1e 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/99] 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 | 124 ++++++++++++++---------------- 13 files changed, 115 insertions(+), 107 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 722348c33..49871eeab 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 c3a44e1cc..b4020f198 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 092819300..7fa714e8f 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 d2646b105..dd37a3c02 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 a6956461e..8f5d4c77a 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 d62f2b9bb..ffbe15068 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 ca3189827..c9358cd35 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 25acfcc55..60a04bc45 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 1f3f3862a..31f5c3e81 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 cf5ba7391..7d5426eb9 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 2a7ecf12e..7d7fbff0c 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 d74adc1b4..804047596 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 42def8b5a..85ceb7493 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 = 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()) } - - 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())?)?); - } - - Ok(OperationsInfo { - fork: self.operations.latest_fork()? as u64, - this_fork: this_fork, - track: in_track, - minor: in_minor, - }) } 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/99] 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 49871eeab..a700bc757 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 cd757d6dc..17c5d3a04 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 c0ad612d2..26db14744 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/99] Fix deadlock. --- parity/updater.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parity/updater.rs b/parity/updater.rs index 85ceb7493..7da7a6dc8 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/99] 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 7d5426eb9..a435e6230 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 7da7a6dc8..79abdbe1a 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/99] 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 797a5443e..cc7736d31 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 a435e6230..9d627b363 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 7d7fbff0c..26e88eb59 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/99] 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 26e88eb59..04085cd58 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/99] 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 1e1555c7c..377f5d451 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/99] 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 66bf0f8eb..289753dbf 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 48dac61d3..2f420e0a7 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 c9358cd35..74a936fb5 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/99] 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 7fa714e8f..f07f7328d 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 dd37a3c02..ba2b0f11b 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 8f5d4c77a..8c36ac382 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 74a936fb5..e690437b9 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 04085cd58..7a583a39d 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 79abdbe1a..a13ae32ff 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/99] 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 111007321..13e9bc51f 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 b4020f198..beab07177 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 9642ed882..2a327e5e3 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 17c5d3a04..c68239529 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 d730b9bcf..cd0fb4561 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 1aecb3292..f9d390547 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 23bde87e2..7f10edaa7 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 609f4ee9b..f3ff1bc8e 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 f4166bbe5..484d4bb17 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/99] 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 13e9bc51f..821128afa 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 beab07177..6f3f50f78 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 41b9a1b3e..28cd9ef69 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 bbab8420e..75e8e346c 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 b178027ae..d2a7919db 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 827c67ef5..8832624a8 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 82f990188..b81724774 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 1a6b6fc7e..e51a8333d 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 39c33689c..31946fc58 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 28ac8d712..70cba4e9a 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 07c57705f..1abf6a3e6 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 90ab837f5..440396898 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 402e84257..fa0b1f01b 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 3e8f196ec..bb1be2448 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 64697123b..a6815105f 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 a95a0d446..48fd00e39 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 9d1642fb0..3f531fe41 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 e7f36d144..2430af035 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 f0b4ddfa8..b7188b0b4 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 6d9874b86..62571d71d 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 4c9270aa5..3f3b1aaba 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 eea7a872f..ccf716644 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 7f72f7cf8..797fdf29f 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 fde5fbcf0..42bb2fc48 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 165ceb171..afe679944 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 a34b58fa7..6fb524293 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 1299a9c12..bb292ad4d 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 e43d32e24..d97f559b7 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 9bb3be4a7..72a246596 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 40c0e23a6..3fbfcff16 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 1494a04c7..382dfa5d1 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 ec24cac36..77c91019d 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 92c066df3..9619f1b10 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 88ecb6ab3..8ca87a1e2 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 a220e2ab0..e6b781f3d 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 802466efd..57634e07a 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 c0a33f2eb..b444b1526 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 c47777bee..f7d988ce8 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 ea4c08c60..5edfa20f5 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 86fe4d207..3c16f6296 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 d50b2bdde..8540a407f 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 289753dbf..87edd00e0 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 cc0e693c9..d936bf848 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 b0a5ca9a2..b676616a4 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 ae02a6c2c..6124542c7 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 c9eb2f78f..b8b8393cc 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 de8207b88..e835bd820 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 6a69a503d..286007451 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 2a327e5e3..d0e45a489 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 239185d84..a5e55eed5 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 6504900e6..36f349e32 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 1daaf55c9..a46e34487 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 54fccb097..31dbfd71c 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 fe4cd5d44..ee4e502ac 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 3b648c450..163bd7baf 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 2440a7cda..bb3b896af 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 87457f7f3..25d27a9e7 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 9c6c261a2..ee8c39ad3 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 f1db59725..8745f7048 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 0d38e66a5..33bb862ab 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 bf1ba990e..98ba22f5b 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 6fcf17cf1..269c3d863 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 a04e2486b..06182bc50 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 c68239529..a815bddd6 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 5a3a3f0ba..fc93b1035 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 4fb724c08..000000000 --- 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 38edcc787..000000000 --- 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 629f166bb..000000000 --- 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 20bde788d..000000000 --- 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 b566121f5..000000000 --- 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 9cbd13b1e..000000000 --- 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 c89bbc74f..e3f9bfff7 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 7d4e0064c..2995d28ad 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 fcfff81e6..73e85b31c 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 f9008ac7c..d59066b82 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 2371c6ea4..61866f686 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 96c217895..e58bca7f3 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 01a15928b..42d038679 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 e5bf0cb2b..491e1d0ac 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 59981b88d..90b8640cd 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 7c0928cdd..24ce4250a 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 ed2f49f5d..d820ee6d0 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 2c7bfb380..864f2d4f8 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 d7f473553..86d269766 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 2b7386b5b..48ef2da90 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 63524a442..a42399073 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 59fbda045..1175f2d02 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 8bf555d68..d7e96243c 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 8b863c625..3d15c7392 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 79f009fd1..b49a93c44 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 d37920c3e..743167a75 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 d5a6c06b2..e748a9556 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 fee0e825b..fa8310c03 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 c69cf3336..47f3a38c4 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 819676ca5..88a0727a0 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 324474958..807535573 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 6dc7aef98..bf32258f9 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 6b8aa78f2..e2ad51818 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 f61c9d1ff..21fa59f45 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 39bd587a0..1d24b32c7 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 f3a4eb267..a6953d536 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 ebe9e22c0..eb00f0dfb 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 683ab7dfb..941c1d470 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 aa1d3bdd3..12cf549fe 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 02469bb90..8063416d9 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 7b9ae0e60..44dea3055 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 b535bcb21..ae6315aa0 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 9e3b53f18..2dbc4e455 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 3a6cc8e83..9952d1508 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 9d8a71d71..b962387fa 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 e8eb0ed68..7c1bbb2c6 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 6ad01b453..afc77f683 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 e0282d460..d9ebac299 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 f07f7328d..98754fb14 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 045b8ee05..575d5ac31 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 86297a26c..e532ec7ed 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 8d516d846..d8e5f19e5 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 ba2b0f11b..df9c90dc0 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 8c36ac382..27f16922b 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 92c0f1b39..16d538f4e 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 98190c1ea..9f78d8cec 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 1070d3a3d..5676365da 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 83335fb03..f15ccba81 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 1aab5f8f4..5e5c5530f 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 bd5a4474a..4272060a5 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 ddef71608..bdefeefce 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 261eab268..4afbe25b8 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 a8ac2c44c..6df11fd49 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 ae768e5d3..97508027b 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 3916e5ccc..3a20f1e43 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 cbed7d881..de7f318c4 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 8d2202480..3270b06e4 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 1c340b5b1..38c2d9fed 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 a3d94bde8..e84acb4a4 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 e609bf542..b2a3ae5fb 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 886120880..28a2ee9b4 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 200b01526..e16267174 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 8195a0da3..7a564ee6d 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 bb9791abe..7b31ec28d 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 cacc4dde3..25a64f100 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 0d7ef4dbb..187d7db18 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 6fa617396..a40c6eac3 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 bfead60c1..36931220c 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 773708956..d49c1afcd 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 6cfc9a43e..36a767265 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 1dfd987c1..a6c66b067 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 3704ead67..7a8f60b79 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 dec341820..da22d56ee 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 228933570..666ed3ec2 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 b50241199..5d79aab56 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 9076286eb..cda1b64b4 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 da7997fa1..10c863793 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 60321f971..ffaf36d5e 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 37a9d0a21..7a4fe2121 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 0b611dad7..d824e2b0b 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 13d3fb5bb..833b40270 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 bf84d50ee..53cff80b0 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 e77b3df93..f794cfcb3 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 12e82bca2..7f8731343 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 4090ec762..065985b0a 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 26db14744..df85ca4c7 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 7253208bb..172e6df43 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 21024f93d..b58e66ea3 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 0635596ea..d91691b56 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 9b746b9d2..f80394dc7 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 7ccafac74..32b7048e0 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 9a6b9e086..f48b4c247 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 49df041eb..69178188b 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 77531eb08..3726d2e97 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 83729dc55..b99de0f51 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 0fdea2ac3..d8b038c15 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 c3fcf723f..199e795fd 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 c8afcc0d5..62cec7151 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 83a96837f..a6a63ccaf 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 8c466581b..814953c81 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 77bc1ce0f..e1cf82f99 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 b4cc93a9c..28b39c7e6 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 557f02f31..1b2ce67b1 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 92a78cebd..20a9a46d4 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 d9f44680e..18045c510 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 36b5e7157..bf346e707 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 327979ce3..9d5385d92 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 4f7f912ca..94b7a4289 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 cc84d8e48..46ef6f41b 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 cd57b35d3..2d581d571 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 9b45f2687..1e646effc 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 05c4c1f9f..b433108fd 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 42223f878..aa2782a5a 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 3d9390d2e..058d311e2 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 c97f138d7..164f99121 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 d9c0abc73..d63abec53 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 efdb12323..b460d5806 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 36c268f73..380e9fb0d 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 ab4dde134..2ee186020 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 380c48aba..be3b7c808 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 356f3b219..b7288c268 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 f3e5dca95..eaf951189 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 e14ea3949..5d0cc8360 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 c3d812c46..d778412c4 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 8a52b62ff..76bb71645 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 c11f802a1..0f1ac2ecd 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 eafa4022e..79c1a4a2c 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 0b688345d..51c7086b6 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 e952fe27a..602217d88 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 4157e486d..e9eb39c88 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 2da94b3d0..9e4d3db7b 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 9dab7524d..01b1c60e1 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 174c9b386..c55bd0748 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 32c372f7e..e8c103594 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 bb18c61a8..f3cabf832 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 7da3e5fe2..2fea9429e 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 da3bbc02b..d5c0d361f 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 f126d85aa..a1b994550 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 e4766d7f1..c8d5c9eec 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 355f29152..e229db6d2 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 857daae10..d1c6c7d5b 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 ff6aa8dde..6757acf64 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 d38be0cc7..9da2d11ae 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 b4328b75d..3ce8d2634 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 ecc997f71..8aecef43b 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 2c3c777b4..2828c4798 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 0e5f7d531..19531a9e9 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 d01829ea0..959ff694a 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 d462d3cb9..47a4b6a84 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 dff75e158..a1df3c76f 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 40564f488..fd5689d2d 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 deefeb383..c15f039bc 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 ddf4cf1db..507659d5b 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 859ec016f..dac164b0b 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 ee416d1d0..6b8242db6 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 af9d7c3ee..5a7ed8429 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 5b2510c81..72b873fc9 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 1c1be54e7..b12112acd 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 d0c7cbe9b..8a949c210 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 f276e9b25..57abea362 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 f940263b2..df5c803bb 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 2571805a6..7f5149905 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 1c6ef92e3..6388120c3 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 e53313df7..cfd3d5243 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 5d08f5601..7a97cac03 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 35954e7a9..3361155df 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 b5b01279e..75b0943ea 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 55663052b..5dc28634c 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 7db688a85..83ca11efd 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 17b997490..5d4bb7451 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 adc93484c..d268b1cff 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 7e42e8881..661c40c96 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 05d488f95..f3cea1a78 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 97cf26441..ede5b1985 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 989acd465..c6168f6d8 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 6c3b14b15..e20d7f7c9 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 e8267e15a..d827f8fb0 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 df861d9fd..1256d98d5 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 5c638b555..16d91988a 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 c98d14027..4cb086365 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 319a38b20..d9d1c7efa 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 778ae39c9..af301732b 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 7c7512a97..ac795b335 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 dd8913c66..2db460812 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 2597e8827..530ffe0f1 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 18b31a868..8e8e5fb8f 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 fa7c1a85e..2b9c1a204 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 1f345b2ff..79faf0ef9 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 ad5e02c4a..59e64abda 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 ea4cdaec6..8b0c98c64 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 e1afb3940..97a2e0715 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 03347cbd7..f47d9171f 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 65606cab9..d0aeb8837 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 1b9d49b26..c6688252d 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 0cabce625..3fa0a8f8a 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 b4c3e1113..9e3b927ed 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 336e72875..133e6eeac 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 465ce4e1b..a6a48bbe4 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 9d499723b..954be2aa9 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 eee1fa39c..e33fc1c23 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 c86123d1a..80e95fb66 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 f63ebbea2..40c3d938a 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 e29bd1ec4..8f5a8a7ad 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 7aa50c80b..8c5e9c2d6 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 cee689b24..8c77e7a7f 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 9d8858b79..d635d34a0 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 3747431fb..ec1f82626 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 63cc93111..b112bce75 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 119024437..05628cded 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 739a2fea9..99ef026b3 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 a3ea4d326..fdec03c50 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 25bf51130..3496a034c 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 664716d95..cf098c83f 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 676df1f95..af751ad33 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 093479b3a..323086fa0 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 208d474df..5a28a6932 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 f394f61c2..be03795ed 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 f8619ff19..a55ad207a 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 954ec500f..6140f0fae 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 bf0a4ec44..2b3afb2ea 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 e1667607b..0b3e3ca23 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 d4ebdc448..50fed6b27 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 73c47ee61..c1bad398d 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 23523e48c..839e9722d 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 479e7e7ec..ad2d69d57 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 3013dca54..424ed4815 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 cac89d76c..af0836ad0 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 aa9faa1da..8a08bd163 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 12c57a769..a849b9323 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 d916906b6..16bb7ab0d 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 2867609d6..5717453ef 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 82f990188..b81724774 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 9caa436bc..27eb8fb0b 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 dc58c6a8a..caa0228fc 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 169bd2a82..afd3f92c0 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 c7adf1011..c7d288010 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 cd0fb4561..21955bdf3 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 391ac648d..57f929702 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 c7543ca91..0900c7410 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 ffc83dc7c..b19c581a0 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 e80a1ec30..2f3a1ebac 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 32171bbf4..7d559dbab 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 1157e75d3..ce40183e9 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 f9d390547..a89d1a9ee 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 e974626d0..3c7060260 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 a3c170c2b..5e2718a77 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 a78320343..c17acff98 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 7f10edaa7..1e29c5c35 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 c8d100c6e..3d9d454e0 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 1498a45e0..34e33609f 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 688d139be..a62815e72 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 a27c0637a..b635b012c 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 6e6e3942f..c8116c4e7 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 df0c9bde3..a12371ecf 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 bdeaec3d5..9dbf2454e 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 522f566cf..369f8f4b1 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 3d5159a9b..8b8b27c14 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 cd9a5a6b2..9bfe93cb3 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 bda734368..0a48f1cd9 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 f65627fce..afaa4a138 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 b8175e4f7..5de652037 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 e52bfec9e..231f5fa24 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 82bf1ac93..570864512 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 9920b10d2..56ae4210b 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 2b871f518..9de832978 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 cdf3b1f63..457f5e416 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 49b443d21..5a32ca523 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 65bb9e1b6..a5e078d7e 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 8595642df..3fe455f61 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 892836d07..c30928d4d 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 0d2183122..c1cac6034 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 eeaf716c8..cb8f69173 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 f9839c10d..123acf28f 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 bb3a17d26..8634b9511 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 008861602..27592fb54 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 e19ff81e6..d98637f04 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 cb7fce6a7..b41f7b1df 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 cfd0211f2..89783607f 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 f055a6913..a7658dbe6 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 89ea99610..a75e627f7 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 e02f6cf71..80f3efe90 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 3993b527b..735ff0972 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 e6ed1a022..d90560d28 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 ed456fcce..6740f85f6 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 a031282ad..8e824258a 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 f64fe0498..a17de1e64 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 f7252a9d2..4f27e1525 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 d8a3b585d..d991dd55a 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 6858e9800..e285707f2 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 0925882d3..a6d44701a 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 0c91a9b6f..68a6ca342 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 1650bd314..6ad755d70 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 89354d49b..5855a888a 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 1ea32e9a9..9116f5ca3 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 ba5c38a28..8dda460d8 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 95c3b9d18..88696ceed 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 bd172e4a6..9957df909 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 459eb15f4..7bac85cf4 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 90e5229d5..c2825a243 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 23bb83f06..eb1756b60 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 99a2915d6..d5bd0010f 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 e8d8c3254..05b41a42b 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 d789a6ed8..768552bef 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 4b822b4bd..50ef7b227 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 84c675ee6..1d8bc6c8a 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 2abaad6ac..da4ba15ee 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 f0e188f2c..a961e7035 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 9b0ec38cb..6048d2294 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 5a6751a4f..ce8777974 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 96c733682..578083b6f 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 10aedf13f..f192e576b 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 61664b8fc..144c1c7aa 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 f4bdf38e2..00c9c1b35 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 d653c6901..330e570c4 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 47c3e9758..bec5ea87f 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 af6886008..9ad4cf831 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 649f26db6..d18357f5d 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 2e1a538a6..3a82d7fa1 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 75d4392d0..9e0ad11b8 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 16831ea66..1cad5b530 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 bfe7cabc4..95dcf2e72 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 970dd606d..87a7cf558 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 18051a69f..3ab8765b0 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 16fbd4d2e..4cbcbdce4 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 a22c8d131..27d200b93 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 1094cdb83..632ab6f28 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 aac433d70..b44047610 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 b03419eac..49de88674 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 9b2031600..ba8f3a049 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 4a11fc416..afeab3c49 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 cd7c2b0b8..4a0be931c 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 973ea1c51..b385b6471 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 8148f9385..b435ea1ba 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 85d22f4bd..f01e35c51 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 0d0e8c557..4f8450b5f 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 7961da81c..d70f30544 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 0739111e6..ee2ab2d41 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 51d84f7a1..9cb6635d9 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 96e99dc51..924e52669 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 4903a0cde..154e08f5c 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 38f08f725..c76208e92 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 91e01ab6a..22082cde0 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 7dd5b7eb3..2c1d04d93 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 557314e5c..d0d97cd0b 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 a9ed260f2..5bd5f7e5b 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 f7fe42c54..fd1bd08b1 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 db9a71d23..61022bdb4 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 70c8cf4c2..b7673672d 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 7b323aeed..e637987b2 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 ad545cac5..106b321b8 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 6426bdc06..3653313a7 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 126ce651a..6783e660a 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 a14087709..2518eebd1 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 88c0988f6..262d708f8 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 5c693c0b5..4926153ad 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 f36e5537c..6d0610c84 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 d0bb22941..23ed549d5 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 15cc1934f..7040d5307 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 eb52a8bb7..838ec6c4c 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 b933e805b..071feb851 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 28d9cc6ff..f36d9dc73 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 24398483e..87cc76d03 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 3e627e62a..b94b33261 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 b03558207..e75710637 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 2a1cabb46..4b28bf890 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 25e6e6129..6485a665c 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 5e434efec..565944877 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 82671184e..e00169b6a 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 d6fd2b203..c7d8da2b9 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 4413fe432..3fe32f4d6 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 6cb0dac17..5fe9aac06 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 8f0aa48ad..3a8a41727 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 591b9a627..17d428e75 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 718a7e66b..d67f11307 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 5ce7a652e..b73500a61 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 84fbac826..41b809525 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 dc2f9bc8e..76f380935 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 78fc6549c..a27bca019 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 7b6e35934..ea1bd191b 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 19e4ab8eb..3ad7eb708 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 53600b6d3..2de500309 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 c417e8911..9303803bf 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 2d6eee75b..a6a2ddda4 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 70bc44bc5..4652c7c5b 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 d8cf74a8f..531dfc549 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 c779d71ef..cfb07dee7 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 2058cd011..e33bb9273 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 fcbda091a..93b01d8dd 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 bede8bd60..20cd0e7d5 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 a34f30649..6fe442e93 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 252876be3..df9bf2f1f 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 d04e73921..43cba7643 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 8d0b1f09c..b5ab91e72 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 f15765b1a..35f96b924 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 45760b277..6cf3d8bc9 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 ff6d218eb..4ebc53d69 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 92bcf8795..8e7c5f19a 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 a8020b825..8cab3252d 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 ae982af56..b9ee15764 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 47d7eca6e..0ccaf01f6 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 075837ce6..ccf6cf5f1 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 9354a59e5..04c562f50 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 459f165b1..905530cbf 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 34a6bad76..05b7ea35f 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 5e317880b..6c2ce66fc 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 eb3213c79..6cbf2a4b2 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 529e7753d..d29d078fe 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 58059cd2e..3caaa526d 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 90fa909ef..31674bd0f 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 4a5121906..ba1f0b63c 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 0468cab37..55611075b 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 e698a0e80..b0202b633 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 a05ab6436..2863258da 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 236578226..a3198ef88 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 5ab422ee4..49210fc5f 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 82805e71b..afab04f7d 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 87fbc567e..5ad841661 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 be08d616d..33beb4a94 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 927cff569..89ca9681b 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 b32795f7e..56b14bf23 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 0925882d3..a6d44701a 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 4b51afb59..915f110cc 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 88ad6d407..d2c722d81 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 34c7eed8a..539a8e8ca 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 53b4dbcfe..6935d1266 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 ee1374f7e..b22f62923 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 76c107bfb..90e9c1909 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 4f38b38b9..b497b6638 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 a86a27544..35bac6160 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 4b822b4bd..50ef7b227 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 b0d4a965a..8d2921ae5 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 d61fb3fb4..2e8746601 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 46831d782..ecbf4e412 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 190035b1d..54fe69c34 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 0925882d3..a6d44701a 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 101c77f73..0bdca084f 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 88ad6d407..d2c722d81 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 ad3107789..5e373a846 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 f10807b2e..daec42ac7 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 24d36d796..4a82b5b7d 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 842d4b7bc..58a317a84 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 f6d59f44d..450ac31b1 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 f76b7fb61..f87259f30 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 9bd96f1a7..7adfaf1b3 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 b5e4d5a97..1722f3988 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 236578226..a3198ef88 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 1f3b67b4c..f37a9fa47 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 f69a65e3d..95f33d38c 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 074c527d0..f885acb0f 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 d48f63208..aef56ea6e 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 2e07f6ba0..0b2d4551d 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 6fbb5df27..f32a03d0e 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 3d9d9293e..4a4d16674 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 72e046afb..ed52835d5 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 1e75d9fd8..f1fcd6848 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 7701695d7..1456e23c6 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 bb321ce2c..99cf1bd97 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 3a3a8ee52..5513b7fe3 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 aae13fd7d..7b6eaf852 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 53d1806e1..a16514ed8 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 8533843ff..624ed4adc 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 591fb59fd..ba5773802 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 f8c684ee2..5d7e05bd9 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 0269a4370..f06064ffe 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 0ab133b57..b41a4abcc 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 8c0e846f3..61e1d16be 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 6097861be..9b67b7d8a 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 966c5d3e6..cdf6a129c 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 382f5cdc4..94913a2eb 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 374011fc3..8d78c9ef9 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 fe8de6e97..a4651214a 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 ab807a44b..ea7d7b558 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 1690bf1c4..630a36a68 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 236578226..a3198ef88 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 42fca1af7..e98963cb8 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 f69a65e3d..95f33d38c 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 ba74ceaea..c9991acd5 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 88ad6d407..d2c722d81 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 0bc86731d..60012bc5d 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 76c107bfb..90e9c1909 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 0468cab37..55611075b 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 b884597d7..c058b583e 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 acee4dee0..df80b13b3 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 fc889b7f6..ed143968f 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 9cba69701..584fbb319 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 3e848ede9..5525e1a9f 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 da435b57d..33c5d0558 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 3ffee343d..f8b19e690 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 236578226..a3198ef88 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 56854f412..7259964b7 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 17a45ecd6..fab5bf152 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 04f2f8de8..70fb4a08b 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 acee4dee0..df80b13b3 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 d132da3d8..0b8a8be55 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 e8d8c2bd2..076a8bfa4 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 4f2bd3c70..2abaddd48 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 e9be1d557..c1e7c91a0 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 45290937e..0d1f7e50a 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 236578226..a3198ef88 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 e379038fa..2de041126 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 e12c98c4f..aa48947e8 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 cb433068f..77a985def 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 15d43c375..d058c814d 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 6ff0011d3..8bca205ac 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 e4baf2705..873c2eb88 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 76c107bfb..90e9c1909 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 a7df87585..7cd1ee57a 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 f4ade7c00..5e278c07e 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 b8b6207cc..a743219f2 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 f96e784bd..d6807c713 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 488145331..f6ffec729 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 26195de88..9bfa8232a 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 369d9690c..c0c4badf0 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 fcd2ce48e..2b43c8b3e 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 4837290a3..085a70152 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 dd6652d76..0526802b9 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 20981877d..926536be0 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 059366173..d53df1c7f 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 6b0572e54..401302520 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 cf9819b60..739e9d4f2 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 e0f620b70..06b8f024b 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 5fb7d4b6a..94117fbf4 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 f0b9d65da..f19894b48 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 4035a9bbe..7a586b256 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 e0101e1f2..c66e34128 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 2cfbdf540..e146dbf7d 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 d0d0cd423..dd6087815 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 3878af4cf..afddbfcaf 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 236578226..a3198ef88 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 9cbbcf478..238ef4f88 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 f69a65e3d..95f33d38c 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 302b51250..067b3ead6 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 88ad6d407..d2c722d81 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 8dd7cd578..870447338 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 37b5835f0..c73d890cc 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 0bc86731d..60012bc5d 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 76c107bfb..90e9c1909 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 55f7d9334..1281bfc93 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 d2f352cf3..f6a1b16e1 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 0468cab37..55611075b 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 b884597d7..c058b583e 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 24b6428f4..6e28a61a4 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 f6d59f44d..450ac31b1 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 82dba383b..cd0fd59c7 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 1bc76e123..c359dd072 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 4d29a6692..5cb84f5a9 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 6438d1dff..6cd0dcc3a 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 87fbc567e..5ad841661 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 5f92280be..85e4aaceb 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 091df4c8a..899a03b53 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 83bc6a337..0273a5f8e 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 5a3c7d5f6..fd680769c 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 3099d1f42..ff135192e 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 a008ce84f..54df411c7 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 df5b41e6b..5c1faf985 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 43acc27ab..c79f2563a 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 1d3d8fe31..2a4800a67 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 9007217b7..a442bf3c5 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 7b7f8341a..1768cbe6f 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 6a94f5c9c..0ac784023 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 236578226..a3198ef88 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 ad9886025..f26f9a0c6 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 6e1ea80fb..98f3fc5ae 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 9a8d7c636..00f726cf9 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 51f48d46a..76dfb0079 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 76c107bfb..90e9c1909 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 450a2b56e..fe8ae4c26 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 87fbc567e..5ad841661 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 289c8c37f..9a8ceca3d 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 fd394b4ec..3b14bd0a4 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 0468cab37..55611075b 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 bdcc98df6..507c84bf9 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 76fae17e5..057a44e65 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 44079b224..f966050e9 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 aee16fbe7..ae41e6a0b 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 4ca47a6ea..64ebba3b6 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 09e65954d..60be410e9 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 30ad8896f..40e8626af 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 be14cec84..831be4a0d 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 7351da524..84eb14270 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 65ed24cd4..8ec37fd17 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 33b2de659..84f9c18d3 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 87fbc567e..5ad841661 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 21952105c..10ca67b95 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 48bc88a74..e31c1675c 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 e9e7bebca..cc4d38fcb 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 f6d59f44d..450ac31b1 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 cf533432f..e2ea73e39 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 5fb7d4b6a..94117fbf4 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 f156b78dd..6461998f3 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 9b95bb0da..276811982 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 16fcae3ad..3c71edaaf 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 d62acaa32..d8f503621 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 29f84f50f..6c9d70e6e 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 35eef2edc..602cf7bc0 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 3e6241fb1..0261a77bd 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 785a6f3ad..acf7ad7ab 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 46d6c9c74..b90f9c61a 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 362df7bf5..ddbd41c25 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 278138d54..101c8f3cf 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 9e9692279..2f234fea7 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 0f1247477..443cbf8bf 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 ab4d35b34..557a73156 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 d5ff471fb..3a136ab7e 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 9cc3bc076..ee8cd9069 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 76886af35..bab9ad6e3 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 eb7e5fc0f..945057084 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 e9f727dac..b8d6ecfd1 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 f50bb1115..e4ffc1e03 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 efe45f34e..38fa77d89 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 783663716..af35ee218 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 026e010ed..86f528a34 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 25d336fab..996d8db50 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 b3f09556a..ddbdec10b 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 59cb861d3..e37ab6358 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 2b526c28e..d95a64b89 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 3f24f216b..e5b1b407b 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 f61e3d563..52d8b0976 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 a72158cc7..177223290 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 fb891f0fe..f873e3a9a 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 b19398001..0d04438c3 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 05f53efd5..da84e291a 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 f869e3ec5..2ff143b64 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 c1911d8d8..bebc17eee 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 d0f4ac2ff..4d9cde568 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 97d2ce159..6e5a20b03 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 fe982a297..3c91c9701 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 cd00277c4..86133172b 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 f030a32d9..5d2a3e686 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 bbbf6fed3..267ed56bc 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 5801eb970..55764c956 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 2159277c5..269075983 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 0b260f426..ff0eefc62 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 e8d0bb8d6..84ec5b425 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 6e372f475..d52b44801 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 fed028bf9..c0cb84617 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 b88a8580e..d56f99dd6 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 4088fac53..2736256f1 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 d8413cee7..d7ec8487b 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 f75cecaac..a66124c9b 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 18cddeee9..1f92744d4 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 266385511..1170852f2 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 314425dcf..867f130cf 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 975e7bd59..cc921634f 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 cc5c96964..4f5ef93d5 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 525e35495..f9321ab89 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 93dd818f1..4b03f9eb7 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 d99ef05b4..c19d3303c 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 b28bfbd26..2a3f08a6b 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 5779fb553..6421a806a 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 77f52f141..f5b988a8e 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 5738c2704..9140c1b37 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 51c5d3cfb..d2fa869a7 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 5519ee8ea..d1993c906 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 3d97ab598..468d5672a 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 93379cab9..5de8b27b1 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 77545b406..77989948e 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 4ab5df693..c4004cdf0 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 21325f786..aaf5d36aa 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 e982107ee..26ca7dcf0 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 8ab9233f1..8a6d98365 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 995b06b0e..98e3de8b5 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 fde7fa1b2..ae3c92e48 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 5519ee8ea..d1993c906 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 c3ac96490..90b161321 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 58ae3e8de..58868d32c 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 43724f034..3e0ca10d5 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 3e79033d8..229229ced 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 251bfa6f9..a26ffecf9 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 648ae765a..96892828b 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 241e26fc2..f5277ceb0 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 c3d9215c2..853ad99fe 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 ee1a97a6e..a273d6e63 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 4dea9ba51..c732f39da 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 be5e62af5..479eb2b52 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 a2d1bdba2..4b70e595d 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 9676de163..8f5237ec2 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 96ff38c60..8121e14d2 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 f3f6fa515..b9d277ec2 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 549306dbd..c1d69e26e 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 f5f09578e..289374846 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 1c03d3400..9687a672d 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 539c340f0..9645d3db1 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 03b228367..bd0cd9d61 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 86f027a52..f37c80330 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 498a8572e..92aa40c61 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 a0cc13689..72ffe5828 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 1a8bfaf73..ab7d00d59 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 933de9265..369c4bded 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 d9b0990db..e26958f8c 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 7a132aaf7..f97e84ade 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 079300160..115d21bb3 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 5d7863632..276a22577 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 73d1de300..8dfd29f33 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 e888b6b81..0c9eb1b73 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 17845526a..d3e0ce93c 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 215fea893..a6daefbc5 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 d20a2e7b8..2b5a6b162 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 64e1d6199..ce90188a9 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 52be49bbc..092494399 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 93379cab9..5de8b27b1 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 18b819c67..694b55c66 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 fc4dabfc0..4314d2b5c 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 920094acf..2869dbbc7 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 557d4fa68..206587448 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 588b4c421..76a2eaacb 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 e3c3050fb..1d2f63daf 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 5ebced4b8..6b251bde2 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 9c5d696b0..fc76a8968 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 20ac06f85..d8ddb0b25 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 d0bf396b6..175c98966 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 def5a22c6..e60fd122e 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 0b4d22a2e..751466c85 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 b06e91b5d..12570dac5 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 24d36d796..4a82b5b7d 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 e08d7203d..a175c4ea1 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 57dc569f2..b43ae0de4 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 9b15a5f3b..9ef8eeafe 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 1b2b2cc1a..00b5d3d12 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 f4d5d2275..6db4469c3 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 0f0844e40..d3574fdc7 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 4e6184c6a..f74bc2a0c 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 76b363796..0be511bd3 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 a23f60659..d02a22ace 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 14bc9b0a6..91e76c45d 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 88e1fa848..9b6e56904 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 2d4c96ecd..294072f58 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 bce1c6077..2f08c7752 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 f8cfb2c1e..36e3fbb7c 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 4b6950498..52b9bcf1d 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 1dc1e076d..3b36a019f 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 30c7507f1..dbcc00b99 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 c84f7db55..03bb93fe9 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 a5406051f..500fe39b3 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 87b0dfd33..f9195b1df 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 2b764c58d..c3b3a9bdd 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 ea34f5319..7163ac7a5 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 f624a4e5f..60a07355f 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 8ef3c3b39..73e7c6908 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 8738f7b0e..c3f04af44 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 a90d8b62c..6a000bdac 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 7629c4f46..5a19b1c7f 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 47056af2f..b172aaf8d 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 7473ed8e3..19ee421f0 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 11b30c6b4..5a5edfb0b 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 bd3c1022d..5684e8a93 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 1a6cbb129..2e99bbc28 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 42e7b5f46..cc10b3fd1 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 428958c4c..0048854da 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 7a913f8ca..2992eb0df 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 138479716..d7b360b14 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 1c175c29d..ede16f7dd 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 279a9da42..413ff3319 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 4a8a3f82a..6bae2b3b5 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 af6e190bc..7cbd7adb8 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 642dfe403..aac1ea779 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 1d62f9ea5..dc043e242 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 37cb4f0a3..0467ca5f1 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 8243420b5..80e76720b 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 a8cf826ae..d3cb4bd17 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 f4ac7092e..89cc3d066 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 091153c95..fcf51a53e 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 d2f352cf3..f6a1b16e1 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 f51d38a6f..f06425e4f 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 9385cb593..30d8117bd 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 82855931c..a4a02e01d 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 545775ead..eb0c672fb 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 2bcbd3753..84084c4b7 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 f744f5c57..0141016ab 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 818eb0f80..72df85cb2 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 595544079..37d1dbd0b 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 1ffd4d83c..c4553fb2e 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 8074a8688..02f3c6983 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 8dc0c9ef0..7fb3df213 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 bc98968ea..e4dced882 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 24ed7c44e..e5064e21d 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 8abd5d656..df6f44a8c 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 af5761fad..f9cb92f95 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 6ae113fd4..d0a358bad 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 9ae4ecdfc..101bb19ac 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 f69a65e3d..95f33d38c 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 871b14e9c..edf8be10a 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 02719ee31..8335104c0 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 f1b8c6902..103c1562d 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 ea4074149..d88a0ac60 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 8ddd68683..35486c1cb 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 1506ecaf6..de25b818c 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 a65e221a6..2d5335c14 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 8d30a3963..51a6a5daa 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 9bbc9d20f..5e627999f 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 12d4155aa..063244114 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 7af6d342e..c1efbeb96 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 b7041658c..2afd59dde 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 6391b478b..523098ec0 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 d611276a3..55747a3db 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 2f49dbc95..00b62a7a0 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 f974c9e0f..2ad4e9a76 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 de401ccaa..c482c9ce4 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 1e94f4f1d..b49dd0f4d 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 608f22a1d..1d63ca624 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 da660b49e..1afe55c91 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 ed4fcba34..e076905fc 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 0cd92c5c8..3fb15cd86 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 58059cd2e..3caaa526d 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 d11ae7cc5..c98019009 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 509a99444..3e3e0afb2 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 ba3f0a957..9982a8ed7 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 97c1b0181..a73e22f3d 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 3d9d9293e..4a4d16674 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 f25ce207c..b11400d04 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 b0bb94c94..64d6cd722 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 f403cf311..1f062382a 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 19493b1ce..4eda78ce5 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 b7bfbf375..59fb81458 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 74bf603fe..fe9177039 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 1b06c01d7..09a00778a 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 e2a1886be..44e2c7563 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 92a54e2a3..02b93a90f 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 c708eb728..44097481b 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 b417857e0..d9489c6aa 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 471dad14a..fb1c1e4c0 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 cb879e3f7..adc4a9bd5 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 9c12bf7eb..8b73aa1b6 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 a54032999..6383e62bc 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 c3cf2588b..3d3c7438a 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 113f3424a..0f5e8d056 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 893a50188..375d4962d 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 958075867..ab7773447 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 8c94dfca7..323f189e4 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 956f6ffd2..eea046b51 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 afa5e15b2..9c403acb2 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 fa8d35e61..466ffa9b5 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 76c107bfb..90e9c1909 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 9da886ba0..0ad9075d6 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 554a5be0a..31bf3ee5f 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 3774b0e52..15e1e5463 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 0468cab37..55611075b 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 bdcc98df6..507c84bf9 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 1606857ed..d4f99314c 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 efb22b67b..e02355ffb 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 6898d3e1f..5bbf8b010 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 27c097eea..40a618b3b 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 de6195621..09352d435 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 3e79033d8..229229ced 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 8ddd68683..35486c1cb 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 b483af061..14308ee0b 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 232d94eb2..55e5cfc05 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 522684140..fd8e67aad 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 0ddc533d4..49b37e02e 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 9646358b3..e8bb6fe03 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 4c766ac3c..f497053de 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 5198195c0..4bbfd4772 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 4c9314386..495d1928c 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 e3d5c3b14..7008304f8 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 0a871e6b2..e1123e0d7 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 6d7cd45e8..ca1ca43fa 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 71cd49624..bbcb28bab 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 b52050649..a0db6fc6a 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 ba15b212b..cbf312df5 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 7b891d721..323413d31 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 9d2aa1bd8..6e0387ae3 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 f24757da2..e0a7d3000 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 a36d124f3..b7431050a 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 fba250fd7..8f97ae3f8 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 6edea3a32..e6590884d 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 4a1d2619b..cc0ebf926 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 9a565c26d..1fdc15486 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 eddcbfcbf..b52429f1f 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 715568fd9..fcbe374e1 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 90243cd5f..f3c75ac7e 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 98e948a38..35a386df0 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 64baa2fe7..ddee9024c 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 820d4b3aa..a0ded6a43 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 09cdd2226..a12c810d5 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 8e4eb848e..89503b4a6 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 45face696..b99335a4f 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 3f773980f..88012888c 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 c5a965458..785f33850 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 e7947233b..b20ed3372 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 d0664d25e..4e2a073f1 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 479448234..488ac2daf 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 f322c629c..1f993768e 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 3313404c5..36d1f6d55 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 b688d06fe..591931ff3 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 3d312a2f4..75802ed5f 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 123f9f592..b6240ff01 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 1f0bc6735..3732840d8 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 acae683bd..f48aa6c25 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 7df87bd9c..b2e0a9c28 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 4a5121906..ba1f0b63c 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 f74dcd5e8..61c6a8aad 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 2e98208b6..b8b28208f 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 840de05b9..9e4c56166 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 55c215f7c..75c7cc401 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 11950acfa..5ec2cb322 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 4d54b640f..f08c9fdb0 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 7cc23b215..980ecff9a 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 a19b9a9de..98d4642fd 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 a844ae989..70b6f770a 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 e9be1d557..c1e7c91a0 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 2d19f2141..beaf42867 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 8d2a51500..9ce1b6a1d 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 9c39203ba..8798e8262 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 f97d5b1ae..3a1c9a5f7 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 609f029c7..faa6a1a32 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 97e107c00..a0a5e1a40 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 592e5a340..c5cd529a5 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 87fbc567e..5ad841661 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 13ecde190..8c5baa684 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 21837d4b1..ec666b815 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 35d2493b0..fed9b4df0 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 e4358d46d..9ee2947e0 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 0da39f236..35c7df997 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 f7232069a..5f105db14 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 44079b224..f966050e9 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 bb48ce6f8..8d7724838 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 d1a5eacbe..5af9fe77c 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 63f569f1f..95db7a1f7 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 830a44f6c..1c86dcbd2 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 236578226..a3198ef88 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 4ea0faf3d..bb42721cd 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 ad0e0c140..8cc2378d9 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 f33fc42fe..560555d7c 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 1ed114d07..f5ca34910 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 0925882d3..a6d44701a 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 c29e624bf..dba05dfd9 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 88ad6d407..d2c722d81 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 7a0dd9290..65e731587 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 4ebdc62db..9d3cf279d 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 1bfd2fa5f..fff7adb6b 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 e501e4fe5..38447911f 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 18051a69f..3ab8765b0 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 7cc23b215..980ecff9a 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 5b34a6b51..36e88f039 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 1e15c3947..cc292275a 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 075837ce6..ccf6cf5f1 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 3e9218914..16a842964 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 6fbb5df27..f32a03d0e 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 71d03dc50..84e06b9dd 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 6014c7315..209e1e54c 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 7cc23b215..980ecff9a 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 76045ff70..154ce15b1 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 b0b731b93..ad820ebd9 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 c1790863c..1841f4c7c 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 38a33260f..81cbe79d4 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 98cdb6746..48420712f 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 14b71aa10..2f7c52957 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 0551a6145..a475c9f24 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 ffd3111f7..5211138b7 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 38f08f725..c76208e92 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 1535f6cf2..5acf4bfb1 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 5d65ef153..94aae9c57 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 cc7fad370..f4dcd97b1 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 dce593d2b..7fe6ccc80 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 cc189d4ca..e4ba26c56 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 261109664..5bd6154d8 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 d01ddb24f..9add6dec3 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 4c5414f71..878a87452 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 ddadad92b..9ee674d76 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 af2612199..1050e9a53 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 a6c455dad..bc1230b9c 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 05ca180c6..787fadc17 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 f42675474..871baa5da 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 90ae8634a..7ca280a6a 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 c42a8a810..1bfc3515f 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 d4b048781..a7830885b 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 d50e5cde5..fc5b04d96 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 ae4159c71..9363e11ee 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 4aec1d19c..b9c2cc8cd 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 0a30991de..fa52730f8 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 f7b053acd..ad9b01a92 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 ba3c30802..7d3c04744 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 1916d0571..5a945e1ea 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 6f46cf571..99c24a591 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 7d2d660df..0b24925ff 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 ad0f9fd1f..d12b85006 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 af06e79b4..438da642d 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 3ac772104..15d219f5c 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 2fe1e9037..54d777edd 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 bce30eded..17ccb4f9b 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 ef7199290..5f1b8391b 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 671d4de84..4f721fd6c 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 095f6e6b0..6cf7298ea 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 25800e806..49e0c3654 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 a2022fe2e..294c3140c 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 095a78d60..865a678ae 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 4629a6522..28e323127 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 ef4265938..21dd49778 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 f3cd5a267..a8ad6e6ce 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 cb3fdd143..b561ddcf9 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 ff804fe5b..37d3c7489 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 f0b4baed7..8e131248b 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 bcc85a431..3e16a6e01 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 a99a72d63..b00e9c4a4 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 8c231275c..c315eff27 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 d236dd846..84441be96 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 68dc8b8f8..7275bd170 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 3cd0c0a43..26a3b6215 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 2bf2d2841..0ed6fd3bc 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 5fc327c03..6758a0743 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 e48544202..8d27dfb68 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 ff959c9f5..13c0fffd2 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 761a77f3d..a296b731f 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 8980e34c4..e765d9f98 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 c16dbd276..6cf9f6d02 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 6bc04574e..386f1da49 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 201b6646e..5566a319d 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 c950c0d65..e6e5bf1cb 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 5b6301dc9..93dd8fdec 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 e27e29724..aac0639e1 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 31d20aa42..13f9cee55 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 70caca49f..ec0d1cc1a 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 3556a6194..822f6a162 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 1115ec632..f1956dcf1 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 e1e4ac8c9..452653960 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 850847912..9605271f6 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 a91518ba2..77e7ab4ba 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 6f7a40dfe..354b1e999 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 f8162611e..48a9a92e7 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 438d208f9..2ea268c7c 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 c6b522c46..b9d48617b 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 d78ec7d3b..85591c509 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 bf91564d7..bd4c4e0c1 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 e9086f1b5..50e62c698 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 db5b75fca..e7e36200c 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 155d3d7e3..3f4aae23c 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 569558ede..6a3026b9e 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 7fd07921e..20c36f2b7 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 b2f93240c..b204ba2cd 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 7853e0d33..7cab96ed0 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 52cab63b9..b65eed929 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 6867345ab..22ea46a91 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 7efa514c3..3a99677c4 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 4ee664ad2..0d5784407 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 0617721c2..31def4436 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 f1d89d75a..39513e0c2 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 1b3f8b87b..ab57370eb 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 1c55eea71..a174e28d9 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 3ecd93362..4eec91290 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 f1a9be5c0..af5fb64dd 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 b4cf2a6ef..33ef0ebc4 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 8e2b2aa40..49a4db9c1 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 e7097d66d..3857a65b1 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 835969920..12cf9de56 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 647bcfc43..78100c74c 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 44079b224..f966050e9 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 891ec6632..a8b54f7e8 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 26850209a..42c1c0d14 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 93ff99692..1dda2fcb0 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 f94cbe2b3..c0c3a9f8e 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 0e141a16d..6b0392fc2 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 286e2c20e..8389afa66 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 44079b224..f966050e9 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 169004a08..fe95537f9 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 a431fdd0a..e0b103a33 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 e1d6ed7ee..82010063d 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 314470d3d..07af4943e 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 3f6225ee0..adc5d6f8c 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 62085feac..97166449c 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 3fe780bbd..8761c3c3b 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 e2676260b..a581a3860 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 ae6582b02..545bd2612 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 f6fec9ce2..065f41596 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 805c96850..34a42c296 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 8b680204e..82d4c0836 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 7512a47bc..50f1d532d 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 9194cfd94..98923fee8 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 39d17322a..89c8fe952 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 095f6e6b0..6cf7298ea 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 5c0a3f793..ad40c576b 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 8ac340cbb..1c70a94e2 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 00cea94a6..199d1256b 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 fb08bbde2..25141915a 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 d0bf396b6..175c98966 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 f74dcd5e8..61c6a8aad 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 58952bd9e..aff1623a4 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 cebd98d9d..b81bd8d2b 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 1a5fbeecd..b33772c48 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 cb4bf811b..c3b7437e9 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 7b0902c1f..31c4dd244 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 7ea957752..dd1985466 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 18d320c63..2f99ff951 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 15dc4747c..db5328e18 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 fc37b94bf..e29442832 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 1fa3da797..b4830abc6 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 36c91c76e..e90c91ebf 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 147c64af0..13f752f8e 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 6e125e9e2..a7486de2f 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 73b0aa14e..d926220a1 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 a7b086b96..1cb8c0eaf 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 c1e803f56..e52e62656 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 aed7464b4..9e8bd1524 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 d1a2b4915..923d799dc 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 a1bbaeda9..a5f4b383f 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 3c593fd87..ec011242e 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 a0340b46b..f118131fd 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 535edd970..7f1114144 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 67303cc7e..747be8f7d 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 8be54476e..dfb6dfa02 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 649cd170f..68a7060a0 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 03522a2c9..d8b6183db 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 3899f23e8..8a0de8801 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 ece6d6359..7fc75266d 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 727469ea2..60a215849 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 5aa4b09a3..47480fbb1 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 301d921df..110eb362a 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 5d04748f5..d2385978b 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 c162d08ce..54feb43c1 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 14d90ee01..9aad33115 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 b94e1fa55..9c67ab3d1 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 4754eeee9..eca4b6db2 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 a347a8cf6..2d1a90ec3 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 893e7e93e..74a12a331 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 baab83d08..b64afcc31 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 90ca8a658..b3e0ecbae 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 bae17bb24..d2cedb551 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 b8b7b4a4d..0e388f1eb 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 d56c4a4c7..e311175ff 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 850eb2502..d36327e70 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 752d6853e..229ed77a3 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 272e7bcc2..c732a1293 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 f9de30170..19b9974d9 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 aa634221d..882686319 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 0daea1ba4..eba75840a 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 544407cb8..22d6b36d8 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 bde3d6dd8..cff03db54 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 5fb3e469b..873de8008 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 e0bced6ef..2b06271de 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 3ddca43c7..4bdd424cd 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 0d28232ef..53c3eb113 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 62b8577d4..722e9afa3 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 cec6734b3..b3bf34be3 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 1ea54ff04..bf925a8f0 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 8898f723e..a670eea7d 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 059203453..b3d535b8b 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 326f42dba..b8cf3c26e 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 1c5d30067..28705d363 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 19becd5ee..9d4d6bff9 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 c04498591..1eebe0d28 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 17493203f..f444da326 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 ad226048e..598bb9e92 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 95365c0a8..93a4e70b4 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 b29325738..e8d02f5e3 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 ecc0d05a4..5e7ff8348 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 e348826e1..e7e525492 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 d2ee8b89b..c0c61afaf 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 b0a7c2a4b..b29430fda 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 d4ebdc448..50fed6b27 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 590eb0b2d..a22c748fb 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 377f5d451..78b6edca4 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 ae7e1f62b..e790eb596 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 ffbe15068..f4bfbc8f7 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 d930085db..30349284d 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 d2fc30d6e..b8b324f67 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 a9aa91329..5cf395cdd 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 6dcbd6453..cd94e0299 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 e690437b9..df8366ab8 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 ec6fd8846..4eed929ca 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 b9a800101..d509c174a 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 b9c02efd6..0a49cd528 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 60a04bc45..d1b1e4027 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 31f5c3e81..18dff2cfa 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 9d627b363..fdf4ee396 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 58e3b5ea9..8a6f4435a 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 5d1d66cd7..bf2eeb0fb 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 2124884c7..000000000 --- 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 25ddc8814..81db4165d 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 098832428..7754e7e18 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 52a5bcc0f..2551b0736 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 2d375fdde..ffd50b762 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 7a583a39d..fffaecf70 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 6905fbb3c..d247453f1 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 804047596..2963e9b84 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 32c7b8a50..1e510ed44 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 17f183c80..cfc489a45 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 a13ae32ff..000000000 --- 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 7e5b73622..401f6a722 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 fca7c6620..285b024c6 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 652abfea1..20c6244bb 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 dcdf68325..5d974e59f 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 1d1a9c19d..0474e8605 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 19c7feb7c..461746001 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 dd4a9a355..2e4bf7d4d 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 e02a18509..bbd4a5164 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 ce1e6854a..9c4e1d74a 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 4bb2920ed..5e78b2d9d 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 a66bc816d..93e99646b 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 673987084..68f99795a 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 d5f64dde9..3c6d1a739 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 9847e9757..934092ec5 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 f56c500fc..b533c1b89 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 bc3518830..c695eae8c 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 7c5e89b87..7249e4c4a 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 11f8e3376..e208602a5 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 144e672c1..03489bad7 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 d68d59e59..97134951c 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 695ff5251..42e82a291 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 e4083ca95..485b2cae5 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 f0e836fb7..3855bd8d4 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 74f467e5e..1f995749a 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 188e2290e..bf53c7273 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 92de99a1f..b63adaa67 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 1515e3fa1..cc4a40d4a 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 7f92c1ed9..6e62bb17c 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 f13a3d037..6e09a5ec8 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 262e04dfb..4ee44bb26 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 46ffe6ded..992bb85b0 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 0b287ce29..2fd912284 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 2e8f99006..d81f628b6 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 966a87f26..2942d81ed 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 98d888a10..bdf9ea65b 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 39fba8406..132e2a5e0 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 321a9717e..ce0f40271 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 b78aa374d..9edc164a8 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 8800d926a..039ca4c3d 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 7a7a1f682..f84f4d53e 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 2a1cfb6d4..03bae523a 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 a7d7156b4..0ba0fc95c 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 37ef84fca..1c4a4c1ac 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 9b4daaccd..01bc37ad3 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 8b42500e6..a30b6c43c 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 55f155693..d05c12770 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 ea4973ee4..c2984240f 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 44406f4e3..52ba78859 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 c87abb7eb..3537717d4 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 31a700443..526360f0f 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 c3bd79110..c7ad42426 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 64a87c175..14ee8ca62 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 09f8c5e03..4f8dc5b1b 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 86b55b7c0..ba84d32e4 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 36bd8be70..a34270826 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 18440b654..ba6514168 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 6cfe1bf7b..e4393c149 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 c40abd01f..486f7fb42 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 d97b9882b..5eb5ff8b3 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 6ba0f28f9..edb1a9d79 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 2109442a7..a03d67b55 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 eafa520d4..5a18fe293 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 64d16c5b4..0440b4dff 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 fc1f50b9b..efe26e307 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 5aab6ced8..6dd441ee8 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 0a2b2f305..00ee1f22b 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 57ff9f22e..d9a346836 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 015811273..f457359c5 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 f69018422..fd81bf6e7 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 04aa80e3a..fbd016e8a 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 5254b1602..6ef57b7a7 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 3db0cf124..cc4532e7c 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 f7bb5525a..9a1043e0e 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 d7b17aea2..65bd681c2 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 b945de6ea..f5e7faca5 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 c1bc34407..984e38bcd 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 364fa53d3..c5509bd57 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 24170a14c..1b98b1086 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 de8f90410..87ca245b6 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 6f8938be9..3e40ecb85 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 ace76827c..5ba166010 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 2517b1585..b9a4c4951 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 933a4a482..31374e912 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 a4f8e6387..258346d56 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 245348709..2dc9093c1 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 0817eb24a..559edac59 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 78fda12be..abf5d7755 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 41b9a1b3e..28cd9ef69 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 55c0fcb15..3752923fa 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 f05d8c625..3d73b0668 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 e80b5778d..043b0f693 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 697fbd4c7..261715036 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 deb791b54..77699fa93 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 f3ff1bc8e..daf7aa15c 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 61fa5098f..692af322e 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 45d8a3639..7a5761aae 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 5e93a9484..98a6ba763 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 484d4bb17..e22e50435 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 1e08ae652..f41135a67 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 7c531bf7c..b4a45c74d 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 79c7a65a9..c2ff12457 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 bcb9973dc..686b49218 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 c6e123b3f..7b9257c6c 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 fa57a3e16..0ff3bfe66 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 9f4262105..7ec87bf01 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 e9e2d3396..34ee6d7f5 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 02b9063fa..3d0c17fff 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 00a036a54..b96997d1e 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 d2eed9374..af9118431 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 ef1ca4bab..3b2307518 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 f600130c1..e5b2722b6 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 283d59ee3..96a801669 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 8c5eb6dda..d5b78610d 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 3458117c4..c9f347bfb 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 00a565e20..5f35f52ae 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 23ae4d829..d446f22cf 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 925139032..0364a39ee 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 3b6b852cb..2b8d8313d 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 248823229..2c945a24c 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 20cdbae03..29274fc52 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 0df69256c..30b47a24c 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 c0b6e0987..e2c06b664 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 c1d6f7638..99464879f 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 d5451f721..6388ce037 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 1ec89f704..da28015e2 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 663d167bf..6f014a27d 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 bb8842a5b..7ee544252 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 4801cc969..84b2270eb 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 8ec9e0ddd..bd117a6d2 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 b40cf8943..b45904f3a 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 19f2f3e16..e167ce31b 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 f21e2d406..cf743b546 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 edd1186d0..d941129a8 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 dd6f50bba..5ac19ad15 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 3931d9468..d5df0788f 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 0a7adaf56..ce20830f1 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 99282d9d8..fa01cef43 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 f67e925a7..06371c04c 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 6086acadd..d9650a94a 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 a946fff56..4d55dda41 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 37ff825b0..c60705d0d 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 ea0763b09..0a43d18c1 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 996578af5..a6adf8d1d 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 a1c4d70a1..2500d587c 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 0eeda3b54..7364b06e7 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 975fb87b8..2bdeab93e 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 7ccf75200..ef154a1c1 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 f21cb498d..5a06f5a22 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 ab7d17fa9..3474ce962 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 3fe6ae04a..766b87750 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 3aab05d9a..d19d330c9 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 cc3b845da..b7a9cb177 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 467dbcbd8..67f99d157 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 7095ddb04..ae6b4accd 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 07ac108d6..a83e7ff94 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 239117245..34c358826 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 da5e816b5..6a454460e 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 3113d8b83..7f879a1e2 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 dc60afc9a..e636c893c 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 a096cdbe8..ca1aaad79 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 ec85e8ee5..b0e435ee0 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 0f3fb35d7..dc6e62917 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 1d98e4972..83ad38a6e 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 8f954e3e6..5bb969046 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 ac423b22f..8f8d6d160 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 bbe16d720..863be7424 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 cd1d2125e..79400ac85 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 71c4091b4..5aa50c263 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 80b44c0e7..fd0f42c0b 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 2b2c50c8b..77227d6ed 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 681b0baef..c457948dd 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 1c8180e88..fc9513e98 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 a598ed961..ebd1ce693 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 092d40d8a..2110977d9 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 fb087d7b2..accc28ffd 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 60263a2cd..26d1576ce 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 5f6b8f5f9..673a77bbc 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 34f942a0b..a80fedc79 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 82261965c..e8a4e342d 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 7acf20519..90063cd91 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 de3b033ec..916ee44ae 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 e62a47e41..74e4418ce 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 056459b1e..025ee92f1 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 20dd3a41f..67f25922d 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 a2005f456..af1eda192 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 57a5a9e32..49804976b 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 f779b92e9..eea443396 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 7daec55ca..15096bbd5 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 15bd60cb0..75925f52b 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 009ef151e..aef68a5eb 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 8a91a3178..4cb0b413d 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 b550cd829..e90aa3b17 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 f30954526..7bec5e3db 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 6919fb1ad..e1318d837 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 3d6c93e1a..cc82db6e8 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 2a950ff4f..9069be022 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 5d95ff7de..29ea9f82f 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 ca3f4ca79..7f350828b 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 c81c62f71..25f0849d0 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 55aed70ac..c863dd8a4 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 d857732de..7245e2d5d 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 e1f71fdc0..e21fc8b3f 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 3930dd543..7f98c20e5 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 0861f53f3..4df12cde3 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 16cc376fe..6e020b889 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 28e4c76f7..917831865 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 ecd8bdded..ac1503529 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 f5940dd7b..63720b7b4 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 c8ab5bb08..4d9134d3a 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 0fccac586..7a59718bf 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 57d47a8e9..f2faca184 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 f65c1e171..d0da8a07c 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 0708cbd00..4030d0d8d 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 24dae94b9..d414d4b14 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 8c50df2c1..bd467f92f 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/99] 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 000000000..5305e319d --- /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 000000000..38edcc787 --- /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 000000000..629f166bb --- /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 000000000..57a1b104f --- /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 000000000..e333b6df2 --- /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 000000000..79575e8f3 --- /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 000000000..a018f5f29 --- /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 000000000..bc1d2d2c3 --- /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 000000000..26652f384 --- /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 000000000..b400d5fc8 --- /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/99] 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 47546d0ed..e3bb529c4 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 bc1d2d2c3..08ed57717 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 000000000..2343a95f7 --- /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 b400d5fc8..f0226f9e0 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/99] 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 381bca2ae..f109ae3c4 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 000000000..a483edadc --- /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 000000000..a8e3ec1e0 --- /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 000000000..116921312 --- /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 000000000..57e33ad3f --- /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 000000000..c1177d636 --- /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 000000000..9b9e7d1e6 --- /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 000000000..cbffbe198 --- /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 c7d288010..983d63f11 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 3c7060260..eed894fce 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 c17acff98..e6586397a 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 a018f5f29..b97e057d7 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 000000000..a4d42d43a --- /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 08ed57717..1567a88a0 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 2343a95f7..ffc905fb7 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 000000000..5a602afcd --- /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 000000000..57e33ad3f --- /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 000000000..10037f932 --- /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 f0226f9e0..3b793623e 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 c9f347bfb..594024f3f 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 74e4418ce..e37214879 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 eea443396..0c3a32554 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/99] 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 f109ae3c4..17ee175d2 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 ffd50b762..b52e5affc 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 5d974e59f..81da64f4d 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 bbd4a5164..18a0a535d 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 1f995749a..af44f6cb8 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/99] 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 af44f6cb8..db616da24 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 ba6514168..32d2a041c 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 000000000..f919fcd58 --- /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 c5509bd57..a7acfe5c6 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/99] 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 17ee175d2..ff03d07f6 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 2c1d04d93..36de46df0 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 b52e5affc..30a8c596c 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 81da64f4d..56230db16 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 18a0a535d..22a2164ff 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 db616da24..dd8c49832 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 b63adaa67..7aa598d6a 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 32d2a041c..f2efac0ec 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 486f7fb42..2f997bb1e 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 f919fcd58..c9820b138 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 a7acfe5c6..b5d467886 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 3b793623e..f10e15c28 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/99] 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 36de46df0..f00146d58 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/99] 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 983d63f11..ed5b490c3 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/99] 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 f10e15c28..050e52be2 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/99] 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 ce0f40271..6c97ce818 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 000000000..23f1c702c --- /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 01bc37ad3..7ce356512 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 d05c12770..53b1ab3e6 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()) +} -fn parity_set_client(client: &Arc, miner: &Arc, net: &Arc) -> TestParitySetClient { - ParitySetClient::with_fetch(client, miner, &(net.clone() as Arc)) +pub type TestParitySetClient = ParitySetClient; + +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/99] 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 23f1c702c..b2d5a7e6d 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 7ce356512..ca5c9b8db 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 53b1ab3e6..a9d62d21a 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 c9820b138..fabc3a1d8 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/99] Only ignore parity.* files in root --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e3bb529c4..f31145039 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/99] 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 f00146d58..2605e41e5 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 () { + upgradeReady () { return this._transport - .execute('parity_consensusCapability'); + .execute('parity_upgradeReady'); } 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/js/src/jsonrpc/interfaces/parity.js b/js/src/jsonrpc/interfaces/parity.js index bab9ad6e3..57fa791a8 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/99] 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 000000000..e69de29bb diff --git a/js/src/modals/UpgradeParity/Info/info.js b/js/src/modals/UpgradeParity/Info/info.js new file mode 100644 index 000000000..539559710 --- /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 000000000..ff2da57b5 --- /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 000000000..75637058c --- /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 000000000..57446ead8 --- /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 000000000..41a28d666 --- /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 d3574fdc7..373772757 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 c5cd529a5..275f8999c 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/99] 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 3a20f1e43..0f7683046 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/99] 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 1e0ea8b68..2b5563f8c 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 9e8bd1524..5ce285262 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/99] 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 000000000..b9cf70ba0 --- /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 000000000..3d68a7e6b --- /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 e1ebb16a6..d7875b72b 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/99] 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 ff2da57b5..59e363f11 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 75637058c..f1bbc722a 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 000000000..523e372fa --- /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 000000000..d677aa01d --- /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 57446ead8..000000000 --- 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 41a28d666..4c4d9f1ef 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/99] Display capability status on statusbar --- .../UpgradeParity/{modalStore.js => store.js} | 65 +++++++++---- 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 | 65 ++++++------- 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, 202 insertions(+), 183 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 994e42003..461231fd7 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 closeModal = () => { + @action setUpgrading () { transaction(() => { - this.closed = true; - this.setStep(STEP_INFO); + this.upgrading = this.available; + this.setStep(STEP_UPDATING); }); } + @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); + }); + } + @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 c1ba9d395..7f13d87ea 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 8ac2f24b0..000000000 --- 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 275f8999c..421483e54 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 8721bc4c2..4eeb4b918 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; + + &.live { + background: rgb(0, 136, 0); + } + + &.test { + background: rgb(136, 0, 0); + } } -.networklive { - background: rgb(0, 136, 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 8d7724838..1aded4b88 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) { + if (upgradeStore.consensusCapability === 'capable') { + return ( +
+ +
+ ); + } else if (upgradeStore.consensusCapability.capableUntil) { + return ( +
+ +
+ ); + } else if (upgradeStore.consensusCapability.incapableSince) { + return ( +
+ +
+ ); + } + + return ( +
+ +
+ ); + } + + renderUpgradeButton () { + const { upgradeStore } = this.props; + + if (!upgradeStore.available) { return null; } - const [protocol, rest] = enode.split('://'); - const [id, host] = rest.split('@'); - const abbreviated = `${protocol}://${id.slice(0, 3)}…${id.slice(-3)}@${host}`; - 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 e6f97f105..9d957d6c9 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 c536f10df..49d299661 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/99] 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 461231fd7..466a588e6 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 000000000..1e0111284 --- /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 962bbc58c..bca0fe47d 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 7f13d87ea..3e67c42f2 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 14308ee0b..920d1b13c 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 f72c3ffb1..0b56692a8 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/99] 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 def1c0466..81eb9f7b2 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 9028c4801..e8f4624b7 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8 +Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be From c6912c8e0a48a01bce08c96658921f20be9cb7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Thu, 15 Dec 2016 11:38:05 +0100 Subject: [PATCH 70/99] Removing on_done --- dapps/src/apps/fetcher.rs | 169 ++++++++++++++++++------------------ dapps/src/handlers/fetch.rs | 18 +--- 2 files changed, 90 insertions(+), 97 deletions(-) diff --git a/dapps/src/apps/fetcher.rs b/dapps/src/apps/fetcher.rs index 2430af035..e1fa4c066 100644 --- a/dapps/src/apps/fetcher.rs +++ b/dapps/src/apps/fetcher.rs @@ -120,7 +120,7 @@ impl<R: URLHint> ContentFetcher<R> { // Content is already being fetched Some(&mut ContentStatus::Fetching(ref fetch_control)) => { trace!(target: "dapps", "Content fetching in progress. Waiting..."); - (None, fetch_control.to_handler(control)) + (None, fetch_control.to_async_handler(path, control)) }, // We need to start fetching the content None => { @@ -129,11 +129,12 @@ impl<R: URLHint> ContentFetcher<R> { let content = self.resolver.resolve(content_hex); let cache = self.cache.clone(); - let on_done = move |id: String, result: Option<LocalPageEndpoint>| { + let id = content_id.clone(); + let on_done = move |result: Option<LocalPageEndpoint>| { let mut cache = cache.lock(); match result { Some(endpoint) => { - cache.insert(id, ContentStatus::Ready(endpoint)); + cache.insert(id.clone(), ContentStatus::Ready(endpoint)); }, // In case of error None => { @@ -248,43 +249,45 @@ struct ContentInstaller { id: String, mime: String, content_path: PathBuf, - on_done: Box<Fn(String, Option<LocalPageEndpoint>) + Send>, + on_done: Box<Fn(Option<LocalPageEndpoint>) + Send>, } impl ContentValidator for ContentInstaller { type Error = ValidationError; fn validate_and_install(&self, path: PathBuf) -> Result<(String, LocalPageEndpoint), ValidationError> { - // Create dir - try!(fs::create_dir_all(&self.content_path)); + let validate = || { + // Create dir + try!(fs::create_dir_all(&self.content_path)); - // Validate hash - let mut file_reader = io::BufReader::new(try!(fs::File::open(&path))); - let hash = try!(sha3(&mut file_reader)); - let id = try!(self.id.as_str().parse().map_err(|_| ValidationError::InvalidContentId)); - if id != hash { - return Err(ValidationError::HashMismatch { - expected: id, - got: hash, - }); - } + // Validate hash + let mut file_reader = io::BufReader::new(try!(fs::File::open(&path))); + let hash = try!(sha3(&mut file_reader)); + let id = try!(self.id.as_str().parse().map_err(|_| ValidationError::InvalidContentId)); + if id != hash { + return Err(ValidationError::HashMismatch { + expected: id, + got: hash, + }); + } - // And prepare path for a file - let filename = path.file_name().expect("We always fetch a file."); - let mut content_path = self.content_path.clone(); - content_path.push(&filename); + // And prepare path for a file + let filename = path.file_name().expect("We always fetch a file."); + let mut content_path = self.content_path.clone(); + content_path.push(&filename); - if content_path.exists() { - try!(fs::remove_dir_all(&content_path)) - } + if content_path.exists() { + try!(fs::remove_dir_all(&content_path)) + } - try!(fs::copy(&path, &content_path)); + try!(fs::copy(&path, &content_path)); + Ok(LocalPageEndpoint::single_file(content_path, self.mime.clone(), PageCache::Enabled)) + }; - Ok((self.id.clone(), LocalPageEndpoint::single_file(content_path, self.mime.clone(), PageCache::Enabled))) - } - - fn done(&self, endpoint: Option<LocalPageEndpoint>) { - (self.on_done)(self.id.clone(), endpoint) + // Make sure to always call on_done (even in case of errors)! + let result = validate(); + (self.on_done)(result.as_ref().ok().cloned()); + result.map(|endpoint| (self.id.clone(), endpoint)) } } @@ -292,7 +295,7 @@ impl ContentValidator for ContentInstaller { struct DappInstaller { id: String, dapps_path: PathBuf, - on_done: Box<Fn(String, Option<LocalPageEndpoint>) + Send>, + on_done: Box<Fn(Option<LocalPageEndpoint>) + Send>, embeddable_on: Option<(String, u16)>, } @@ -333,67 +336,67 @@ impl ContentValidator for DappInstaller { fn validate_and_install(&self, app_path: PathBuf) -> Result<(String, LocalPageEndpoint), ValidationError> { trace!(target: "dapps", "Opening dapp bundle at {:?}", app_path); - let mut file_reader = io::BufReader::new(try!(fs::File::open(app_path))); - let hash = try!(sha3(&mut file_reader)); - let id = try!(self.id.as_str().parse().map_err(|_| ValidationError::InvalidContentId)); - if id != hash { - return Err(ValidationError::HashMismatch { - expected: id, - got: hash, - }); - } - let file = file_reader.into_inner(); - // Unpack archive - let mut zip = try!(zip::ZipArchive::new(file)); - // First find manifest file - let (mut manifest, manifest_dir) = try!(Self::find_manifest(&mut zip)); - // Overwrite id to match hash - manifest.id = self.id.clone(); + let validate = || { + let mut file_reader = io::BufReader::new(try!(fs::File::open(app_path))); + let hash = try!(sha3(&mut file_reader)); + let id = try!(self.id.as_str().parse().map_err(|_| ValidationError::InvalidContentId)); + if id != hash { + return Err(ValidationError::HashMismatch { + expected: id, + got: hash, + }); + } + let file = file_reader.into_inner(); + // Unpack archive + let mut zip = try!(zip::ZipArchive::new(file)); + // First find manifest file + let (mut manifest, manifest_dir) = try!(Self::find_manifest(&mut zip)); + // Overwrite id to match hash + manifest.id = self.id.clone(); - let target = self.dapp_target_path(&manifest); + let target = self.dapp_target_path(&manifest); - // Remove old directory - if target.exists() { - warn!(target: "dapps", "Overwriting existing dapp: {}", manifest.id); - try!(fs::remove_dir_all(target.clone())); - } + // Remove old directory + if target.exists() { + warn!(target: "dapps", "Overwriting existing dapp: {}", manifest.id); + try!(fs::remove_dir_all(target.clone())); + } - // Unpack zip - for i in 0..zip.len() { - let mut file = try!(zip.by_index(i)); - // TODO [todr] Check if it's consistent on windows. - let is_dir = file.name().chars().rev().next() == Some('/'); + // Unpack zip + for i in 0..zip.len() { + let mut file = try!(zip.by_index(i)); + // TODO [todr] Check if it's consistent on windows. + let is_dir = file.name().chars().rev().next() == Some('/'); - let file_path = PathBuf::from(file.name()); - let location_in_manifest_base = file_path.strip_prefix(&manifest_dir); - // Create files that are inside manifest directory - if let Ok(location_in_manifest_base) = location_in_manifest_base { - let p = target.join(location_in_manifest_base); - // Check if it's a directory - if is_dir { - try!(fs::create_dir_all(p)); - } else { - let mut target = try!(fs::File::create(p)); - try!(io::copy(&mut file, &mut target)); + let file_path = PathBuf::from(file.name()); + let location_in_manifest_base = file_path.strip_prefix(&manifest_dir); + // Create files that are inside manifest directory + if let Ok(location_in_manifest_base) = location_in_manifest_base { + let p = target.join(location_in_manifest_base); + // Check if it's a directory + if is_dir { + try!(fs::create_dir_all(p)); + } else { + let mut target = try!(fs::File::create(p)); + try!(io::copy(&mut file, &mut target)); + } } } - } - // Write manifest - let manifest_str = try!(serialize_manifest(&manifest).map_err(ValidationError::ManifestSerialization)); - let manifest_path = target.join(MANIFEST_FILENAME); - let mut manifest_file = try!(fs::File::create(manifest_path)); - try!(manifest_file.write_all(manifest_str.as_bytes())); + // Write manifest + let manifest_str = try!(serialize_manifest(&manifest).map_err(ValidationError::ManifestSerialization)); + let manifest_path = target.join(MANIFEST_FILENAME); + let mut manifest_file = try!(fs::File::create(manifest_path)); + try!(manifest_file.write_all(manifest_str.as_bytes())); + // Create endpoint + let endpoint = LocalPageEndpoint::new(target, manifest.clone().into(), PageCache::Enabled, self.embeddable_on.clone()); + // Return modified app manifest + Ok(endpoint) + }; - // Create endpoint - let app = LocalPageEndpoint::new(target, manifest.clone().into(), PageCache::Enabled, self.embeddable_on.clone()); - - // Return modified app manifest - Ok((manifest.id.clone(), app)) - } - - fn done(&self, endpoint: Option<LocalPageEndpoint>) { - (self.on_done)(self.id.clone(), endpoint) + let result = validate(); + (self.on_done)(result.as_ref().ok().cloned()); + result.map(|endpoint| (self.id.clone(), endpoint)) } } diff --git a/dapps/src/handlers/fetch.rs b/dapps/src/handlers/fetch.rs index 6fb524293..8e5f250ce 100644 --- a/dapps/src/handlers/fetch.rs +++ b/dapps/src/handlers/fetch.rs @@ -29,6 +29,7 @@ use hyper::{server, Decoder, Encoder, Next, Method, Control}; use hyper::net::HttpStream; use hyper::status::StatusCode; +use endpoint::EndpointPath; use handlers::{ContentHandler, Redirection, extract_url}; use page::LocalPageEndpoint; @@ -45,7 +46,6 @@ pub trait ContentValidator { type Error: fmt::Debug + fmt::Display; fn validate_and_install(&self, app: PathBuf) -> Result<(String, LocalPageEndpoint), Self::Error>; - fn done(&self, Option<LocalPageEndpoint>); } pub struct FetchControl { @@ -88,7 +88,9 @@ impl FetchControl { self.abort.store(true, Ordering::SeqCst); } - pub fn to_handler(&self, control: Control) -> Box<server::Handler<HttpStream> + Send> { + pub fn to_async_handler(&self, path: EndpointPath, control: Control) -> Box<server::Handler<HttpStream> + Send> { + // TODO [ToDr] We should be able to pass EndpointPath to handler as well + // (request may be coming from different domain, etc) let (tx, rx) = mpsc::channel(); self.listeners.lock().push((control, tx)); @@ -141,25 +143,13 @@ pub struct ContentFetcherHandler<H: ContentValidator> { embeddable_on: Option<(String, u16)>, } -impl<H: ContentValidator> Drop for ContentFetcherHandler<H> { - fn drop(&mut self) { - let result = match self.status { - FetchState::Done(_, ref result, _) => Some(result.clone()), - _ => None, - }; - self.installer.done(result); - } -} - impl<H: ContentValidator> ContentFetcherHandler<H> { - pub fn new( url: String, control: Control, handler: H, embeddable_on: Option<(String, u16)>, ) -> (Self, Arc<FetchControl>) { - let fetch_control = Arc::new(FetchControl::default()); let client = Client::default(); let handler = ContentFetcherHandler { From dedf9d6dcee2acd694723073c6ddd6f8355e4eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Thu, 15 Dec 2016 14:46:10 +0100 Subject: [PATCH 71/99] Getting rid of redirection --- dapps/src/apps/fetcher.rs | 15 +++--- dapps/src/handlers/fetch.rs | 99 ++++++++++++++++++++++++------------- dapps/src/page/handler.rs | 33 +++++++++---- dapps/src/page/local.rs | 50 ++++++++++++------- dapps/src/page/mod.rs | 2 +- 5 files changed, 129 insertions(+), 70 deletions(-) diff --git a/dapps/src/apps/fetcher.rs b/dapps/src/apps/fetcher.rs index e1fa4c066..006858e73 100644 --- a/dapps/src/apps/fetcher.rs +++ b/dapps/src/apps/fetcher.rs @@ -151,6 +151,7 @@ impl<R: URLHint> ContentFetcher<R> { Some(URLHintResult::Dapp(dapp)) => { let (handler, fetch_control) = ContentFetcherHandler::new( dapp.url(), + path, control, DappInstaller { id: content_id.clone(), @@ -166,6 +167,7 @@ impl<R: URLHint> ContentFetcher<R> { Some(URLHintResult::Content(content)) => { let (handler, fetch_control) = ContentFetcherHandler::new( content.url, + path, control, ContentInstaller { id: content_id.clone(), @@ -255,7 +257,7 @@ struct ContentInstaller { impl ContentValidator for ContentInstaller { type Error = ValidationError; - fn validate_and_install(&self, path: PathBuf) -> Result<(String, LocalPageEndpoint), ValidationError> { + fn validate_and_install(&self, path: PathBuf) -> Result<LocalPageEndpoint, ValidationError> { let validate = || { // Create dir try!(fs::create_dir_all(&self.content_path)); @@ -287,7 +289,7 @@ impl ContentValidator for ContentInstaller { // Make sure to always call on_done (even in case of errors)! let result = validate(); (self.on_done)(result.as_ref().ok().cloned()); - result.map(|endpoint| (self.id.clone(), endpoint)) + result } } @@ -334,10 +336,10 @@ impl DappInstaller { impl ContentValidator for DappInstaller { type Error = ValidationError; - fn validate_and_install(&self, app_path: PathBuf) -> Result<(String, LocalPageEndpoint), ValidationError> { - trace!(target: "dapps", "Opening dapp bundle at {:?}", app_path); + fn validate_and_install(&self, path: PathBuf) -> Result<LocalPageEndpoint, ValidationError> { + trace!(target: "dapps", "Opening dapp bundle at {:?}", path); let validate = || { - let mut file_reader = io::BufReader::new(try!(fs::File::open(app_path))); + let mut file_reader = io::BufReader::new(try!(fs::File::open(path))); let hash = try!(sha3(&mut file_reader)); let id = try!(self.id.as_str().parse().map_err(|_| ValidationError::InvalidContentId)); if id != hash { @@ -390,13 +392,12 @@ impl ContentValidator for DappInstaller { try!(manifest_file.write_all(manifest_str.as_bytes())); // Create endpoint let endpoint = LocalPageEndpoint::new(target, manifest.clone().into(), PageCache::Enabled, self.embeddable_on.clone()); - // Return modified app manifest Ok(endpoint) }; let result = validate(); (self.on_done)(result.as_ref().ok().cloned()); - result.map(|endpoint| (self.id.clone(), endpoint)) + result } } diff --git a/dapps/src/handlers/fetch.rs b/dapps/src/handlers/fetch.rs index 8e5f250ce..d62b425d9 100644 --- a/dapps/src/handlers/fetch.rs +++ b/dapps/src/handlers/fetch.rs @@ -22,35 +22,41 @@ use std::sync::{mpsc, Arc}; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::{Instant, Duration}; use util::Mutex; -use url::Url; use fetch::{Client, Fetch, FetchResult}; use hyper::{server, Decoder, Encoder, Next, Method, Control}; use hyper::net::HttpStream; +use hyper::uri::RequestUri; use hyper::status::StatusCode; use endpoint::EndpointPath; -use handlers::{ContentHandler, Redirection, extract_url}; -use page::LocalPageEndpoint; +use handlers::ContentHandler; +use page::{LocalPageEndpoint, PageHandlerWaiting}; const FETCH_TIMEOUT: u64 = 30; enum FetchState { + Waiting, NotStarted(String), Error(ContentHandler), InProgress(mpsc::Receiver<FetchResult>), - Done(String, LocalPageEndpoint, Redirection), + Done(LocalPageEndpoint, Box<PageHandlerWaiting>), +} + +enum WaitResult { + Error(ContentHandler), + Done(LocalPageEndpoint), } pub trait ContentValidator { type Error: fmt::Debug + fmt::Display; - fn validate_and_install(&self, app: PathBuf) -> Result<(String, LocalPageEndpoint), Self::Error>; + fn validate_and_install(&self, path: PathBuf) -> Result<LocalPageEndpoint, Self::Error>; } pub struct FetchControl { abort: Arc<AtomicBool>, - listeners: Mutex<Vec<(Control, mpsc::Sender<FetchState>)>>, + listeners: Mutex<Vec<(Control, mpsc::Sender<WaitResult>)>>, deadline: Instant, } @@ -65,9 +71,10 @@ impl Default for FetchControl { } impl FetchControl { - fn notify<F: Fn() -> FetchState>(&self, status: F) { + fn notify<F: Fn() -> WaitResult>(&self, status: F) { let mut listeners = self.listeners.lock(); for (control, sender) in listeners.drain(..) { + trace!(target: "dapps", "Resuming request waiting for content..."); if let Err(e) = sender.send(status()) { trace!(target: "dapps", "Waiting listener notification failed: {:?}", e); } else { @@ -78,9 +85,9 @@ impl FetchControl { fn set_status(&self, status: &FetchState) { match *status { - FetchState::Error(ref handler) => self.notify(|| FetchState::Error(handler.clone())), - FetchState::Done(ref id, ref endpoint, ref handler) => self.notify(|| FetchState::Done(id.clone(), endpoint.clone(), handler.clone())), - FetchState::NotStarted(_) | FetchState::InProgress(_) => {}, + FetchState::Error(ref handler) => self.notify(|| WaitResult::Error(handler.clone())), + FetchState::Done(ref endpoint, _) => self.notify(|| WaitResult::Done(endpoint.clone())), + FetchState::NotStarted(_) | FetchState::InProgress(_) | FetchState::Waiting => {}, } } @@ -89,45 +96,65 @@ impl FetchControl { } pub fn to_async_handler(&self, path: EndpointPath, control: Control) -> Box<server::Handler<HttpStream> + Send> { - // TODO [ToDr] We should be able to pass EndpointPath to handler as well - // (request may be coming from different domain, etc) let (tx, rx) = mpsc::channel(); self.listeners.lock().push((control, tx)); Box::new(WaitingHandler { receiver: rx, - state: None, + state: FetchState::Waiting, + uri: RequestUri::default(), + path: path, }) } } pub struct WaitingHandler { - receiver: mpsc::Receiver<FetchState>, - state: Option<FetchState>, + receiver: mpsc::Receiver<WaitResult>, + state: FetchState, + uri: RequestUri, + path: EndpointPath, } impl server::Handler<HttpStream> for WaitingHandler { - fn on_request(&mut self, _request: server::Request<HttpStream>) -> Next { + fn on_request(&mut self, request: server::Request<HttpStream>) -> Next { + self.uri = request.uri().clone(); Next::wait() } - fn on_request_readable(&mut self, _decoder: &mut Decoder<HttpStream>) -> Next { - self.state = self.receiver.try_recv().ok(); - Next::write() + fn on_request_readable(&mut self, decoder: &mut Decoder<HttpStream>) -> Next { + let result = self.receiver.try_recv().ok(); + self.state = match result { + Some(WaitResult::Error(handler)) => FetchState::Error(handler), + Some(WaitResult::Done(endpoint)) => { + let mut page_handler = endpoint.to_page_handler(self.path.clone()); + page_handler.set_uri(&self.uri); + FetchState::Done(endpoint, page_handler) + }, + None => { + warn!("A result for waiting request was not received."); + FetchState::Waiting + }, + }; + + match self.state { + FetchState::Done(_, ref mut handler) => handler.on_request_readable(decoder), + FetchState::Error(ref mut handler) => handler.on_request_readable(decoder), + _ => Next::write(), + } } fn on_response(&mut self, res: &mut server::Response) -> Next { match self.state { - Some(FetchState::Done(_, _, ref mut handler)) => handler.on_response(res), - Some(FetchState::Error(ref mut handler)) => handler.on_response(res), + FetchState::Done(_, ref mut handler) => handler.on_response(res), + FetchState::Error(ref mut handler) => handler.on_response(res), _ => Next::end(), } } fn on_response_writable(&mut self, encoder: &mut Encoder<HttpStream>) -> Next { match self.state { - Some(FetchState::Done(_, _, ref mut handler)) => handler.on_response_writable(encoder), - Some(FetchState::Error(ref mut handler)) => handler.on_response_writable(encoder), + FetchState::Done(_, ref mut handler) => handler.on_response_writable(encoder), + FetchState::Error(ref mut handler) => handler.on_response_writable(encoder), _ => Next::end(), } } @@ -139,13 +166,15 @@ pub struct ContentFetcherHandler<H: ContentValidator> { status: FetchState, client: Option<Client>, installer: H, - request_url: Option<Url>, + path: EndpointPath, + uri: RequestUri, embeddable_on: Option<(String, u16)>, } impl<H: ContentValidator> ContentFetcherHandler<H> { pub fn new( url: String, + path: EndpointPath, control: Control, handler: H, embeddable_on: Option<(String, u16)>, @@ -158,7 +187,8 @@ impl<H: ContentValidator> ContentFetcherHandler<H> { client: Some(client), status: FetchState::NotStarted(url), installer: handler, - request_url: None, + path: path, + uri: RequestUri::default(), embeddable_on: embeddable_on, }; @@ -182,7 +212,6 @@ impl<H: ContentValidator> ContentFetcherHandler<H> { impl<H: ContentValidator> server::Handler<HttpStream> for ContentFetcherHandler<H> { fn on_request(&mut self, request: server::Request<HttpStream>) -> Next { - self.request_url = extract_url(&request); let status = if let FetchState::NotStarted(ref url) = self.status { Some(match *request.method() { // Start fetching content @@ -195,8 +224,8 @@ impl<H: ContentValidator> server::Handler<HttpStream> for ContentFetcherHandler< Ok(receiver) => FetchState::InProgress(receiver), Err(e) => FetchState::Error(ContentHandler::error( StatusCode::BadGateway, - "Unable To Start Dapp Download", - "Could not initialize download of the dapp. It might be a problem with the remote server.", + "Unable To Start Content Download", + "Could not initialize download of the content. It might be a problem with the remote server.", Some(&format!("{}", e)), self.embeddable_on.clone(), )), @@ -217,6 +246,7 @@ impl<H: ContentValidator> server::Handler<HttpStream> for ContentFetcherHandler< self.fetch_control.set_status(&status); self.status = status; } + self.uri = request.uri().clone(); Next::read() } @@ -256,11 +286,10 @@ impl<H: ContentValidator> server::Handler<HttpStream> for ContentFetcherHandler< self.embeddable_on.clone(), )) }, - Ok((id, result)) => { - let url: String = self.request_url.take() - .map(|url| url.raw.into_string()) - .expect("Request URL always read in on_request; qed"); - FetchState::Done(id, result, Redirection::new(&url)) + Ok(endpoint) => { + let mut handler = endpoint.to_page_handler(self.path.clone()); + handler.set_uri(&self.uri); + FetchState::Done(endpoint, handler) }, }; // Remove temporary zip file @@ -296,7 +325,7 @@ impl<H: ContentValidator> server::Handler<HttpStream> for ContentFetcherHandler< fn on_response(&mut self, res: &mut server::Response) -> Next { match self.status { - FetchState::Done(_, _, ref mut handler) => handler.on_response(res), + FetchState::Done(_, ref mut handler) => handler.on_response(res), FetchState::Error(ref mut handler) => handler.on_response(res), _ => Next::end(), } @@ -304,7 +333,7 @@ impl<H: ContentValidator> server::Handler<HttpStream> for ContentFetcherHandler< fn on_response_writable(&mut self, encoder: &mut Encoder<HttpStream>) -> Next { match self.status { - FetchState::Done(_, _, ref mut handler) => handler.on_response_writable(encoder), + FetchState::Done(_, ref mut handler) => handler.on_response_writable(encoder), FetchState::Error(ref mut handler) => handler.on_response_writable(encoder), _ => Next::end(), } diff --git a/dapps/src/page/handler.rs b/dapps/src/page/handler.rs index 382dfa5d1..ba7a7ee04 100644 --- a/dapps/src/page/handler.rs +++ b/dapps/src/page/handler.rs @@ -83,13 +83,19 @@ impl Default for PageCache { } } +/// A generic type for `PageHandler` allowing to set the URL. +/// Used by dapps fetching to set the URL after the content was downloaded. +pub trait PageHandlerWaiting: server::Handler<HttpStream> + Send { + fn set_uri(&mut self, uri: &RequestUri); +} + /// A handler for a single webapp. /// Resolves correct paths and serves as a plumbing code between /// hyper server and dapp. pub struct PageHandler<T: Dapp> { /// A Dapp. pub app: T, - /// File currently being served (or `None` if file does not exist). + /// File currently being served pub file: ServedFile<T>, /// Optional prefix to strip from path. pub prefix: Option<String>, @@ -101,6 +107,21 @@ pub struct PageHandler<T: Dapp> { pub cache: PageCache, } +impl<T: Dapp> PageHandlerWaiting for PageHandler<T> { + fn set_uri(&mut self, uri: &RequestUri) { + trace!(target: "dapps", "Setting URI: {:?}", uri); + self.file = match *uri { + RequestUri::AbsolutePath { ref path, .. } => { + self.app.file(&self.extract_path(path)) + }, + RequestUri::AbsoluteUri(ref url) => { + self.app.file(&self.extract_path(url.path())) + }, + _ => None, + }.map_or_else(|| ServedFile::new(self.safe_to_embed_on.clone()), |f| ServedFile::File(f)); + } +} + impl<T: Dapp> PageHandler<T> { fn extract_path(&self, path: &str) -> String { let app_id = &self.path.app_id; @@ -124,15 +145,7 @@ impl<T: Dapp> PageHandler<T> { impl<T: Dapp> server::Handler<HttpStream> for PageHandler<T> { fn on_request(&mut self, req: server::Request<HttpStream>) -> Next { - self.file = match *req.uri() { - RequestUri::AbsolutePath { ref path, .. } => { - self.app.file(&self.extract_path(path)) - }, - RequestUri::AbsoluteUri(ref url) => { - self.app.file(&self.extract_path(url.path())) - }, - _ => None, - }.map_or_else(|| ServedFile::new(self.safe_to_embed_on.clone()), |f| ServedFile::File(f)); + self.set_uri(req.uri()); Next::write() } diff --git a/dapps/src/page/local.rs b/dapps/src/page/local.rs index 77c91019d..e8ab9ce14 100644 --- a/dapps/src/page/local.rs +++ b/dapps/src/page/local.rs @@ -18,7 +18,7 @@ use mime_guess; use std::io::{Seek, Read, SeekFrom}; use std::fs; use std::path::{Path, PathBuf}; -use page::handler::{self, PageCache}; +use page::handler::{self, PageCache, PageHandlerWaiting}; use endpoint::{Endpoint, EndpointInfo, EndpointPath, Handler}; #[derive(Debug, Clone)] @@ -54,6 +54,36 @@ impl LocalPageEndpoint { pub fn path(&self) -> PathBuf { self.path.clone() } + + fn page_handler_with_mime(&self, path: EndpointPath, mime: &str) -> handler::PageHandler<LocalSingleFile> { + handler::PageHandler { + app: LocalSingleFile { path: self.path.clone(), mime: mime.into() }, + prefix: None, + path: path, + file: handler::ServedFile::new(None), + safe_to_embed_on: self.embeddable_on.clone(), + cache: self.cache, + } + } + + fn page_handler(&self, path: EndpointPath) -> handler::PageHandler<LocalDapp> { + handler::PageHandler { + app: LocalDapp { path: self.path.clone() }, + prefix: None, + path: path, + file: handler::ServedFile::new(None), + safe_to_embed_on: self.embeddable_on.clone(), + cache: self.cache, + } + } + + pub fn to_page_handler(&self, path: EndpointPath) -> Box<PageHandlerWaiting> { + if let Some(ref mime) = self.mime { + Box::new(self.page_handler_with_mime(path, mime)) + } else { + Box::new(self.page_handler(path)) + } + } } impl Endpoint for LocalPageEndpoint { @@ -63,23 +93,9 @@ impl Endpoint for LocalPageEndpoint { fn to_handler(&self, path: EndpointPath) -> Box<Handler> { if let Some(ref mime) = self.mime { - Box::new(handler::PageHandler { - app: LocalSingleFile { path: self.path.clone(), mime: mime.clone() }, - prefix: None, - path: path, - file: handler::ServedFile::new(None), - safe_to_embed_on: self.embeddable_on.clone(), - cache: self.cache, - }) + Box::new(self.page_handler_with_mime(path, mime)) } else { - Box::new(handler::PageHandler { - app: LocalDapp { path: self.path.clone() }, - prefix: None, - path: path, - file: handler::ServedFile::new(None), - safe_to_embed_on: self.embeddable_on.clone(), - cache: self.cache, - }) + Box::new(self.page_handler(path)) } } } diff --git a/dapps/src/page/mod.rs b/dapps/src/page/mod.rs index 9619f1b10..5c2b008f8 100644 --- a/dapps/src/page/mod.rs +++ b/dapps/src/page/mod.rs @@ -21,5 +21,5 @@ mod handler; pub use self::local::LocalPageEndpoint; pub use self::builtin::PageEndpoint; -pub use self::handler::PageCache; +pub use self::handler::{PageCache, PageHandlerWaiting}; 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 72/99] 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 75637f139..aed62873d 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 73/99] 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 466a588e6..d7a4efd3e 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 3e67c42f2..a11e1a1fe 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 920d1b13c..27197be28 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 2be6223eb32ab941e09ba82105cbcafd01718c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= <tomasz@ethcore.io> Date: Thu, 15 Dec 2016 15:57:21 +0100 Subject: [PATCH 74/99] Updating submodules to latest --- ethcore/res/ethereum/tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/res/ethereum/tests b/ethcore/res/ethereum/tests index 9028c4801..e8f4624b7 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8 +Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be From 0e963da27b3389d1d3b27d5daf47cefb4cb1a584 Mon Sep 17 00:00:00 2001 From: Jannis R <mail@jannisr.de> Date: Thu, 15 Dec 2016 18:09:52 +0100 Subject: [PATCH 75/99] fix verification stores :bug: --- js/src/modals/Verification/email-store.js | 2 +- js/src/modals/Verification/sms-store.js | 2 +- js/src/modals/Verification/store.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/modals/Verification/email-store.js b/js/src/modals/Verification/email-store.js index 3d7faa9e1..7855732c7 100644 --- a/js/src/modals/Verification/email-store.js +++ b/js/src/modals/Verification/email-store.js @@ -54,7 +54,7 @@ export default class EmailVerificationStore extends VerificationStore { } constructor (api, account, isTestnet) { - super(api, EmailVerificationABI, 'emailverification3', account, isTestnet); + super(api, EmailVerificationABI, 4, account, isTestnet); } requestValues = () => [ sha3(this.email) ] diff --git a/js/src/modals/Verification/sms-store.js b/js/src/modals/Verification/sms-store.js index 44c5aa39c..84a445452 100644 --- a/js/src/modals/Verification/sms-store.js +++ b/js/src/modals/Verification/sms-store.js @@ -53,7 +53,7 @@ export default class SMSVerificationStore extends VerificationStore { } constructor (api, account, isTestnet) { - super(api, SMSVerificationABI, 'smsverification', account, isTestnet); + super(api, SMSVerificationABI, 0, account, isTestnet); } @action setNumber = (number) => { diff --git a/js/src/modals/Verification/store.js b/js/src/modals/Verification/store.js index dcbfbf698..692fc58a3 100644 --- a/js/src/modals/Verification/store.js +++ b/js/src/modals/Verification/store.js @@ -46,13 +46,13 @@ export default class VerificationStore { @observable isCodeValid = null; @observable confirmationTx = null; - constructor (api, abi, name, account, isTestnet) { + constructor (api, abi, certifierId, account, isTestnet) { this.api = api; this.account = account; this.isTestnet = isTestnet; this.step = LOADING; - Contracts.get().badgeReg.fetchCertifier(name) + Contracts.get().badgeReg.fetchCertifier(certifierId) .then(({ address }) => { this.contract = new Contract(api, abi).at(address); this.load(); 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 76/99] 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 83b7e78dc..7ad67559f 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 8c621b387..632d8d2a7 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 77/99] 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 7ad67559f..847e36134 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 9b9e7d1e6..3fcc0bb64 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 2f420e0a7..ed204e0f3 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 91f407e1e..3ae20be03 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 e05d94751..b2f033bfc 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 4019c4ec3..577f8a6c9 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 fabc3a1d8..f420d426e 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 aed62873d..736d7e8a8 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 78/99] Fix tests. --- parity/configuration.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index 577f8a6c9..cb8b58f2a 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 79/99] 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 cb8b58f2a..57be84dca 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 80/99] --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 ed204e0f3..60571b461 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 3ae20be03..1b86faadc 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 b2f033bfc..baf898ad8 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 57be84dca..9f9cf654e 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 b88d50dc9b44ab705599b21dc27b41e27337700d Mon Sep 17 00:00:00 2001 From: keorn <pczaban@gmail.com> Date: Thu, 15 Dec 2016 19:27:06 +0100 Subject: [PATCH 81/99] fix naming collision --- ethcore/src/engines/authority_round.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 8d1c004c5..cf9325dd4 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -118,13 +118,9 @@ impl AuthorityRound { Ok(engine) } - fn step(&self) -> usize { - self.step.load(AtomicOrdering::SeqCst) - } - fn remaining_step_duration(&self) -> Duration { let now = unix_now(); - let step_end = self.our_params.step_duration * (self.step() as u32 + 1); + let step_end = self.our_params.step_duration * (self.step.load(AtomicOrdering::SeqCst) as u32 + 1); if step_end > now { step_end - now } else { @@ -228,7 +224,7 @@ impl Engine for AuthorityRound { fn generate_seal(&self, block: &ExecutedBlock) -> Seal { if self.proposed.load(AtomicOrdering::SeqCst) { return Seal::None; } let header = block.header(); - let step = self.step(); + let step = self.step.load(AtomicOrdering::SeqCst); if self.is_step_proposer(step, header.author()) { if let Some(ref ap) = *self.account_provider.lock() { // Account should be permanently unlocked, otherwise sealing will fail. @@ -265,7 +261,7 @@ impl Engine for AuthorityRound { fn verify_block_unordered(&self, header: &Header, _block: Option<&[u8]>) -> Result<(), Error> { let header_step = try!(header_step(header)); // Give one step slack if step is lagging, double vote is still not possible. - if header_step <= self.step() + 1 { + if header_step <= self.step.load(AtomicOrdering::SeqCst) + 1 { let proposer_signature = try!(header_signature(header)); let ok_sig = try!(verify_address(self.step_proposer(header_step), &proposer_signature, &header.bare_hash())); if ok_sig { 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 82/99] 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 9f9cf654e..c46dc5e6b 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 f9c2f30c9..05515fc82 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 cd6dc8a17..1fb290f4b 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 736d7e8a8..8f4977fc2 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 b7b531ca75111ee0b02afd9ab3308bb599b9041f Mon Sep 17 00:00:00 2001 From: keorn <pczaban@gmail.com> Date: Thu, 15 Dec 2016 19:54:28 +0100 Subject: [PATCH 83/99] more slack in test --- ethcore/src/engines/authority_round.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index cf9325dd4..4e7d564fe 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -462,7 +462,7 @@ mod tests { // Spec starts with step 2. header.set_seal(vec![encode(&1usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); assert!(engine.verify_block_seal(&header).is_ok()); - header.set_seal(vec![encode(&5usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); + header.set_seal(vec![encode(&11usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); assert!(engine.verify_block_seal(&header).is_err()); } } From d2962fe47b52777a42f4d48967b3cfaa9e451b20 Mon Sep 17 00:00:00 2001 From: Jannis R <mail@jannisr.de> Date: Thu, 15 Dec 2016 20:45:49 +0100 Subject: [PATCH 84/99] store certifier index in constant --- js/src/modals/Verification/email-store.js | 4 +++- js/src/modals/Verification/sms-store.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/src/modals/Verification/email-store.js b/js/src/modals/Verification/email-store.js index 7855732c7..a86f9e4b1 100644 --- a/js/src/modals/Verification/email-store.js +++ b/js/src/modals/Verification/email-store.js @@ -23,6 +23,8 @@ import VerificationStore, { } from './store'; import { postToServer } from '../../3rdparty/email-verification'; +const EMAIL_VERIFICATION = 4; // id in the `BadgeReg.sol` contract + export default class EmailVerificationStore extends VerificationStore { @observable email = ''; @@ -54,7 +56,7 @@ export default class EmailVerificationStore extends VerificationStore { } constructor (api, account, isTestnet) { - super(api, EmailVerificationABI, 4, account, isTestnet); + super(api, EmailVerificationABI, EMAIL_VERIFICATION, account, isTestnet); } requestValues = () => [ sha3(this.email) ] diff --git a/js/src/modals/Verification/sms-store.js b/js/src/modals/Verification/sms-store.js index 84a445452..3c58b6ef9 100644 --- a/js/src/modals/Verification/sms-store.js +++ b/js/src/modals/Verification/sms-store.js @@ -23,6 +23,8 @@ import VerificationStore, { } from './store'; import { postToServer } from '../../3rdparty/sms-verification'; +const SMS_VERIFICATION = 0; // id in the `BadgeReg.sol` contract + export default class SMSVerificationStore extends VerificationStore { @observable number = ''; @@ -53,7 +55,7 @@ export default class SMSVerificationStore extends VerificationStore { } constructor (api, account, isTestnet) { - super(api, SMSVerificationABI, 0, account, isTestnet); + super(api, SMSVerificationABI, SMS_VERIFICATION, account, isTestnet); } @action setNumber = (number) => { 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 85/99] 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 757f5dac1..c1c10f0cf 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 3e83aeeb1765ffe02ed8682002cabec58cfaed48 Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Thu, 15 Dec 2016 20:21:20 +0000 Subject: [PATCH 86/99] [ci skip] js-precompiled 20161215-201838 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a6ed9be6..e6a27f206 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1363,7 +1363,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#2d07c405453bcf1e603c3965387b7f920565b6d8" +source = "git+https://github.com/ethcore/js-precompiled.git#2cdda91549dfeebd94775b348a443f8ee5446e9f" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index d247714ab..3b0be9671 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.126", + "version": "0.2.127", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>", From e2371632c52b85ecc62b7812c06fd1d1085f42c9 Mon Sep 17 00:00:00 2001 From: arkpar <arkady.paronyan@gmail.com> Date: Thu, 15 Dec 2016 21:56:45 +0100 Subject: [PATCH 87/99] Base dir option --- ethcore/res/ethereum/tests | 2 +- parity/blockchain.rs | 4 ++-- parity/cli/config.full.toml | 3 ++- parity/cli/mod.rs | 20 ++++++++++++-------- parity/cli/usage.txt | 4 +++- parity/configuration.rs | 10 ++++++---- parity/dapps.rs | 2 +- parity/dir.rs | 35 ++++++++++++++++++++--------------- parity/helpers.rs | 7 ++++--- parity/rpc.rs | 2 +- parity/run.rs | 2 +- parity/signer.rs | 2 +- parity/snapshot.rs | 2 +- parity/upgrade.rs | 6 +++--- 14 files changed, 58 insertions(+), 43 deletions(-) diff --git a/ethcore/res/ethereum/tests b/ethcore/res/ethereum/tests index e8f4624b7..9028c4801 160000 --- a/ethcore/res/ethereum/tests +++ b/ethcore/res/ethereum/tests @@ -1 +1 @@ -Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be +Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8 diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 94e9e7709..72c56ad4c 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -180,7 +180,7 @@ fn execute_import(cmd: ImportBlockchain) -> Result<String, String> { let snapshot_path = db_dirs.snapshot_path(); // execute upgrades - try!(execute_upgrades(&db_dirs, algorithm, cmd.compaction.compaction_profile(db_dirs.db_root_path().as_path()))); + try!(execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, cmd.compaction.compaction_profile(db_dirs.db_root_path().as_path()))); // create dirs used by parity try!(cmd.dirs.create_dirs(false, false)); @@ -351,7 +351,7 @@ fn start_client( let snapshot_path = db_dirs.snapshot_path(); // execute upgrades - try!(execute_upgrades(&db_dirs, algorithm, compaction.compaction_profile(db_dirs.db_root_path().as_path()))); + try!(execute_upgrades(&dirs.base, &db_dirs, algorithm, compaction.compaction_profile(db_dirs.db_root_path().as_path()))); // create dirs used by parity try!(dirs.create_dirs(false, false)); diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index 48dac61d3..4d222a80e 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -3,7 +3,8 @@ mode = "last" mode_timeout = 300 mode_alarm = 3600 chain = "homestead" -db_path = "$HOME/.parity" +base_path = "$HOME/.parity" +db_path = "$HOME/.parity/chains" keys_path = "$HOME/.parity/keys" identity = "" diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 59f478bb3..938517469 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -86,8 +86,9 @@ 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_chain: String = "homestead", or |c: &Config| otry!(c.parity).chain.clone(), - flag_db_path: String = default_data_path(), or |c: &Config| otry!(c.parity).db_path.clone(), - flag_keys_path: String = "$DATA/keys", or |c: &Config| otry!(c.parity).keys_path.clone(), + flag_base_path: String = default_data_path(), or |c: &Config| otry!(c.parity).base_path.clone(), + flag_db_path: String = "$BASE/chains", or |c: &Config| otry!(c.parity).db_path.clone(), + flag_keys_path: String = "$BASE/keys", or |c: &Config| otry!(c.parity).keys_path.clone(), flag_identity: String = "", or |c: &Config| otry!(c.parity).identity.clone(), // -- Account Options @@ -106,7 +107,7 @@ usage! { or |c: &Config| otry!(c.ui).port.clone(), flag_ui_interface: String = "local", or |c: &Config| otry!(c.ui).interface.clone(), - flag_ui_path: String = "$DATA/signer", + flag_ui_path: String = "$BASE/signer", or |c: &Config| otry!(c.ui).path.clone(), // NOTE [todr] For security reasons don't put this to config files flag_ui_no_validation: bool = false, or |_| None, @@ -162,7 +163,7 @@ usage! { // IPC flag_no_ipc: bool = false, or |c: &Config| otry!(c.ipc).disable.clone(), - flag_ipc_path: String = "$DATA/jsonrpc.ipc", + flag_ipc_path: String = "$BASE/jsonrpc.ipc", or |c: &Config| otry!(c.ipc).path.clone(), flag_ipc_apis: String = "web3,eth,net,parity,parity_accounts,traces,rpc", or |c: &Config| otry!(c.ipc).apis.clone().map(|vec| vec.join(",")), @@ -176,7 +177,7 @@ usage! { or |c: &Config| otry!(c.dapps).interface.clone(), flag_dapps_hosts: String = "none", or |c: &Config| otry!(c.dapps).hosts.clone().map(|vec| vec.join(",")), - flag_dapps_path: String = "$DATA/dapps", + flag_dapps_path: String = "$BASE/dapps", or |c: &Config| otry!(c.dapps).path.clone(), flag_dapps_user: Option<String> = None, or |c: &Config| otry!(c.dapps).user.clone().map(Some), @@ -277,7 +278,7 @@ usage! { or |c: &Config| otry!(c.vm).jit.clone(), // -- Miscellaneous Options - flag_config: String = "$DATA/config.toml", or |_| None, + flag_config: String = "$BASE/config.toml", or |_| None, flag_logging: Option<String> = None, or |c: &Config| otry!(c.misc).logging.clone().map(Some), flag_log_file: Option<String> = None, @@ -310,6 +311,7 @@ struct Operating { mode_timeout: Option<u64>, mode_alarm: Option<u64>, chain: Option<String>, + base_path: Option<String>, db_path: Option<String>, keys_path: Option<String>, identity: Option<String>, @@ -534,7 +536,8 @@ mod tests { flag_mode_timeout: 300u64, flag_mode_alarm: 3600u64, flag_chain: "xyz".into(), - flag_db_path: "$HOME/.parity".into(), + flag_base_path: "$HOME/.parity".into(), + flag_db_path: "$HOME/.parity/chains".into(), flag_keys_path: "$HOME/.parity/keys".into(), flag_identity: "".into(), @@ -676,7 +679,7 @@ mod tests { // -- Miscellaneous Options flag_version: false, - flag_config: "$DATA/config.toml".into(), + flag_config: "$BASE/config.toml".into(), flag_logging: Some("own_tx=trace".into()), flag_log_file: Some("/var/log/parity.log".into()), flag_no_color: false, @@ -708,6 +711,7 @@ mod tests { mode_timeout: Some(15u64), mode_alarm: Some(10u64), chain: Some("./chain.json".into()), + base_path: None, db_path: None, keys_path: None, identity: None, diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index bbf7ac236..ecb067992 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -38,7 +38,9 @@ Operating Options: JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, testnet or dev (default: {flag_chain}). - -d --db-path PATH Specify the database & configuration directory path + -d --base-path PATH Specify the base data storage path. + (default: {flag_base_path}). + --db-path PATH Specify the database directory path (default: {flag_db_path}). --keys-path PATH Specify the path for JSON key files to be found (default: {flag_keys_path}). diff --git a/parity/configuration.rs b/parity/configuration.rs index b9ae2e958..10ba2a0c6 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -589,7 +589,7 @@ impl Configuration { ret.snapshot_peers = self.snapshot_peers(); ret.allow_ips = try!(self.allow_ips()); ret.max_pending_peers = self.max_pending_peers(); - let mut net_path = PathBuf::from(self.directories().data); + let mut net_path = PathBuf::from(self.directories().base); net_path.push("network"); ret.config_path = Some(net_path.to_str().unwrap().to_owned()); ret.reserved_nodes = try!(self.init_reserved_nodes()); @@ -683,8 +683,9 @@ impl Configuration { fn directories(&self) -> Directories { use util::path; - let data_path = replace_home("", self.args.flag_datadir.as_ref().unwrap_or(&self.args.flag_db_path)); + let data_path = replace_home("", self.args.flag_datadir.as_ref().unwrap_or(&self.args.flag_base_path)); + let db_path = replace_home(&data_path, &self.args.flag_db_path); let keys_path = replace_home(&data_path, &self.args.flag_keys_path); let dapps_path = replace_home(&data_path, &self.args.flag_dapps_path); let ui_path = replace_home(&data_path, &self.args.flag_ui_path); @@ -706,7 +707,8 @@ impl Configuration { Directories { keys: keys_path, - data: data_path, + base: data_path, + db: db_path, dapps: dapps_path, signer: ui_path, } @@ -716,7 +718,7 @@ impl Configuration { if self.args.flag_geth { geth_ipc_path(self.args.flag_testnet) } else { - parity_ipc_path(&self.directories().data, &self.args.flag_ipcpath.clone().unwrap_or(self.args.flag_ipc_path.clone())) + parity_ipc_path(&self.directories().base, &self.args.flag_ipcpath.clone().unwrap_or(self.args.flag_ipc_path.clone())) } } diff --git a/parity/dapps.rs b/parity/dapps.rs index e54638ed2..80fe8d675 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -43,7 +43,7 @@ impl Default for Configuration { hosts: Some(Vec::new()), user: None, pass: None, - dapps_path: replace_home(&data_dir, "$DATA/dapps"), + dapps_path: replace_home(&data_dir, "$BASE/dapps"), } } } diff --git a/parity/dir.rs b/parity/dir.rs index f9c2f30c9..89c435d0d 100644 --- a/parity/dir.rs +++ b/parity/dir.rs @@ -27,7 +27,8 @@ const LEGACY_CLIENT_DB_VER_STR: &'static str = "5.3"; #[derive(Debug, PartialEq)] pub struct Directories { - pub data: String, + pub base: String, + pub db: String, pub keys: String, pub signer: String, pub dapps: String, @@ -37,17 +38,19 @@ impl Default for Directories { fn default() -> Self { let data_dir = default_data_path(); Directories { - data: replace_home(&data_dir, "$DATA"), - keys: replace_home(&data_dir, "$DATA/keys"), - signer: replace_home(&data_dir, "$DATA/signer"), - dapps: replace_home(&data_dir, "$DATA/dapps"), + base: replace_home(&data_dir, "$BASE"), + db: replace_home(&data_dir, "$BASE/chains"), + keys: replace_home(&data_dir, "$BASE/keys"), + signer: replace_home(&data_dir, "$BASE/signer"), + dapps: replace_home(&data_dir, "$BASE/dapps"), } } } impl Directories { pub fn create_dirs(&self, dapps_enabled: bool, signer_enabled: bool) -> Result<(), String> { - try!(fs::create_dir_all(&self.data).map_err(|e| e.to_string())); + try!(fs::create_dir_all(&self.base).map_err(|e| e.to_string())); + try!(fs::create_dir_all(&self.db).map_err(|e| e.to_string())); try!(fs::create_dir_all(&self.keys).map_err(|e| e.to_string())); if signer_enabled { try!(fs::create_dir_all(&self.signer).map_err(|e| e.to_string())); @@ -61,7 +64,8 @@ impl Directories { /// Database paths. pub fn database(&self, genesis_hash: H256, fork_name: Option<String>, spec_name: String) -> DatabaseDirectories { DatabaseDirectories { - path: self.data.clone(), + path: self.db.clone(), + legacy_path: self.base.clone(), genesis_hash: genesis_hash, fork_name: fork_name, spec_name: spec_name, @@ -70,14 +74,14 @@ impl Directories { /// Get the ipc sockets path pub fn ipc_path(&self) -> PathBuf { - let mut dir = Path::new(&self.data).to_path_buf(); + let mut dir = Path::new(&self.base).to_path_buf(); dir.push("ipc"); dir } // TODO: remove in 1.7 pub fn legacy_keys_path(&self, testnet: bool) -> PathBuf { - let mut dir = Path::new(&self.data).to_path_buf(); + let mut dir = Path::new(&self.base).to_path_buf(); if testnet { dir.push("testnet_keys"); } else { @@ -96,6 +100,7 @@ impl Directories { #[derive(Debug, PartialEq)] pub struct DatabaseDirectories { pub path: String, + pub legacy_path: String, pub genesis_hash: H256, pub fork_name: Option<String>, pub spec_name: String, @@ -105,14 +110,13 @@ impl DatabaseDirectories { /// Base DB directory for the given fork. // TODO: remove in 1.7 pub fn legacy_fork_path(&self) -> PathBuf { - let mut dir = Path::new(&self.path).to_path_buf(); + let mut dir = Path::new(&self.legacy_path).to_path_buf(); dir.push(format!("{:?}{}", H64::from(self.genesis_hash), self.fork_name.as_ref().map(|f| format!("-{}", f)).unwrap_or_default())); dir } pub fn spec_root_path(&self) -> PathBuf { let mut dir = Path::new(&self.path).to_path_buf(); - dir.push("chains"); dir.push(&self.spec_name); dir } @@ -204,10 +208,11 @@ mod tests { fn test_default_directories() { let data_dir = super::default_data_path(); let expected = Directories { - data: replace_home(&data_dir, "$DATA"), - keys: replace_home(&data_dir, "$DATA/keys"), - signer: replace_home(&data_dir, "$DATA/signer"), - dapps: replace_home(&data_dir, "$DATA/dapps"), + base: replace_home(&data_dir, "$BASE"), + db: replace_home(&data_dir, "$BASE/chains"), + keys: replace_home(&data_dir, "$BASE/keys"), + signer: replace_home(&data_dir, "$BASE/signer"), + dapps: replace_home(&data_dir, "$BASE/dapps"), }; assert_eq!(expected, Directories::default()); } diff --git a/parity/helpers.rs b/parity/helpers.rs index f359d617f..74e5bab63 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -135,7 +135,7 @@ pub fn to_price(s: &str) -> Result<f32, String> { pub fn replace_home(base: &str, arg: &str) -> String { // the $HOME directory on mac os should be `~/Library` or `~/Library/Application Support` let r = arg.replace("$HOME", env::home_dir().unwrap().to_str().unwrap()); - let r = r.replace("$DATA", base ); + let r = r.replace("$BASE", base ); r.replace("/", &::std::path::MAIN_SEPARATOR.to_string() ) } @@ -188,7 +188,7 @@ pub fn to_bootnodes(bootnodes: &Option<String>) -> Result<Vec<String>, String> { pub fn default_network_config() -> ::ethsync::NetworkConfiguration { use ethsync::{NetworkConfiguration, AllowIP}; NetworkConfiguration { - config_path: Some(replace_home(&::dir::default_data_path(), "$DATA/network")), + config_path: Some(replace_home(&::dir::default_data_path(), "$BASE/network")), net_config_path: None, listen_address: Some("0.0.0.0:30303".into()), public_address: None, @@ -257,12 +257,13 @@ pub fn to_client_config( } pub fn execute_upgrades( + base_path: &str, dirs: &DatabaseDirectories, pruning: Algorithm, compaction_profile: CompactionProfile ) -> Result<(), String> { - upgrade_data_paths(dirs, pruning); + upgrade_data_paths(base_path, dirs, pruning); match upgrade(Some(&dirs.path)) { Ok(upgrades_applied) if upgrades_applied > 0 => { diff --git a/parity/rpc.rs b/parity/rpc.rs index b0668bf57..f5ff05e20 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -62,7 +62,7 @@ impl Default for IpcConfiguration { let data_dir = default_data_path(); IpcConfiguration { enabled: true, - socket_addr: parity_ipc_path(&data_dir, "$DATA/jsonrpc.ipc"), + socket_addr: parity_ipc_path(&data_dir, "$BASE/jsonrpc.ipc"), apis: ApiSet::IpcContext, } } diff --git a/parity/run.rs b/parity/run.rs index 140c2050c..a30001b70 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -164,7 +164,7 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<(), String> { let snapshot_path = db_dirs.snapshot_path(); // execute upgrades - try!(execute_upgrades(&db_dirs, algorithm, cmd.compaction.compaction_profile(db_dirs.db_root_path().as_path()))); + try!(execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, cmd.compaction.compaction_profile(db_dirs.db_root_path().as_path()))); // create dirs used by parity try!(cmd.dirs.create_dirs(cmd.dapps_conf.enabled, cmd.signer_conf.enabled)); diff --git a/parity/signer.rs b/parity/signer.rs index 4d282888e..7cc258ed9 100644 --- a/parity/signer.rs +++ b/parity/signer.rs @@ -44,7 +44,7 @@ impl Default for Configuration { enabled: true, port: 8180, interface: "127.0.0.1".into(), - signer_path: replace_home(&data_dir, "$DATA/signer"), + signer_path: replace_home(&data_dir, "$BASE/signer"), skip_origin_validation: false, } } diff --git a/parity/snapshot.rs b/parity/snapshot.rs index d71ffe924..42ba8fec2 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -167,7 +167,7 @@ impl SnapshotCommand { let snapshot_path = db_dirs.snapshot_path(); // execute upgrades - try!(execute_upgrades(&db_dirs, algorithm, self.compaction.compaction_profile(db_dirs.db_root_path().as_path()))); + try!(execute_upgrades(&self.dirs.base, &db_dirs, algorithm, self.compaction.compaction_profile(db_dirs.db_root_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); diff --git a/parity/upgrade.rs b/parity/upgrade.rs index 5c49cb997..94d0adfe4 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -200,11 +200,11 @@ fn upgrade_user_defaults(dirs: &DatabaseDirectories) { } } -pub fn upgrade_data_paths(dirs: &DatabaseDirectories, pruning: Algorithm) { +pub fn upgrade_data_paths(base_path: &str, dirs: &DatabaseDirectories, pruning: Algorithm) { let legacy_root_path = replace_home("", "$HOME/.parity"); let default_path = default_data_path(); - if legacy_root_path != dirs.path && dirs.path == default_path { - upgrade_dir_location(&PathBuf::from(legacy_root_path), &PathBuf::from(&dirs.path)); + if legacy_root_path != base_path && base_path == default_path { + upgrade_dir_location(&PathBuf::from(legacy_root_path), &PathBuf::from(&base_path)); } upgrade_dir_location(&dirs.legacy_version_path(pruning), &dirs.db_path(pruning)); upgrade_dir_location(&dirs.legacy_snapshot_path(), &dirs.snapshot_path()); 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 88/99] 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 6b402ae78..f86b37a14 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 972960c73..bd1cc85cc 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 b062990a0..407ecac28 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 632ab6f28..2fb684450 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 baf898ad8..29d652989 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 89/99] 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 2fb684450..ca1d54ede 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 90/99] 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 b44047610..d791e340c 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 d0d97cd0b..b58c8f85c 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 91/99] 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 d791e340c..1958b57d8 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 447196398aab89d9d41fa3b10f4f4dfd7ab7c63a Mon Sep 17 00:00:00 2001 From: keorn <pczaban@gmail.com> Date: Thu, 15 Dec 2016 23:36:06 +0100 Subject: [PATCH 92/99] fix start_step --- ethcore/src/engines/authority_round.rs | 8 ++++++-- sync/src/tests/consensus.rs | 15 ++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 4e7d564fe..57bb513ae 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -100,6 +100,7 @@ impl AsMillis for Duration { impl AuthorityRound { /// Create a new instance of AuthorityRound engine. pub fn new(params: CommonParams, our_params: AuthorityRoundParams, builtins: BTreeMap<Address, Builtin>) -> Result<Arc<Self>, Error> { + let should_timeout = our_params.start_step.is_none(); let initial_step = our_params.start_step.unwrap_or_else(|| (unix_now().as_secs() / our_params.step_duration.as_secs())) as usize; let engine = Arc::new( AuthorityRound { @@ -113,8 +114,11 @@ impl AuthorityRound { account_provider: Mutex::new(None), password: RwLock::new(None), }); - let handler = TransitionHandler { engine: Arc::downgrade(&engine) }; - try!(engine.transition_service.register_handler(Arc::new(handler))); + // Do not initialize timeouts for tests. + if should_timeout { + let handler = TransitionHandler { engine: Arc::downgrade(&engine) }; + try!(engine.transition_service.register_handler(Arc::new(handler))); + } Ok(engine) } diff --git a/sync/src/tests/consensus.rs b/sync/src/tests/consensus.rs index c1fa8fce7..e1f73d066 100644 --- a/sync/src/tests/consensus.rs +++ b/sync/src/tests/consensus.rs @@ -82,12 +82,14 @@ fn authority_round() { net.sync(); // Trigger block proposal net.peer(0).chain.miner().import_own_transaction(&*net.peer(0).chain, new_tx(s0.secret(), 0.into())).unwrap(); + net.peer(1).chain.miner().import_own_transaction(&*net.peer(1).chain, new_tx(s1.secret(), 0.into())).unwrap(); // Sync a block net.sync(); assert_eq!(net.peer(0).chain.chain_info().best_block_number, 1); assert_eq!(net.peer(1).chain.chain_info().best_block_number, 1); - net.peer(1).chain.miner().import_own_transaction(&*net.peer(1).chain, new_tx(s1.secret(), 0.into())).unwrap(); + net.peer(0).chain.miner().import_own_transaction(&*net.peer(0).chain, new_tx(s0.secret(), 1.into())).unwrap(); + net.peer(1).chain.miner().import_own_transaction(&*net.peer(1).chain, new_tx(s1.secret(), 1.into())).unwrap(); // Move to next proposer step net.peer(0).chain.engine().step(); net.peer(1).chain.engine().step(); @@ -96,14 +98,17 @@ fn authority_round() { assert_eq!(net.peer(1).chain.chain_info().best_block_number, 2); // Fork the network - net.peer(0).chain.miner().import_own_transaction(&*net.peer(0).chain, new_tx(s0.secret(), 1.into())).unwrap(); + net.peer(0).chain.miner().import_own_transaction(&*net.peer(0).chain, new_tx(s0.secret(), 2.into())).unwrap(); + net.peer(1).chain.miner().import_own_transaction(&*net.peer(1).chain, new_tx(s1.secret(), 2.into())).unwrap(); net.peer(0).chain.engine().step(); net.peer(1).chain.engine().step(); - assert_eq!(net.peer(0).chain.chain_info().best_block_number, 3); - net.peer(1).chain.miner().import_own_transaction(&*net.peer(1).chain, new_tx(s1.secret(), 1.into())).unwrap(); net.peer(0).chain.engine().step(); net.peer(1).chain.engine().step(); - assert_eq!(net.peer(1).chain.chain_info().best_block_number, 3); + let ci0 = net.peer(0).chain.chain_info(); + let ci1 = net.peer(1).chain.chain_info(); + assert_eq!(ci0.best_block_number, 3); + assert_eq!(ci1.best_block_number, 3); + assert!(ci0.best_block_hash != ci1.best_block_hash); // Reorg to the correct one. net.sync(); let ci0 = net.peer(0).chain.chain_info(); From d8470cc5ca4dc0e3c21d95972d5333ac2e5cc555 Mon Sep 17 00:00:00 2001 From: keorn <pczaban@gmail.com> Date: Fri, 16 Dec 2016 00:07:07 +0100 Subject: [PATCH 93/99] revert slack --- ethcore/src/engines/authority_round.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs index 57bb513ae..11d77bc78 100644 --- a/ethcore/src/engines/authority_round.rs +++ b/ethcore/src/engines/authority_round.rs @@ -466,7 +466,7 @@ mod tests { // Spec starts with step 2. header.set_seal(vec![encode(&1usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); assert!(engine.verify_block_seal(&header).is_ok()); - header.set_seal(vec![encode(&11usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); + header.set_seal(vec![encode(&5usize).to_vec(), encode(&(&*signature as &[u8])).to_vec()]); assert!(engine.verify_block_seal(&header).is_err()); } } 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 94/99] 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 8f4977fc2..c5697c623 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 95/99] 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 f86b37a14..8000617df 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 b97e057d7..e166b4c65 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 1567a88a0..92992deb2 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 c5697c623..a82748c84 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 96/99] 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 77d1bf1e7..23eebe183 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 d3638f35d..5f969af35 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 a82748c84..9f781ed5a 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 97/99] 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 c01bfdf75..4129433f4 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 1fb290f4b..91aab42a7 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 98/99] 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 c1c10f0cf..6deba8ec4 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 5f969af35..81c35fbf1 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] From 3450538208409ca522e6ae1ce4b8e8c9f55af8db Mon Sep 17 00:00:00 2001 From: GitLab Build Bot <jaco+gitlab@ethcore.io> Date: Fri, 16 Dec 2016 12:22:56 +0000 Subject: [PATCH 99/99] [ci skip] js-precompiled 20161216-121923 --- Cargo.lock | 2 +- js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25c241c12..97bd90491 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1379,7 +1379,7 @@ dependencies = [ [[package]] name = "parity-ui-precompiled" version = "1.4.0" -source = "git+https://github.com/ethcore/js-precompiled.git#2cdda91549dfeebd94775b348a443f8ee5446e9f" +source = "git+https://github.com/ethcore/js-precompiled.git#3d390b35737ce212d358f26b5ec8d9644b252a88" dependencies = [ "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/js/package.json b/js/package.json index edaf527cd..6f8693b39 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "parity.js", - "version": "0.2.127", + "version": "0.2.128", "main": "release/index.js", "jsnext:main": "src/index.js", "author": "Parity Team <admin@parity.io>",