From 2060ea5de388f7b3b515ba5c2d58425585a8ac1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Sat, 2 Jun 2018 09:29:44 +0100 Subject: [PATCH 001/191] ethcore-sync: fix connection to peers behind chain fork block (#8710) --- ethcore/sync/src/chain/handler.rs | 43 ++++++++++++++----------------- ethcore/sync/src/chain/mod.rs | 2 ++ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/ethcore/sync/src/chain/handler.rs b/ethcore/sync/src/chain/handler.rs index 7668a64594..75111a4d4a 100644 --- a/ethcore/sync/src/chain/handler.rs +++ b/ethcore/sync/src/chain/handler.rs @@ -332,14 +332,6 @@ impl SyncHandler { Ok(()) } - fn on_peer_confirmed(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId) { - { - let peer = sync.peers.get_mut(&peer_id).expect("Is only called when peer is present in peers"); - peer.confirmation = ForkConfirmation::Confirmed; - } - sync.sync_peer(io, peer_id, false); - } - fn on_peer_fork_header(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { { let peer = sync.peers.get_mut(&peer_id).expect("Is only called when peer is present in peers"); @@ -349,24 +341,27 @@ impl SyncHandler { if item_count == 0 || item_count != 1 { trace!(target: "sync", "{}: Chain is too short to confirm the block", peer_id); - io.disable_peer(peer_id); - return Ok(()); - } + peer.confirmation = ForkConfirmation::TooShort; - let header = r.at(0)?.as_raw(); - if keccak(&header) != fork_hash { - trace!(target: "sync", "{}: Fork mismatch", peer_id); - io.disable_peer(peer_id); - return Ok(()); - } + } else { + let header = r.at(0)?.as_raw(); + if keccak(&header) != fork_hash { + trace!(target: "sync", "{}: Fork mismatch", peer_id); + io.disable_peer(peer_id); + return Ok(()); + } + + trace!(target: "sync", "{}: Confirmed peer", peer_id); + peer.confirmation = ForkConfirmation::Confirmed; - trace!(target: "sync", "{}: Confirmed peer", peer_id); - if !io.chain_overlay().read().contains_key(&fork_number) { - trace!(target: "sync", "Inserting (fork) block {} header", fork_number); - io.chain_overlay().write().insert(fork_number, header.to_vec()); + if !io.chain_overlay().read().contains_key(&fork_number) { + trace!(target: "sync", "Inserting (fork) block {} header", fork_number); + io.chain_overlay().write().insert(fork_number, header.to_vec()); + } } } - SyncHandler::on_peer_confirmed(sync, io, peer_id); + + sync.sync_peer(io, peer_id, false); return Ok(()); } @@ -686,7 +681,9 @@ impl SyncHandler { SyncRequester::request_fork_header(sync, io, peer_id, fork_block); }, _ => { - SyncHandler::on_peer_confirmed(sync, io, peer_id); + // when there's no `fork_block` defined we initialize the peer with + // `confirmation: ForkConfirmation::Confirmed`. + sync.sync_peer(io, peer_id, false); } } diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index 5af2892549..c0ee8299b8 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -294,6 +294,8 @@ pub enum BlockSet { pub enum ForkConfirmation { /// Fork block confirmation pending. Unconfirmed, + /// Peer's chain is too short to confirm the fork. + TooShort, /// Fork is confirmed. Confirmed, } -- GitLab From 3d76417353a0dfe24517815fedb0ad646e6a3add Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 2 Jun 2018 11:05:11 +0200 Subject: [PATCH 002/191] Remove HostTrait altogether (#8681) --- ethcore/light/src/net/mod.rs | 4 ++-- ethcore/sync/src/api.rs | 4 ++-- util/network-devp2p/src/handshake.rs | 2 +- util/network-devp2p/src/host.rs | 6 +----- util/network-devp2p/src/lib.rs | 2 +- util/network-devp2p/src/session.rs | 2 +- util/network-devp2p/tests/tests.rs | 2 +- util/network/src/lib.rs | 7 +------ whisper/src/net/mod.rs | 10 +++------- 9 files changed, 13 insertions(+), 26 deletions(-) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 27d5c12a5f..d8a975dc3f 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -21,7 +21,7 @@ use transaction::UnverifiedTransaction; use io::TimerToken; -use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId}; +use network::{NetworkProtocolHandler, NetworkContext, PeerId}; use rlp::{RlpStream, Rlp}; use ethereum_types::{H256, U256}; use kvdb::DBValue; @@ -1082,7 +1082,7 @@ fn punish(peer: PeerId, io: &IoContext, e: Error) { } impl NetworkProtocolHandler for LightProtocol { - fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) { + fn initialize(&self, io: &NetworkContext) { io.register_timer(TIMEOUT, TIMEOUT_INTERVAL) .expect("Error registering sync timer."); io.register_timer(TICK_TIMEOUT, TICK_TIMEOUT_INTERVAL) diff --git a/ethcore/sync/src/api.rs b/ethcore/sync/src/api.rs index 9e6cdafa6e..8419fccd7a 100644 --- a/ethcore/sync/src/api.rs +++ b/ethcore/sync/src/api.rs @@ -21,7 +21,7 @@ use std::ops::Range; use std::time::Duration; use bytes::Bytes; use devp2p::NetworkService; -use network::{NetworkProtocolHandler, NetworkContext, HostInfo, PeerId, ProtocolId, +use network::{NetworkProtocolHandler, NetworkContext, PeerId, ProtocolId, NetworkConfiguration as BasicNetworkConfiguration, NonReservedPeerMode, Error, ErrorKind, ConnectionFilter}; use ethereum_types::{H256, H512, U256}; @@ -371,7 +371,7 @@ struct SyncProtocolHandler { } impl NetworkProtocolHandler for SyncProtocolHandler { - fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) { + fn initialize(&self, io: &NetworkContext) { if io.subprotocol_name() != WARP_SYNC_PROTOCOL_ID { io.register_timer(0, Duration::from_secs(1)).expect("Error registering sync timer"); } diff --git a/util/network-devp2p/src/handshake.rs b/util/network-devp2p/src/handshake.rs index 891dd7c257..ffe0276d97 100644 --- a/util/network-devp2p/src/handshake.rs +++ b/util/network-devp2p/src/handshake.rs @@ -26,7 +26,7 @@ use node_table::NodeId; use io::{IoContext, StreamToken}; use ethkey::{KeyPair, Public, Secret, recover, sign, Generator, Random}; use ethkey::crypto::{ecdh, ecies}; -use network::{Error, ErrorKind, HostInfo as HostInfoTrait}; +use network::{Error, ErrorKind}; use host::HostInfo; #[derive(PartialEq, Eq, Debug)] diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index f9180700fe..245492de80 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -39,7 +39,6 @@ use PROTOCOL_VERSION; use node_table::*; use network::{NetworkConfiguration, NetworkIoMessage, ProtocolId, PeerId, PacketId}; use network::{NonReservedPeerMode, NetworkContext as NetworkContextTrait}; -use network::HostInfo as HostInfoTrait; use network::{SessionInfo, Error, ErrorKind, DisconnectReason, NetworkProtocolHandler}; use discovery::{Discovery, TableUpdates, NodeEntry}; use ip_utils::{map_external_address, select_public_address}; @@ -223,10 +222,8 @@ impl HostInfo { pub(crate) fn secret(&self) -> &Secret { self.keys.secret() } -} -impl HostInfoTrait for HostInfo { - fn id(&self) -> &NodeId { + pub(crate) fn id(&self) -> &NodeId { self.keys.public() } } @@ -997,7 +994,6 @@ impl IoHandler for Host { let reserved = self.reserved_nodes.read(); h.initialize( &NetworkContext::new(io, *protocol, None, self.sessions.clone(), &reserved), - &*self.info.read(), ); self.handlers.write().insert(*protocol, h); let mut info = self.info.write(); diff --git a/util/network-devp2p/src/lib.rs b/util/network-devp2p/src/lib.rs index 244997a654..12383fdbee 100644 --- a/util/network-devp2p/src/lib.rs +++ b/util/network-devp2p/src/lib.rs @@ -29,7 +29,7 @@ //! struct MyHandler; //! //! impl NetworkProtocolHandler for MyHandler { -//! fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) { +//! fn initialize(&self, io: &NetworkContext) { //! io.register_timer(0, Duration::from_secs(1)); //! } //! diff --git a/util/network-devp2p/src/session.rs b/util/network-devp2p/src/session.rs index cd8ef56bd4..f830dcc0d7 100644 --- a/util/network-devp2p/src/session.rs +++ b/util/network-devp2p/src/session.rs @@ -28,7 +28,7 @@ use connection::{EncryptedConnection, Packet, Connection, MAX_PAYLOAD_SIZE}; use handshake::Handshake; use io::{IoContext, StreamToken}; use network::{Error, ErrorKind, DisconnectReason, SessionInfo, ProtocolId, PeerCapabilityInfo}; -use network::{SessionCapabilityInfo, HostInfo as HostInfoTrait}; +use network::SessionCapabilityInfo; use host::*; use node_table::NodeId; use snappy; diff --git a/util/network-devp2p/tests/tests.rs b/util/network-devp2p/tests/tests.rs index a1d178d654..3c2333cd10 100644 --- a/util/network-devp2p/tests/tests.rs +++ b/util/network-devp2p/tests/tests.rs @@ -70,7 +70,7 @@ impl TestProtocol { } impl NetworkProtocolHandler for TestProtocol { - fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) { + fn initialize(&self, io: &NetworkContext) { io.register_timer(0, Duration::from_millis(10)).unwrap(); } diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index 87d3ed9b0e..a04eb04880 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -333,17 +333,12 @@ impl<'a, T> NetworkContext for &'a T where T: ?Sized + NetworkContext { } } -pub trait HostInfo { - /// Returns public key - fn id(&self) -> &NodeId; -} - /// Network IO protocol handler. This needs to be implemented for each new subprotocol. /// All the handler function are called from within IO event loop. /// `Message` is the type for message data. pub trait NetworkProtocolHandler: Sync + Send { /// Initialize the handler - fn initialize(&self, _io: &NetworkContext, _host_info: &HostInfo) {} + fn initialize(&self, _io: &NetworkContext) {} /// Called when new network packet received. fn read(&self, io: &NetworkContext, peer: &PeerId, packet_id: u8, data: &[u8]); /// Called when new peer is connected. Only called when peer supports the same protocol. diff --git a/whisper/src/net/mod.rs b/whisper/src/net/mod.rs index c462baa9d7..1115b17d4f 100644 --- a/whisper/src/net/mod.rs +++ b/whisper/src/net/mod.rs @@ -23,7 +23,7 @@ use std::time::{Duration, SystemTime}; use std::sync::Arc; use ethereum_types::{H256, H512}; -use network::{self, HostInfo, NetworkContext, NodeId, PeerId, ProtocolId, TimerToken}; +use network::{self, NetworkContext, NodeId, PeerId, ProtocolId, TimerToken}; use ordered_float::OrderedFloat; use parking_lot::{Mutex, RwLock}; use rlp::{DecoderError, RlpStream, Rlp}; @@ -423,7 +423,6 @@ pub struct Network { messages: Arc>, handler: T, peers: RwLock>>, - node_key: RwLock, } // public API. @@ -434,7 +433,6 @@ impl Network { messages: Arc::new(RwLock::new(Messages::new(messages_size_bytes))), handler: handler, peers: RwLock::new(HashMap::new()), - node_key: RwLock::new(Default::default()), } } @@ -685,12 +683,10 @@ impl Network { } impl ::network::NetworkProtocolHandler for Network { - fn initialize(&self, io: &NetworkContext, host_info: &HostInfo) { + fn initialize(&self, io: &NetworkContext) { // set up broadcast timer (< 1s) io.register_timer(RALLY_TOKEN, RALLY_TIMEOUT) .expect("Failed to initialize message rally timer"); - - *self.node_key.write() = host_info.id().clone(); } fn read(&self, io: &NetworkContext, peer: &PeerId, packet_id: u8, data: &[u8]) { @@ -720,7 +716,7 @@ impl ::network::NetworkProtocolHandler for Network { pub struct ParityExtensions; impl ::network::NetworkProtocolHandler for ParityExtensions { - fn initialize(&self, _io: &NetworkContext, _host_info: &HostInfo) { } + fn initialize(&self, _io: &NetworkContext) { } fn read(&self, _io: &NetworkContext, _peer: &PeerId, _id: u8, _msg: &[u8]) { } -- GitLab From 98b7c07171cd320f32877dfa5aa528f585dc9a72 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 4 Jun 2018 10:19:50 +0200 Subject: [PATCH 003/191] Update `license header` and `scripts` (#8666) * Update `add_license` script * run script * add `remove duplicate lines script` and run it * Revert changes `English spaces` * strip whitespaces * Revert `GPL` in files with `apache/mit license` * don't append `gpl license` in files with other lic * Don't append `gpl header` in files with other lic. * re-ran script * include c and cpp files too * remove duplicate header * rebase nit --- chainspec/src/main.rs | 16 +++++++++++ dapps/js-glue/build.rs | 3 +-- dapps/js-glue/src/build.rs | 15 +++++++++++ dapps/js-glue/src/codegen.rs | 2 +- dapps/js-glue/src/js.rs | 2 +- dapps/js-glue/src/lib.rs | 3 +-- dapps/js-glue/src/lib.rs.in | 7 ++--- dapps/node-health/src/health.rs | 2 +- dapps/node-health/src/lib.rs | 2 +- dapps/node-health/src/time.rs | 2 +- dapps/node-health/src/types.rs | 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/apps/app.rs | 2 +- dapps/src/apps/cache.rs | 2 +- dapps/src/apps/fetcher/installers.rs | 2 +- dapps/src/apps/fetcher/mod.rs | 2 +- dapps/src/apps/fs.rs | 4 +-- dapps/src/apps/manifest.rs | 2 +- dapps/src/apps/mod.rs | 2 +- dapps/src/apps/ui.rs | 2 +- dapps/src/endpoint.rs | 2 +- dapps/src/handlers/content.rs | 2 +- dapps/src/handlers/echo.rs | 2 +- dapps/src/handlers/fetch.rs | 3 +-- dapps/src/handlers/mod.rs | 2 +- dapps/src/handlers/reader.rs | 2 +- dapps/src/handlers/redirect.rs | 2 +- dapps/src/handlers/streaming.rs | 2 +- dapps/src/lib.rs | 3 +-- dapps/src/page/builtin.rs | 3 +-- dapps/src/page/handler.rs | 2 +- dapps/src/page/local.rs | 3 +-- dapps/src/page/mod.rs | 4 +-- dapps/src/proxypac.rs | 4 +-- dapps/src/router.rs | 2 +- dapps/src/tests/api.rs | 3 +-- dapps/src/tests/fetch.rs | 3 +-- dapps/src/tests/helpers/fetch.rs | 2 +- dapps/src/tests/helpers/mod.rs | 3 +-- dapps/src/tests/helpers/registrar.rs | 2 +- dapps/src/tests/home.rs | 2 +- dapps/src/tests/mod.rs | 3 +-- dapps/src/tests/redirection.rs | 3 +-- dapps/src/tests/rpc.rs | 2 +- dapps/src/tests/validation.rs | 2 +- dapps/src/web.rs | 3 +-- dapps/ui/src/lib.rs | 3 +-- devtools/src/http_client.rs | 2 +- devtools/src/lib.rs | 2 +- ethash/src/cache.rs | 2 +- ethash/src/compute.rs | 2 +- ethash/src/keccak.rs | 2 +- ethash/src/lib.rs | 2 +- ethash/src/seed_compute.rs | 2 +- ethash/src/shared.rs | 2 +- ethcore/benches/evm.rs | 4 +-- ethcore/crypto/src/aes.rs | 3 +-- ethcore/crypto/src/aes_gcm.rs | 3 +-- ethcore/crypto/src/digest.rs | 2 +- ethcore/crypto/src/error.rs | 3 +-- ethcore/crypto/src/hmac.rs | 3 +-- ethcore/crypto/src/lib.rs | 3 +-- ethcore/crypto/src/pbkdf2.rs | 3 +-- ethcore/crypto/src/scrypt.rs | 3 +-- ethcore/evm/src/benches/mod.rs | 2 +- ethcore/evm/src/evm.rs | 2 +- ethcore/evm/src/factory.rs | 2 +- ethcore/evm/src/instructions.rs | 2 +- ethcore/evm/src/interpreter/gasometer.rs | 4 +-- ethcore/evm/src/interpreter/informant.rs | 2 +- ethcore/evm/src/interpreter/memory.rs | 2 +- ethcore/evm/src/interpreter/mod.rs | 4 +-- ethcore/evm/src/interpreter/shared_cache.rs | 3 +-- ethcore/evm/src/interpreter/stack.rs | 3 +-- ethcore/evm/src/lib.rs | 2 +- ethcore/evm/src/tests.rs | 2 +- ethcore/evm/src/vmtype.rs | 2 +- ethcore/light/src/cache.rs | 2 +- ethcore/light/src/cht.rs | 5 +++- ethcore/light/src/client/fetch.rs | 2 +- ethcore/light/src/client/header_chain.rs | 2 +- ethcore/light/src/client/mod.rs | 3 +-- ethcore/light/src/client/service.rs | 2 +- ethcore/light/src/lib.rs | 2 +- ethcore/light/src/net/context.rs | 5 ++-- ethcore/light/src/net/error.rs | 2 +- ethcore/light/src/net/load_timer.rs | 2 +- ethcore/light/src/net/mod.rs | 3 +-- ethcore/light/src/net/request_credits.rs | 2 +- ethcore/light/src/net/request_set.rs | 2 +- ethcore/light/src/net/status.rs | 2 +- ethcore/light/src/net/tests/mod.rs | 2 +- ethcore/light/src/on_demand/mod.rs | 2 +- ethcore/light/src/on_demand/request.rs | 3 +-- ethcore/light/src/on_demand/tests.rs | 2 +- ethcore/light/src/provider.rs | 2 +- ethcore/light/src/transaction_queue.rs | 2 +- ethcore/light/src/types/mod.rs | 2 +- ethcore/light/src/types/request/batch.rs | 2 +- ethcore/light/src/types/request/mod.rs | 4 +-- ethcore/node_filter/src/lib.rs | 3 +-- ethcore/private-tx/src/encryptor.rs | 2 +- ethcore/private-tx/src/error.rs | 3 +-- ethcore/private-tx/src/lib.rs | 2 +- ethcore/private-tx/src/messages.rs | 2 +- .../private-tx/src/private_transactions.rs | 2 +- ethcore/private-tx/tests/private_contract.rs | 2 +- ethcore/service/src/service.rs | 2 +- ethcore/src/account_db.rs | 2 +- ethcore/src/account_provider/mod.rs | 2 +- ethcore/src/account_provider/stores.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.rs | 2 +- ethcore/src/blockchain/import_route.rs | 2 +- ethcore/src/blockchain/mod.rs | 2 +- ethcore/src/blockchain/update.rs | 16 +++++++++++ ethcore/src/blooms/bloom_group.rs | 2 +- ethcore/src/blooms/group_position.rs | 2 +- ethcore/src/blooms/mod.rs | 2 +- ethcore/src/builtin.rs | 5 +--- ethcore/src/cache_manager.rs | 2 +- ethcore/src/client/ancient_import.rs | 2 +- ethcore/src/client/chain_notify.rs | 2 +- ethcore/src/client/client.rs | 6 +---- ethcore/src/client/config.rs | 3 +-- ethcore/src/client/error.rs | 2 +- ethcore/src/client/evm_test_client.rs | 2 +- ethcore/src/client/io_message.rs | 1 - ethcore/src/client/mod.rs | 2 +- ethcore/src/client/private_notify.rs | 2 +- ethcore/src/client/test_client.rs | 3 +-- ethcore/src/client/trace.rs | 15 +++++++++++ ethcore/src/client/traits.rs | 2 +- ethcore/src/db.rs | 2 +- ethcore/src/encoded.rs | 2 +- .../src/engines/authority_round/finality.rs | 2 +- ethcore/src/engines/authority_round/mod.rs | 3 +-- ethcore/src/engines/basic_authority.rs | 2 +- ethcore/src/engines/epoch.rs | 2 +- ethcore/src/engines/instant_seal.rs | 2 +- ethcore/src/engines/mod.rs | 2 +- ethcore/src/engines/null_engine.rs | 2 +- ethcore/src/engines/signer.rs | 2 +- ethcore/src/engines/tendermint/message.rs | 3 +-- ethcore/src/engines/tendermint/mod.rs | 3 +-- ethcore/src/engines/tendermint/params.rs | 2 +- ethcore/src/engines/transition.rs | 2 +- ethcore/src/engines/validator_set/contract.rs | 2 +- ethcore/src/engines/validator_set/mod.rs | 2 +- ethcore/src/engines/validator_set/multi.rs | 2 +- .../engines/validator_set/safe_contract.rs | 2 +- .../src/engines/validator_set/simple_list.rs | 2 +- ethcore/src/engines/validator_set/test.rs | 2 +- ethcore/src/engines/vote_collector.rs | 2 +- ethcore/src/error.rs | 3 +-- ethcore/src/ethereum/denominations.rs | 3 +-- ethcore/src/ethereum/ethash.rs | 2 +- ethcore/src/ethereum/mod.rs | 2 +- ethcore/src/executed.rs | 2 +- ethcore/src/executive.rs | 2 +- ethcore/src/externalities.rs | 2 +- ethcore/src/factory.rs | 2 +- ethcore/src/header.rs | 3 +-- ethcore/src/json_tests/chain.rs | 3 +-- ethcore/src/json_tests/difficulty.rs | 6 +---- ethcore/src/json_tests/executive.rs | 2 +- ethcore/src/json_tests/mod.rs | 2 +- ethcore/src/json_tests/state.rs | 3 +-- 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/machine.rs | 3 +-- ethcore/src/miner/miner.rs | 4 +-- ethcore/src/miner/mod.rs | 4 +-- ethcore/src/miner/pool_client.rs | 2 +- .../src/miner/service_transaction_checker.rs | 4 +-- ethcore/src/miner/stratum.rs | 3 +-- ethcore/src/pod_account.rs | 3 +-- ethcore/src/pod_state.rs | 2 +- ethcore/src/snapshot/account.rs | 2 +- ethcore/src/snapshot/block.rs | 2 +- ethcore/src/snapshot/consensus/authority.rs | 2 +- ethcore/src/snapshot/consensus/mod.rs | 3 +-- ethcore/src/snapshot/consensus/work.rs | 2 +- ethcore/src/snapshot/error.rs | 2 +- ethcore/src/snapshot/io.rs | 3 +-- ethcore/src/snapshot/mod.rs | 2 +- ethcore/src/snapshot/service.rs | 2 +- ethcore/src/snapshot/tests/helpers.rs | 2 +- ethcore/src/snapshot/tests/mod.rs | 2 +- .../src/snapshot/tests/proof_of_authority.rs | 3 +-- ethcore/src/snapshot/tests/proof_of_work.rs | 2 +- ethcore/src/snapshot/tests/service.rs | 2 +- ethcore/src/snapshot/tests/state.rs | 2 +- ethcore/src/snapshot/traits.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 | 4 +-- ethcore/src/state/account.rs | 2 +- ethcore/src/state/backend.rs | 2 +- ethcore/src/state/mod.rs | 3 +-- ethcore/src/state/substate.rs | 2 +- ethcore/src/state_db.rs | 2 +- ethcore/src/test_helpers.rs | 3 +-- ethcore/src/test_helpers_internal.rs | 2 +- ethcore/src/tests/client.rs | 4 +-- ethcore/src/tests/mod.rs | 2 +- ethcore/src/tests/trace.rs | 2 +- ethcore/src/trace/config.rs | 2 +- ethcore/src/trace/db.rs | 3 +-- 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/trace/types/error.rs | 2 +- ethcore/src/trace/types/filter.rs | 2 +- ethcore/src/trace/types/flat.rs | 2 +- ethcore/src/trace/types/localized.rs | 2 +- ethcore/src/trace/types/mod.rs | 2 +- ethcore/src/trace/types/trace.rs | 3 +-- ethcore/src/tx_filter.rs | 3 +-- 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 | 4 +-- ethcore/src/views/transaction.rs | 2 +- ethcore/src/views/view_rlp.rs | 4 +-- ethcore/stratum/src/lib.rs | 2 +- ethcore/stratum/src/traits.rs | 2 +- ethcore/sync/src/api.rs | 3 +-- ethcore/sync/src/block_sync.rs | 2 +- ethcore/sync/src/blocks.rs | 4 +-- ethcore/sync/src/chain/mod.rs | 3 +-- ethcore/sync/src/lib.rs | 2 +- ethcore/sync/src/light_sync/mod.rs | 2 +- ethcore/sync/src/light_sync/response.rs | 2 +- ethcore/sync/src/light_sync/sync_round.rs | 2 +- ethcore/sync/src/light_sync/tests/mod.rs | 2 +- ethcore/sync/src/light_sync/tests/test_net.rs | 2 +- ethcore/sync/src/private_tx.rs | 2 +- ethcore/sync/src/snapshot.rs | 3 +-- ethcore/sync/src/sync_io.rs | 4 +-- ethcore/sync/src/tests/chain.rs | 4 +-- ethcore/sync/src/tests/consensus.rs | 2 +- ethcore/sync/src/tests/helpers.rs | 2 +- ethcore/sync/src/tests/mod.rs | 2 +- ethcore/sync/src/tests/private.rs | 2 +- ethcore/sync/src/tests/rpc.rs | 2 +- ethcore/sync/src/tests/snapshot.rs | 3 +-- ethcore/sync/src/transactions_stats.rs | 2 +- ethcore/transaction/src/error.rs | 3 +-- ethcore/transaction/src/lib.rs | 2 +- ethcore/transaction/src/transaction.rs | 2 +- ethcore/types/src/account_diff.rs | 3 +-- ethcore/types/src/basic_account.rs | 2 +- ethcore/types/src/block_status.rs | 2 +- ethcore/types/src/blockchain_info.rs | 2 +- ethcore/types/src/call_analytics.rs | 2 +- ethcore/types/src/filter.rs | 2 +- ethcore/types/src/ids.rs | 2 +- ethcore/types/src/lib.rs | 2 +- ethcore/types/src/log_entry.rs | 2 +- ethcore/types/src/mode.rs | 2 +- ethcore/types/src/pruning_info.rs | 2 +- ethcore/types/src/receipt.rs | 2 +- ethcore/types/src/restoration_status.rs | 3 +-- ethcore/types/src/security_level.rs | 2 +- ethcore/types/src/snapshot_manifest.rs | 3 +-- ethcore/types/src/state_diff.rs | 2 +- ethcore/types/src/trace_filter.rs | 2 +- ethcore/types/src/tree_route.rs | 2 +- ethcore/types/src/verification_queue_info.rs | 2 +- ethcore/vm/src/action_params.rs | 2 +- ethcore/vm/src/call_type.rs | 16 +++++++++++ ethcore/vm/src/env_info.rs | 2 +- ethcore/vm/src/error.rs | 3 +-- ethcore/vm/src/ext.rs | 2 +- ethcore/vm/src/lib.rs | 2 +- ethcore/vm/src/return_data.rs | 2 ++ ethcore/vm/src/schedule.rs | 2 +- ethcore/vm/src/tests.rs | 2 +- ethcore/wasm/run/src/fixture.rs | 18 ++++++++++++- ethcore/wasm/run/src/main.rs | 16 +++++++++++ ethcore/wasm/run/src/runner.rs | 16 +++++++++++ ethcore/wasm/src/env.rs | 4 +-- ethcore/wasm/src/lib.rs | 2 +- ethcore/wasm/src/panic_payload.rs | 2 +- ethcore/wasm/src/parser.rs | 4 +-- ethcore/wasm/src/tests.rs | 2 +- ethkey/cli/src/main.rs | 2 +- ethkey/src/brain.rs | 2 +- ethkey/src/brain_prefix.rs | 2 +- ethkey/src/brain_recover.rs | 4 +-- ethkey/src/crypto.rs | 2 +- ethkey/src/error.rs | 2 +- ethkey/src/extended.rs | 2 +- ethkey/src/keccak.rs | 2 +- ethkey/src/keypair.rs | 2 +- ethkey/src/lib.rs | 2 +- ethkey/src/math.rs | 2 +- ethkey/src/prefix.rs | 2 +- ethkey/src/random.rs | 2 +- ethkey/src/secret.rs | 2 +- ethkey/src/signature.rs | 2 +- ethstore/cli/src/crack.rs | 16 +++++++++++ ethstore/cli/src/main.rs | 2 +- ethstore/cli/tests/cli.rs | 3 +-- ethstore/src/account/cipher.rs | 2 +- ethstore/src/account/crypto.rs | 2 +- ethstore/src/account/kdf.rs | 2 +- ethstore/src/account/mod.rs | 3 +-- ethstore/src/account/safe_account.rs | 2 +- ethstore/src/account/version.rs | 2 +- ethstore/src/accounts_dir/disk.rs | 3 +-- ethstore/src/accounts_dir/memory.rs | 3 +-- ethstore/src/accounts_dir/mod.rs | 2 +- ethstore/src/accounts_dir/vault.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/bytes.rs | 3 +-- 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 | 3 +-- ethstore/src/json/mod.rs | 2 +- ethstore/src/json/presale.rs | 16 +++++++++++ ethstore/src/json/vault_file.rs | 2 +- ethstore/src/json/vault_key_file.rs | 2 +- ethstore/src/json/version.rs | 3 +-- ethstore/src/lib.rs | 2 +- ethstore/src/presale.rs | 16 +++++++++++ ethstore/src/random.rs | 3 +-- ethstore/src/secret_store.rs | 2 +- ethstore/tests/api.rs | 2 +- ethstore/tests/util/mod.rs | 2 +- ethstore/tests/util/transient_dir.rs | 2 +- evmbin/benches/mod.rs | 3 +-- evmbin/src/display/json.rs | 3 +-- evmbin/src/display/mod.rs | 2 +- evmbin/src/display/simple.rs | 2 +- evmbin/src/display/std_json.rs | 2 +- evmbin/src/info.rs | 2 +- evmbin/src/main.rs | 3 +-- hash-fetch/src/client.rs | 2 +- hash-fetch/src/lib.rs | 2 +- hash-fetch/src/urlhint.rs | 5 +--- hw/src/ledger.rs | 2 +- hw/src/lib.rs | 3 +-- hw/src/trezor.rs | 3 +-- ipfs/src/error.rs | 2 +- ipfs/src/lib.rs | 2 +- ipfs/src/route.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 | 3 +-- json/src/lib.rs | 2 +- json/src/maybe.rs | 15 +++++++++++ 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 | 3 +-- json/src/spec/ethash.rs | 2 +- json/src/spec/genesis.rs | 2 +- json/src/spec/hardcoded_sync.rs | 2 +- json/src/spec/mod.rs | 2 +- json/src/spec/null_engine.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/spec/tendermint.rs | 2 +- json/src/spec/validator_set.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/test/mod.rs | 3 +-- 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/mod.rs | 2 +- json/src/vm/test.rs | 2 +- json/src/vm/transaction.rs | 2 +- json/src/vm/vm.rs | 2 +- license_header | 2 +- local-store/src/lib.rs | 2 +- logger/src/lib.rs | 2 +- logger/src/rotating.rs | 3 +-- machine/src/lib.rs | 2 +- miner/src/external.rs | 3 +-- miner/src/gas_pricer.rs | 2 +- miner/src/lib.rs | 2 +- miner/src/pool/client.rs | 2 +- miner/src/pool/listener.rs | 4 +-- miner/src/pool/local_transactions.rs | 3 +-- miner/src/pool/mod.rs | 2 +- miner/src/pool/queue.rs | 3 +-- miner/src/pool/ready.rs | 3 +-- miner/src/pool/scoring.rs | 2 +- miner/src/pool/tests/client.rs | 2 +- miner/src/pool/tests/mod.rs | 4 +-- miner/src/pool/tests/tx.rs | 3 +-- miner/src/pool/verifier.rs | 3 +-- miner/src/work_notify.rs | 2 +- parity-clib-example/main.cpp | 16 +++++++++++ parity-clib/src/lib.rs | 2 +- parity/account.rs | 2 +- parity/blockchain.rs | 2 +- parity/cache.rs | 2 +- parity/cli/presets/mod.rs | 4 +-- parity/cli/usage.rs | 2 +- parity/configuration.rs | 3 +-- parity/dapps.rs | 2 +- parity/db/rocksdb/migration.rs | 3 +-- parity/deprecated.rs | 3 +-- parity/export_hardcoded_sync.rs | 2 +- parity/helpers.rs | 2 +- parity/ipfs.rs | 2 +- parity/light_helpers/epoch_fetch.rs | 2 +- parity/light_helpers/mod.rs | 2 +- parity/light_helpers/queue_cull.rs | 2 +- parity/modules.rs | 2 +- parity/params.rs | 2 +- parity/presale.rs | 2 +- parity/rpc.rs | 3 +-- parity/rpc_apis.rs | 2 +- parity/run.rs | 2 +- parity/secretstore.rs | 2 +- parity/signer.rs | 2 +- parity/snapshot.rs | 2 +- parity/stratum.rs | 2 +- parity/upgrade.rs | 2 +- parity/url.rs | 2 +- parity/user_defaults.rs | 2 +- parity/whisper.rs | 2 +- price-info/src/lib.rs | 2 +- registrar/src/lib.rs | 2 +- registrar/src/registrar.rs | 3 +-- rpc/src/authcodes.rs | 2 +- rpc/src/http_common.rs | 2 +- rpc/src/lib.rs | 2 +- rpc/src/tests/helpers.rs | 2 +- rpc/src/tests/mod.rs | 2 +- rpc/src/tests/rpc.rs | 2 +- rpc/src/tests/ws.rs | 3 +-- rpc/src/v1/extractors.rs | 2 +- rpc/src/v1/helpers/accounts.rs | 27 +++++++++++++++++++ rpc/src/v1/helpers/block_import.rs | 3 +-- rpc/src/v1/helpers/dapps.rs | 2 +- rpc/src/v1/helpers/dispatch.rs | 2 +- rpc/src/v1/helpers/errors.rs | 2 +- rpc/src/v1/helpers/fake_sign.rs | 2 +- rpc/src/v1/helpers/ipfs.rs | 2 +- rpc/src/v1/helpers/light_fetch.rs | 3 +-- rpc/src/v1/helpers/mod.rs | 2 +- rpc/src/v1/helpers/network_settings.rs | 3 ++- rpc/src/v1/helpers/nonce.rs | 2 +- rpc/src/v1/helpers/oneshot.rs | 2 +- rpc/src/v1/helpers/poll_filter.rs | 16 +++++++++++ rpc/src/v1/helpers/poll_manager.rs | 2 +- rpc/src/v1/helpers/requests.rs | 2 +- rpc/src/v1/helpers/secretstore.rs | 2 +- rpc/src/v1/helpers/signer.rs | 3 +-- rpc/src/v1/helpers/signing_queue.rs | 3 +-- rpc/src/v1/helpers/subscribers.rs | 3 +-- rpc/src/v1/helpers/subscription_manager.rs | 2 +- rpc/src/v1/impls/eth.rs | 3 +-- rpc/src/v1/impls/eth_filter.rs | 4 +-- rpc/src/v1/impls/eth_pubsub.rs | 2 +- rpc/src/v1/impls/light/eth.rs | 2 +- rpc/src/v1/impls/light/mod.rs | 2 +- rpc/src/v1/impls/light/net.rs | 2 +- rpc/src/v1/impls/light/parity.rs | 2 +- rpc/src/v1/impls/light/parity_set.rs | 2 +- rpc/src/v1/impls/light/trace.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/private.rs | 2 +- rpc/src/v1/impls/pubsub.rs | 2 +- rpc/src/v1/impls/rpc.rs | 2 +- rpc/src/v1/impls/secretstore.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/informant.rs | 2 +- rpc/src/v1/metadata.rs | 2 +- rpc/src/v1/mod.rs | 2 +- rpc/src/v1/tests/eth.rs | 2 +- rpc/src/v1/tests/helpers/dapps.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 | 3 +-- rpc/src/v1/tests/helpers/update_service.rs | 2 +- rpc/src/v1/tests/mocked/eth.rs | 6 +---- rpc/src/v1/tests/mocked/eth_pubsub.rs | 4 +-- 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 | 3 +-- rpc/src/v1/tests/mocked/parity_accounts.rs | 4 +-- rpc/src/v1/tests/mocked/parity_set.rs | 3 +-- rpc/src/v1/tests/mocked/personal.rs | 2 +- rpc/src/v1/tests/mocked/pubsub.rs | 3 +-- rpc/src/v1/tests/mocked/rpc.rs | 3 +-- rpc/src/v1/tests/mocked/secretstore.rs | 2 +- rpc/src/v1/tests/mocked/signer.rs | 4 +-- rpc/src/v1/tests/mocked/signing.rs | 4 +-- rpc/src/v1/tests/mocked/traces.rs | 2 +- rpc/src/v1/tests/mocked/web3.rs | 2 +- rpc/src/v1/tests/mod.rs | 16 +++++++++++ rpc/src/v1/traits/eth.rs | 2 +- rpc/src/v1/traits/eth_pubsub.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/private.rs | 2 +- rpc/src/v1/traits/pubsub.rs | 2 +- rpc/src/v1/traits/rpc.rs | 2 +- rpc/src/v1/traits/secretstore.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/account_info.rs | 3 +-- rpc/src/v1/types/block.rs | 2 +- rpc/src/v1/types/block_number.rs | 3 +-- rpc/src/v1/types/bytes.rs | 4 +-- rpc/src/v1/types/call_request.rs | 2 +- rpc/src/v1/types/confirmations.rs | 2 +- rpc/src/v1/types/consensus_status.rs | 2 +- rpc/src/v1/types/dapps.rs | 2 +- rpc/src/v1/types/derivation.rs | 2 +- rpc/src/v1/types/filter.rs | 2 +- rpc/src/v1/types/hash.rs | 2 +- rpc/src/v1/types/histogram.rs | 4 +-- rpc/src/v1/types/index.rs | 3 +-- rpc/src/v1/types/log.rs | 2 +- rpc/src/v1/types/mod.rs | 3 +-- rpc/src/v1/types/node_kind.rs | 2 +- rpc/src/v1/types/private_receipt.rs | 3 +-- rpc/src/v1/types/provenance.rs | 2 +- rpc/src/v1/types/pubsub.rs | 2 +- rpc/src/v1/types/receipt.rs | 3 +-- rpc/src/v1/types/rpc_settings.rs | 4 +-- rpc/src/v1/types/secretstore.rs | 2 +- rpc/src/v1/types/sync.rs | 2 +- rpc/src/v1/types/trace.rs | 3 +-- rpc/src/v1/types/trace_filter.rs | 2 +- rpc/src/v1/types/transaction.rs | 3 +-- rpc/src/v1/types/transaction_condition.rs | 3 +-- rpc/src/v1/types/transaction_request.rs | 3 +-- rpc/src/v1/types/uint.rs | 2 +- rpc/src/v1/types/work.rs | 3 +-- rpc_cli/src/lib.rs | 16 +++++++++++ rpc_client/src/client.rs | 16 +++++++++++ rpc_client/src/lib.rs | 16 +++++++++++ rpc_client/src/signer_client.rs | 16 +++++++++++ scripts/add_license.sh | 22 ++++++++++++--- scripts/remove_duplicate_empty_lines.sh | 6 +++++ secret_store/src/acl_storage.rs | 2 +- secret_store/src/key_server.rs | 2 +- .../key_version_negotiation_session.rs | 2 +- .../key_server_cluster/admin_sessions/mod.rs | 2 +- .../servers_set_change_session.rs | 2 +- .../admin_sessions/sessions_queue.rs | 2 +- .../admin_sessions/share_add_session.rs | 2 +- .../admin_sessions/share_change_session.rs | 2 +- .../client_sessions/decryption_session.rs | 2 +- .../client_sessions/encryption_session.rs | 2 +- .../client_sessions/generation_session.rs | 3 +-- .../key_server_cluster/client_sessions/mod.rs | 2 +- .../client_sessions/signing_session_ecdsa.rs | 3 +-- .../signing_session_schnorr.rs | 4 +-- .../src/key_server_cluster/cluster.rs | 2 +- .../key_server_cluster/cluster_sessions.rs | 2 +- .../cluster_sessions_creator.rs | 2 +- .../key_server_cluster/connection_trigger.rs | 2 +- .../connection_trigger_with_migration.rs | 2 +- .../src/key_server_cluster/io/deadline.rs | 2 +- .../src/key_server_cluster/io/handshake.rs | 2 +- .../src/key_server_cluster/io/message.rs | 2 +- secret_store/src/key_server_cluster/io/mod.rs | 2 +- .../src/key_server_cluster/io/read_header.rs | 2 +- .../src/key_server_cluster/io/read_message.rs | 2 +- .../src/key_server_cluster/io/read_payload.rs | 2 +- .../io/shared_tcp_stream.rs | 2 +- .../key_server_cluster/io/write_message.rs | 2 +- .../jobs/consensus_session.rs | 2 +- .../key_server_cluster/jobs/decryption_job.rs | 2 +- .../src/key_server_cluster/jobs/dummy_job.rs | 2 +- .../key_server_cluster/jobs/job_session.rs | 2 +- .../key_server_cluster/jobs/key_access_job.rs | 2 +- .../src/key_server_cluster/jobs/mod.rs | 2 +- .../jobs/servers_set_change_access_job.rs | 2 +- .../jobs/signing_job_ecdsa.rs | 2 +- .../jobs/signing_job_schnorr.rs | 4 +-- .../jobs/unknown_sessions_job.rs | 2 +- secret_store/src/key_server_cluster/math.rs | 2 +- .../src/key_server_cluster/message.rs | 2 +- secret_store/src/key_server_cluster/mod.rs | 2 +- .../net/accept_connection.rs | 2 +- .../src/key_server_cluster/net/connect.rs | 2 +- .../src/key_server_cluster/net/connection.rs | 2 +- .../src/key_server_cluster/net/mod.rs | 2 +- secret_store/src/key_server_set.rs | 2 +- secret_store/src/key_storage.rs | 3 +-- secret_store/src/lib.rs | 2 +- secret_store/src/listener/http_listener.rs | 2 +- secret_store/src/listener/mod.rs | 2 +- secret_store/src/listener/service_contract.rs | 2 +- .../listener/service_contract_aggregate.rs | 2 +- .../src/listener/service_contract_listener.rs | 2 +- secret_store/src/listener/tasks_queue.rs | 2 +- secret_store/src/node_key_pair.rs | 2 +- secret_store/src/serialization.rs | 2 +- secret_store/src/traits.rs | 2 +- secret_store/src/trusted_client.rs | 2 +- secret_store/src/types/all.rs | 2 +- secret_store/src/types/error.rs | 2 +- secret_store/src/types/mod.rs | 2 +- transaction-pool/src/error.rs | 2 +- transaction-pool/src/lib.rs | 2 +- transaction-pool/src/listener.rs | 2 +- transaction-pool/src/options.rs | 2 +- transaction-pool/src/pool.rs | 3 +-- transaction-pool/src/ready.rs | 2 +- transaction-pool/src/scoring.rs | 2 +- transaction-pool/src/status.rs | 2 +- transaction-pool/src/tests/helpers.rs | 2 +- transaction-pool/src/tests/mod.rs | 3 +-- transaction-pool/src/tests/tx_builder.rs | 2 +- transaction-pool/src/transactions.rs | 2 +- transaction-pool/src/verifier.rs | 2 +- updater/src/lib.rs | 2 +- updater/src/service.rs | 3 +-- updater/src/types/all.rs | 2 +- updater/src/types/mod.rs | 3 +-- updater/src/types/release_track.rs | 3 +-- updater/src/types/version_info.rs | 2 +- updater/src/updater.rs | 2 +- util/bloom/src/lib.rs | 4 +-- util/bloomchain/src/chain.rs | 16 +++++++++++ util/bloomchain/src/config.rs | 16 +++++++++++ util/bloomchain/src/database.rs | 16 +++++++++++ util/bloomchain/src/filter.rs | 16 +++++++++++ util/bloomchain/src/group/bridge.rs | 16 +++++++++++ util/bloomchain/src/group/chain.rs | 16 +++++++++++ util/bloomchain/src/group/database.rs | 16 +++++++++++ util/bloomchain/src/group/group.rs | 16 +++++++++++ util/bloomchain/src/group/mod.rs | 16 +++++++++++ util/bloomchain/src/group/position/manager.rs | 16 +++++++++++ util/bloomchain/src/group/position/mod.rs | 16 +++++++++++ .../bloomchain/src/group/position/position.rs | 16 +++++++++++ util/bloomchain/src/lib.rs | 16 +++++++++++ util/bloomchain/src/number.rs | 16 +++++++++++ util/bloomchain/src/position/manager.rs | 16 +++++++++++ util/bloomchain/src/position/mod.rs | 16 +++++++++++ util/bloomchain/src/position/position.rs | 16 +++++++++++ util/bloomchain/tests/bloomchain.rs | 18 +++++++++++-- util/bloomchain/tests/groupchain.rs | 19 ++++++++++--- util/bloomchain/tests/util/db.rs | 16 +++++++++++ util/bloomchain/tests/util/each.rs | 16 +++++++++++ util/bloomchain/tests/util/from_hex.rs | 16 +++++++++++ util/bloomchain/tests/util/mod.rs | 16 +++++++++++ util/bloomchain/tests/util/random.rs | 16 +++++++++++ util/bytes/src/lib.rs | 2 +- util/dir/src/helpers.rs | 2 +- util/dir/src/lib.rs | 2 +- util/error/src/lib.rs | 3 +-- util/fetch/src/client.rs | 2 +- util/fetch/src/lib.rs | 2 +- util/hash/benches/keccak_256.rs | 18 ++++++++++++- util/hash/src/lib.rs | 3 +-- util/hashdb/src/lib.rs | 2 +- util/io/src/lib.rs | 2 +- util/io/src/service_mio.rs | 2 +- util/io/src/service_non_mio.rs | 2 +- util/io/src/worker.rs | 2 +- util/journaldb/src/archivedb.rs | 2 +- util/journaldb/src/earlymergedb.rs | 3 +-- util/journaldb/src/lib.rs | 2 +- util/journaldb/src/overlaydb.rs | 2 +- util/journaldb/src/overlayrecentdb.rs | 2 +- util/journaldb/src/refcounteddb.rs | 2 +- util/journaldb/src/traits.rs | 2 +- util/kvdb-memorydb/src/lib.rs | 2 +- util/kvdb-rocksdb/src/lib.rs | 3 +-- util/kvdb/src/lib.rs | 2 +- util/macros/src/lib.rs | 2 +- util/mem/src/lib.rs | 3 +-- util/memory_cache/src/lib.rs | 2 +- util/memorydb/src/lib.rs | 2 +- util/migration-rocksdb/src/lib.rs | 2 +- util/migration-rocksdb/tests/tests.rs | 3 +-- util/network-devp2p/src/connection.rs | 2 +- util/network-devp2p/src/discovery.rs | 2 +- util/network-devp2p/src/handshake.rs | 3 +-- util/network-devp2p/src/host.rs | 3 +-- util/network-devp2p/src/ip_utils.rs | 4 +-- util/network-devp2p/src/lib.rs | 2 +- util/network-devp2p/src/node_table.rs | 2 +- util/network-devp2p/src/service.rs | 2 +- util/network-devp2p/src/session.rs | 3 +-- util/network-devp2p/tests/tests.rs | 3 +-- util/network/src/connection_filter.rs | 2 +- util/network/src/error.rs | 2 +- util/network/src/lib.rs | 2 +- util/panic_hook/src/lib.rs | 4 +-- util/path/src/lib.rs | 3 +-- util/patricia_trie/src/fatdb.rs | 2 +- util/patricia_trie/src/fatdbmut.rs | 2 +- util/patricia_trie/src/lib.rs | 2 +- util/patricia_trie/src/lookup.rs | 2 +- util/patricia_trie/src/nibbleslice.rs | 2 +- util/patricia_trie/src/nibblevec.rs | 2 +- util/patricia_trie/src/node.rs | 2 +- util/patricia_trie/src/recorder.rs | 2 +- util/patricia_trie/src/sectriedb.rs | 2 +- util/patricia_trie/src/sectriedbmut.rs | 2 +- util/patricia_trie/src/triedb.rs | 2 +- util/patricia_trie/src/triedbmut.rs | 3 +-- util/plain_hasher/benches/bench.rs | 16 +++++++++++ util/plain_hasher/src/lib.rs | 16 +++++++++++ util/reactor/src/lib.rs | 4 +-- util/rlp/src/rlpin.rs | 1 - util/rlp/src/stream.rs | 2 -- util/rlp_compress/src/lib.rs | 1 - util/rlp_compress/tests/compress.rs | 16 +++++++++++ util/rlp_derive/src/de.rs | 18 +++++++++++-- util/rlp_derive/src/en.rs | 17 +++++++++++- util/rlp_derive/src/lib.rs | 16 +++++++++++ util/rlp_derive/tests/rlp.rs | 17 +++++++++++- util/stats/src/lib.rs | 3 +-- util/stop-guard/src/lib.rs | 2 +- util/trace-time/src/lib.rs | 2 +- util/trie-standardmap/src/lib.rs | 2 +- util/triehash/src/lib.rs | 4 +-- util/unexpected/src/lib.rs | 2 +- util/using_queue/src/lib.rs | 2 +- util/version/build.rs | 2 +- util/version/src/lib.rs | 2 +- whisper/src/lib.rs | 2 +- whisper/src/message.rs | 2 +- whisper/src/net/mod.rs | 2 +- whisper/src/net/tests.rs | 2 +- whisper/src/rpc/crypto.rs | 2 +- whisper/src/rpc/filter.rs | 2 +- whisper/src/rpc/key_store.rs | 2 +- whisper/src/rpc/mod.rs | 2 +- whisper/src/rpc/payload.rs | 3 +-- whisper/src/rpc/types.rs | 2 +- windows/ptray/ptray.cpp | 3 +-- 807 files changed, 1635 insertions(+), 986 deletions(-) create mode 100644 rpc/src/v1/helpers/accounts.rs create mode 100755 scripts/remove_duplicate_empty_lines.sh diff --git a/chainspec/src/main.rs b/chainspec/src/main.rs index bcef53f3f0..708d74b503 100644 --- a/chainspec/src/main.rs +++ b/chainspec/src/main.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 serde_json; extern crate serde_ignored; extern crate ethjson; diff --git a/dapps/js-glue/build.rs b/dapps/js-glue/build.rs index 442abf7dfb..19d422ab23 100644 --- a/dapps/js-glue/build.rs +++ b/dapps/js-glue/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - #[cfg(feature = "with-syntex")] mod inner { extern crate syntex; diff --git a/dapps/js-glue/src/build.rs b/dapps/js-glue/src/build.rs index 31f27306a9..76b0a8714c 100644 --- a/dapps/js-glue/src/build.rs +++ b/dapps/js-glue/src/build.rs @@ -1,3 +1,18 @@ +// Copyright 2015-2018 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 . #[cfg(feature = "with-syntex")] pub mod inner { diff --git a/dapps/js-glue/src/codegen.rs b/dapps/js-glue/src/codegen.rs index c6e948820f..4b6c4445d7 100644 --- a/dapps/js-glue/src/codegen.rs +++ b/dapps/js-glue/src/codegen.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 d1d1cdda91..f89fcefc76 100644 --- a/dapps/js-glue/src/js.rs +++ b/dapps/js-glue/src/js.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 143dd1fc8b..f8ada2541e 100644 --- a/dapps/js-glue/src/lib.rs +++ b/dapps/js-glue/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - #![cfg_attr(not(feature = "with-syntex"), feature(rustc_private, plugin))] #![cfg_attr(not(feature = "with-syntex"), plugin(quasi_macros))] diff --git a/dapps/js-glue/src/lib.rs.in b/dapps/js-glue/src/lib.rs.in index 99a253013d..b78eae1098 100644 --- a/dapps/js-glue/src/lib.rs.in +++ b/dapps/js-glue/src/lib.rs.in @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -8,11 +8,12 @@ // 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 +// 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 . +// along with Parity. If not, see . + extern crate quasi; diff --git a/dapps/node-health/src/health.rs b/dapps/node-health/src/health.rs index ab300a4a77..430061ea2b 100644 --- a/dapps/node-health/src/health.rs +++ b/dapps/node-health/src/health.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/node-health/src/lib.rs b/dapps/node-health/src/lib.rs index b0eb133ee3..13529004a6 100644 --- a/dapps/node-health/src/lib.rs +++ b/dapps/node-health/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/node-health/src/time.rs b/dapps/node-health/src/time.rs index c3da050a47..9dfb3aa87f 100644 --- a/dapps/node-health/src/time.rs +++ b/dapps/node-health/src/time.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/node-health/src/types.rs b/dapps/node-health/src/types.rs index ae883a626b..76fd3682f9 100644 --- a/dapps/node-health/src/types.rs +++ b/dapps/node-health/src/types.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a9f9af293b..e6bba899f9 100644 --- a/dapps/src/api/api.rs +++ b/dapps/src/api/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 4ffb9f791a..c18eb189ea 100644 --- a/dapps/src/api/mod.rs +++ b/dapps/src/api/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c8d25c1445..5fe81eaa19 100644 --- a/dapps/src/api/response.rs +++ b/dapps/src/api/response.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6beca3b586..8bc451a849 100644 --- a/dapps/src/api/types.rs +++ b/dapps/src/api/types.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/app.rs b/dapps/src/apps/app.rs index c75346124c..15468b4f1d 100644 --- a/dapps/src/apps/app.rs +++ b/dapps/src/apps/app.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c81d4d9af9..b93acfaece 100644 --- a/dapps/src/apps/cache.rs +++ b/dapps/src/apps/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/installers.rs b/dapps/src/apps/fetcher/installers.rs index 5bde5cf999..99b6be218b 100644 --- a/dapps/src/apps/fetcher/installers.rs +++ b/dapps/src/apps/fetcher/installers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/mod.rs b/dapps/src/apps/fetcher/mod.rs index 8ed3024fdf..78be4f4cb3 100644 --- a/dapps/src/apps/fetcher/mod.rs +++ b/dapps/src/apps/fetcher/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3d93a2fae1..0139e0ec52 100644 --- a/dapps/src/apps/fs.rs +++ b/dapps/src/apps/fs.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -78,7 +78,6 @@ pub fn local_endpoint>(path: P, embeddable: Embeddable, pool: Cpu }) } - fn local_dapp(name: String, path: PathBuf) -> LocalDapp { // try to get manifest file let info = read_manifest(&name, path.clone()); @@ -102,7 +101,6 @@ pub fn local_endpoints>(dapps_path: P, embeddable: Embeddable, po pages } - fn local_dapps(dapps_path: &Path) -> Vec { let files = fs::read_dir(dapps_path); if let Err(e) = files { diff --git a/dapps/src/apps/manifest.rs b/dapps/src/apps/manifest.rs index e320482195..4d71af40fe 100644 --- a/dapps/src/apps/manifest.rs +++ b/dapps/src/apps/manifest.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 21947b928b..32bd7ee0fd 100644 --- a/dapps/src/apps/mod.rs +++ b/dapps/src/apps/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/ui.rs b/dapps/src/apps/ui.rs index 39da14e5b9..696ed2523d 100644 --- a/dapps/src/apps/ui.rs +++ b/dapps/src/apps/ui.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 fd05445c2a..948f412b38 100644 --- a/dapps/src/endpoint.rs +++ b/dapps/src/endpoint.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c7eccf474e..ec4d4f2eff 100644 --- a/dapps/src/handlers/content.rs +++ b/dapps/src/handlers/content.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 375f047906..d7484b6d15 100644 --- a/dapps/src/handlers/echo.rs +++ b/dapps/src/handlers/echo.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 1408d634db..860fe998c4 100644 --- a/dapps/src/handlers/fetch.rs +++ b/dapps/src/handlers/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -102,7 +102,6 @@ impl FetchControl { } } - enum WaitState { Waiting(oneshot::Receiver), Done(endpoint::Response), diff --git a/dapps/src/handlers/mod.rs b/dapps/src/handlers/mod.rs index f78f46c764..fad9c40416 100644 --- a/dapps/src/handlers/mod.rs +++ b/dapps/src/handlers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/reader.rs b/dapps/src/handlers/reader.rs index 85a351c7b0..3b0aa5449b 100644 --- a/dapps/src/handlers/reader.rs +++ b/dapps/src/handlers/reader.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 cb1eda2dd5..c8bf837d85 100644 --- a/dapps/src/handlers/redirect.rs +++ b/dapps/src/handlers/redirect.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/streaming.rs b/dapps/src/handlers/streaming.rs index 269e4c5d2a..4dfd2c4afa 100644 --- a/dapps/src/handlers/streaming.rs +++ b/dapps/src/handlers/streaming.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c4e244b251..255560e422 100644 --- a/dapps/src/lib.rs +++ b/dapps/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -85,7 +85,6 @@ use node_health::NodeHealth; pub use registrar::{RegistrarClient, Asynchronous}; pub use node_health::SyncStatus; - /// Validates Web Proxy tokens pub trait WebProxyTokens: Send + Sync { /// Should return a domain allowed to be accessed by this token or `None` if the token is not valid diff --git a/dapps/src/page/builtin.rs b/dapps/src/page/builtin.rs index 150cfe8642..b9f2fcdac5 100644 --- a/dapps/src/page/builtin.rs +++ b/dapps/src/page/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -146,7 +146,6 @@ impl From for EndpointInfo { } } - struct BuiltinFile { content_type: Mime, content: io::Cursor<&'static [u8]>, diff --git a/dapps/src/page/handler.rs b/dapps/src/page/handler.rs index 687c8e1e52..15e2b10c50 100644 --- a/dapps/src/page/handler.rs +++ b/dapps/src/page/handler.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a1746efcd2..f30af45237 100644 --- a/dapps/src/page/local.rs +++ b/dapps/src/page/local.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -92,7 +92,6 @@ impl Dapp { LocalFile::from_path(&file_path, mime) } - pub fn to_response(&self, path: &EndpointPath) -> Response { let (reader, response) = handler::PageHandler { file: self.get_file(path), diff --git a/dapps/src/page/mod.rs b/dapps/src/page/mod.rs index 420707bfe1..65385320c4 100644 --- a/dapps/src/page/mod.rs +++ b/dapps/src/page/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,10 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - pub mod builtin; pub mod local; mod handler; pub use self::handler::PageCache; - diff --git a/dapps/src/proxypac.rs b/dapps/src/proxypac.rs index 85ac11423a..4e11f3ea6b 100644 --- a/dapps/src/proxypac.rs +++ b/dapps/src/proxypac.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -64,5 +64,3 @@ function FindProxyForURL(url, host) {{ )) } } - - diff --git a/dapps/src/router.rs b/dapps/src/router.rs index d5f4647049..565874f6a8 100644 --- a/dapps/src/router.rs +++ b/dapps/src/router.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3ae3f7cbbf..d31f796d57 100644 --- a/dapps/src/tests/api.rs +++ b/dapps/src/tests/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -63,7 +63,6 @@ fn should_handle_ping() { assert_security_headers(&response.headers); } - #[test] fn should_try_to_resolve_dapp() { // given diff --git a/dapps/src/tests/fetch.rs b/dapps/src/tests/fetch.rs index 59eeaf8d66..bbd766a552 100644 --- a/dapps/src/tests/fetch.rs +++ b/dapps/src/tests/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -383,7 +383,6 @@ fn should_correctly_handle_long_label_when_splitted() { fetch.assert_no_more_requests(); } - #[test] fn should_support_base32_encoded_web_urls_as_path() { // given diff --git a/dapps/src/tests/helpers/fetch.rs b/dapps/src/tests/helpers/fetch.rs index 51c98db531..4affffe6ef 100644 --- a/dapps/src/tests/helpers/fetch.rs +++ b/dapps/src/tests/helpers/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/mod.rs b/dapps/src/tests/helpers/mod.rs index 41df0db61b..aa76089794 100644 --- a/dapps/src/tests/helpers/mod.rs +++ b/dapps/src/tests/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -140,7 +140,6 @@ pub fn assert_security_headers_for_embed(headers: &[String]) { http_client::assert_security_headers_present(headers, Some(SIGNER_PORT)) } - /// Webapps HTTP+RPC server build. pub struct ServerBuilder { dapps_path: PathBuf, diff --git a/dapps/src/tests/helpers/registrar.rs b/dapps/src/tests/helpers/registrar.rs index e770146f5a..b9acb1afc3 100644 --- a/dapps/src/tests/helpers/registrar.rs +++ b/dapps/src/tests/helpers/registrar.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/home.rs b/dapps/src/tests/home.rs index fa5c5b4c46..024261d5df 100644 --- a/dapps/src/tests/home.rs +++ b/dapps/src/tests/home.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a47294392e..38a1d6f17a 100644 --- a/dapps/src/tests/mod.rs +++ b/dapps/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -24,4 +24,3 @@ mod home; mod redirection; mod rpc; mod validation; - diff --git a/dapps/src/tests/redirection.rs b/dapps/src/tests/redirection.rs index b7f72009f7..722ade25b9 100644 --- a/dapps/src/tests/redirection.rs +++ b/dapps/src/tests/redirection.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -160,7 +160,6 @@ fn should_serve_rpc_at_slash_rpc() { assert_eq!(response.body, format!("4C\n{}\n\n0\n\n", r#"{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}"#)); } - #[test] fn should_serve_proxy_pac() { // given diff --git a/dapps/src/tests/rpc.rs b/dapps/src/tests/rpc.rs index 0cfc2c5a81..326fcd72a6 100644 --- a/dapps/src/tests/rpc.rs +++ b/dapps/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 bd97c940a0..ed4a3dc2f0 100644 --- a/dapps/src/tests/validation.rs +++ b/dapps/src/tests/validation.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/web.rs b/dapps/src/web.rs index 86c0ac28d6..14f215ca45 100644 --- a/dapps/src/web.rs +++ b/dapps/src/web.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -168,4 +168,3 @@ impl ContentValidator for WebInstaller { Ok(ValidatorResponse::Streaming(handler)) } } - diff --git a/dapps/ui/src/lib.rs b/dapps/ui/src/lib.rs index aa1c867366..f04f755a99 100644 --- a/dapps/ui/src/lib.rs +++ b/dapps/ui/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - #[cfg(feature = "parity-ui-dev")] mod inner { extern crate parity_ui_dev; diff --git a/devtools/src/http_client.rs b/devtools/src/http_client.rs index ab23410592..e2f33d4257 100644 --- a/devtools/src/http_client.rs +++ b/devtools/src/http_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 efaf4b9351..6fdbc8d890 100644 --- a/devtools/src/lib.rs +++ b/devtools/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/cache.rs b/ethash/src/cache.rs index eef426bcf1..21bd0e231e 100644 --- a/ethash/src/cache.rs +++ b/ethash/src/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/compute.rs b/ethash/src/compute.rs index de2b57637f..fa95038d18 100644 --- a/ethash/src/compute.rs +++ b/ethash/src/compute.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/keccak.rs b/ethash/src/keccak.rs index 36fb173547..ab6be94dca 100644 --- a/ethash/src/keccak.rs +++ b/ethash/src/keccak.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 9d0c669d9c..69b5a1d115 100644 --- a/ethash/src/lib.rs +++ b/ethash/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/seed_compute.rs b/ethash/src/seed_compute.rs index 04774b3e39..bc6f1d51e1 100644 --- a/ethash/src/seed_compute.rs +++ b/ethash/src/seed_compute.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/shared.rs b/ethash/src/shared.rs index 39e1c8eb88..90969c5222 100644 --- a/ethash/src/shared.rs +++ b/ethash/src/shared.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/benches/evm.rs b/ethcore/benches/evm.rs index 9fe2657d61..c68adc9878 100644 --- a/ethcore/benches/evm.rs +++ b/ethcore/benches/evm.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -28,7 +28,6 @@ extern crate ethcore_bigint; use self::test::{Bencher}; use rand::{StdRng}; - #[bench] fn bn_128_pairing(b: &mut Bencher) { use bn::{pairing, G1, G2, Fr, Group}; @@ -92,4 +91,3 @@ fn ecrecover(b: &mut Bencher) { let _ = ec_recover(&s, &hash); }); } - diff --git a/ethcore/crypto/src/aes.rs b/ethcore/crypto/src/aes.rs index 79a8dcc86d..42a26fad0d 100644 --- a/ethcore/crypto/src/aes.rs +++ b/ethcore/crypto/src/aes.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -51,4 +51,3 @@ pub fn decrypt_128_cbc(k: &[u8], iv: &[u8], encrypted: &[u8], dest: &mut [u8]) - encryptor.decrypt(&mut RefReadBuffer::new(encrypted), &mut buffer, true)?; Ok(len - buffer.remaining()) } - diff --git a/ethcore/crypto/src/aes_gcm.rs b/ethcore/crypto/src/aes_gcm.rs index 178b5d1e12..819c613197 100644 --- a/ethcore/crypto/src/aes_gcm.rs +++ b/ethcore/crypto/src/aes_gcm.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -196,4 +196,3 @@ mod tests { assert_eq!(plaintext, &message[..]) } } - diff --git a/ethcore/crypto/src/digest.rs b/ethcore/crypto/src/digest.rs index 095a8ca262..b2be0b8ed1 100644 --- a/ethcore/crypto/src/digest.rs +++ b/ethcore/crypto/src/digest.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/crypto/src/error.rs b/ethcore/crypto/src/error.rs index 4de3b80036..4e5582e196 100644 --- a/ethcore/crypto/src/error.rs +++ b/ethcore/crypto/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -80,4 +80,3 @@ impl From for SymmError { SymmError(PrivSymmErr::RustCrypto(e)) } } - diff --git a/ethcore/crypto/src/hmac.rs b/ethcore/crypto/src/hmac.rs index 7327250442..ff337ed024 100644 --- a/ethcore/crypto/src/hmac.rs +++ b/ethcore/crypto/src/hmac.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -86,4 +86,3 @@ impl VerifyKey { pub fn verify(k: &VerifyKey, data: &[u8], sig: &[u8]) -> bool { hmac::verify(&k.0, data, sig).is_ok() } - diff --git a/ethcore/crypto/src/lib.rs b/ethcore/crypto/src/lib.rs index 0ee42e3599..459c790319 100644 --- a/ethcore/crypto/src/lib.rs +++ b/ethcore/crypto/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -74,4 +74,3 @@ pub fn derive_mac(derived_left_bits: &[u8], cipher_text: &[u8]) -> Vec { pub fn is_equal(a: &[u8], b: &[u8]) -> bool { ring::constant_time::verify_slices_are_equal(a, b).is_ok() } - diff --git a/ethcore/crypto/src/pbkdf2.rs b/ethcore/crypto/src/pbkdf2.rs index b4c993c513..d210f6f659 100644 --- a/ethcore/crypto/src/pbkdf2.rs +++ b/ethcore/crypto/src/pbkdf2.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -26,4 +26,3 @@ pub fn sha256(iter: u32, salt: Salt, sec: Secret, out: &mut [u8; 32]) { pub fn sha512(iter: u32, salt: Salt, sec: Secret, out: &mut [u8; 64]) { ring::pbkdf2::derive(&ring::digest::SHA512, iter, salt.0, sec.0, &mut out[..]) } - diff --git a/ethcore/crypto/src/scrypt.rs b/ethcore/crypto/src/scrypt.rs index 684ab2c572..de3cd55553 100644 --- a/ethcore/crypto/src/scrypt.rs +++ b/ethcore/crypto/src/scrypt.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -36,4 +36,3 @@ pub fn derive_key(pass: &str, salt: &[u8; 32], n: u32, p: u32, r: u32) -> Result let derived_left_bits = &derived_key[KEY_LENGTH_AES..KEY_LENGTH]; Ok((derived_right_bits.to_vec(), derived_left_bits.to_vec())) } - diff --git a/ethcore/evm/src/benches/mod.rs b/ethcore/evm/src/benches/mod.rs index c87fda7bbf..244c26985a 100644 --- a/ethcore/evm/src/benches/mod.rs +++ b/ethcore/evm/src/benches/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/evm.rs b/ethcore/evm/src/evm.rs index 16dffe77c5..4c85b37028 100644 --- a/ethcore/evm/src/evm.rs +++ b/ethcore/evm/src/evm.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/factory.rs b/ethcore/evm/src/factory.rs index af38afede3..65a683cd4a 100644 --- a/ethcore/evm/src/factory.rs +++ b/ethcore/evm/src/factory.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/instructions.rs b/ethcore/evm/src/instructions.rs index 6ecfc7f673..76f99a9333 100644 --- a/ethcore/evm/src/instructions.rs +++ b/ethcore/evm/src/instructions.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/interpreter/gasometer.rs b/ethcore/evm/src/interpreter/gasometer.rs index beb22447fe..85ea8ee487 100644 --- a/ethcore/evm/src/interpreter/gasometer.rs +++ b/ethcore/evm/src/interpreter/gasometer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -316,7 +316,6 @@ impl Gasometer { } } - #[inline] fn mem_needed_const(mem: &U256, add: usize) -> vm::Result { Gas::from_u256(overflowing!(mem.overflowing_add(U256::from(add)))) @@ -369,4 +368,3 @@ fn test_calculate_mem_cost() { assert_eq!(new_mem_gas, 3); assert_eq!(mem_size, 32); } - diff --git a/ethcore/evm/src/interpreter/informant.rs b/ethcore/evm/src/interpreter/informant.rs index f07d11ff7a..ca04be844f 100644 --- a/ethcore/evm/src/interpreter/informant.rs +++ b/ethcore/evm/src/interpreter/informant.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/interpreter/memory.rs b/ethcore/evm/src/interpreter/memory.rs index f646d01985..843aeef3b5 100644 --- a/ethcore/evm/src/interpreter/memory.rs +++ b/ethcore/evm/src/interpreter/memory.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/interpreter/mod.rs b/ethcore/evm/src/interpreter/mod.rs index 160a2e5b1d..ef9b3fb973 100644 --- a/ethcore/evm/src/interpreter/mod.rs +++ b/ethcore/evm/src/interpreter/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -103,7 +103,6 @@ enum InstructionResult { StopExecution, } - /// Intepreter EVM implementation pub struct Interpreter { mem: Vec, @@ -959,7 +958,6 @@ fn address_to_u256(value: Address) -> U256 { U256::from(&*H256::from(value)) } - #[cfg(test)] mod tests { use std::sync::Arc; diff --git a/ethcore/evm/src/interpreter/shared_cache.rs b/ethcore/evm/src/interpreter/shared_cache.rs index 30bc5b677d..d4e992c90e 100644 --- a/ethcore/evm/src/interpreter/shared_cache.rs +++ b/ethcore/evm/src/interpreter/shared_cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -91,7 +91,6 @@ impl Default for SharedCache { } } - #[test] fn test_find_jump_destinations() { use rustc_hex::FromHex; diff --git a/ethcore/evm/src/interpreter/stack.rs b/ethcore/evm/src/interpreter/stack.rs index cbe40fb67f..3902b8ff76 100644 --- a/ethcore/evm/src/interpreter/stack.rs +++ b/ethcore/evm/src/interpreter/stack.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -95,4 +95,3 @@ impl Stack for VecStack { &self.stack[self.stack.len() - no_from_top .. self.stack.len()] } } - diff --git a/ethcore/evm/src/lib.rs b/ethcore/evm/src/lib.rs index 263a11d682..1b5610cef5 100644 --- a/ethcore/evm/src/lib.rs +++ b/ethcore/evm/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/tests.rs b/ethcore/evm/src/tests.rs index 9058d073e8..b62faf87d7 100644 --- a/ethcore/evm/src/tests.rs +++ b/ethcore/evm/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/evm/src/vmtype.rs b/ethcore/evm/src/vmtype.rs index b3a8aaf3e9..feb567b73d 100644 --- a/ethcore/evm/src/vmtype.rs +++ b/ethcore/evm/src/vmtype.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/cache.rs b/ethcore/light/src/cache.rs index b63fd07576..7b6324a991 100644 --- a/ethcore/light/src/cache.rs +++ b/ethcore/light/src/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/cht.rs b/ethcore/light/src/cht.rs index ffb7841f45..805cca3cbc 100644 --- a/ethcore/light/src/cht.rs +++ b/ethcore/light/src/cht.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -11,6 +11,9 @@ // 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 . + //! Canonical hash trie definitions and helper functions. //! //! Each CHT is a trie mapping block numbers to canonical hashes and total difficulty. diff --git a/ethcore/light/src/client/fetch.rs b/ethcore/light/src/client/fetch.rs index 86269c695f..b0f7353496 100644 --- a/ethcore/light/src/client/fetch.rs +++ b/ethcore/light/src/client/fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/header_chain.rs b/ethcore/light/src/client/header_chain.rs index 60c7d288a7..cb370da2a7 100644 --- a/ethcore/light/src/client/header_chain.rs +++ b/ethcore/light/src/client/header_chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/mod.rs b/ethcore/light/src/client/mod.rs index 82b424cc83..a1625b0e8f 100644 --- a/ethcore/light/src/client/mod.rs +++ b/ethcore/light/src/client/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -463,7 +463,6 @@ impl Client { loop { - let is_signal = { let auxiliary = AuxiliaryData { bytes: block.as_ref().map(|x| &x[..]), diff --git a/ethcore/light/src/client/service.rs b/ethcore/light/src/client/service.rs index a3ec8a3686..d1645cfe7e 100644 --- a/ethcore/light/src/client/service.rs +++ b/ethcore/light/src/client/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 9723854b8d..d7469fdcee 100644 --- a/ethcore/light/src/lib.rs +++ b/ethcore/light/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 613e26b1f1..a49ef79dc2 100644 --- a/ethcore/light/src/net/context.rs +++ b/ethcore/light/src/net/context.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -12,7 +12,7 @@ // 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 . +// along with Parity. If not, see . //! I/O and event context generalizations. @@ -46,7 +46,6 @@ pub trait IoContext { fn persistent_peer_id(&self, peer: PeerId) -> Option; } - impl IoContext for T where T: ?Sized + NetworkContext { fn send(&self, peer: PeerId, packet_id: u8, packet_body: Vec) { if let Err(e) = self.send(peer, packet_id, packet_body) { diff --git a/ethcore/light/src/net/error.rs b/ethcore/light/src/net/error.rs index 35349c5539..ec2a7f91c5 100644 --- a/ethcore/light/src/net/error.rs +++ b/ethcore/light/src/net/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/load_timer.rs b/ethcore/light/src/net/load_timer.rs index 2846a57384..0ad9627021 100644 --- a/ethcore/light/src/net/load_timer.rs +++ b/ethcore/light/src/net/load_timer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 d8a975dc3f..39f53445ad 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -86,7 +86,6 @@ pub const PROTOCOL_VERSIONS: &'static [(u8, u8)] = &[ /// Max protocol version. pub const MAX_PROTOCOL_VERSION: u8 = 1; - // packet ID definitions. mod packet { // the status packet. diff --git a/ethcore/light/src/net/request_credits.rs b/ethcore/light/src/net/request_credits.rs index 29570b613c..e97e1aad58 100644 --- a/ethcore/light/src/net/request_credits.rs +++ b/ethcore/light/src/net/request_credits.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/request_set.rs b/ethcore/light/src/net/request_set.rs index 27e6c28bc2..4170f8e632 100644 --- a/ethcore/light/src/net/request_set.rs +++ b/ethcore/light/src/net/request_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 c9ee3d760f..d89db173cb 100644 --- a/ethcore/light/src/net/status.rs +++ b/ethcore/light/src/net/status.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 3c04c0ffba..305ef9b354 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/on_demand/mod.rs b/ethcore/light/src/on_demand/mod.rs index 64794d49e7..c7cc5ef5e7 100644 --- a/ethcore/light/src/on_demand/mod.rs +++ b/ethcore/light/src/on_demand/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/on_demand/request.rs b/ethcore/light/src/on_demand/request.rs index 18a309ae96..4cac6b629d 100644 --- a/ethcore/light/src/on_demand/request.rs +++ b/ethcore/light/src/on_demand/request.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -520,7 +520,6 @@ impl IncompleteRequest for CheckedRequest { } } - fn adjust_refs(&mut self, mapping: F) where F: FnMut(usize) -> usize { match_me!(*self, (_, ref mut req) => req.adjust_refs(mapping)) } diff --git a/ethcore/light/src/on_demand/tests.rs b/ethcore/light/src/on_demand/tests.rs index 95aec273f8..d3cd137ec0 100644 --- a/ethcore/light/src/on_demand/tests.rs +++ b/ethcore/light/src/on_demand/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 aaa6f5858a..0e518ea772 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/transaction_queue.rs b/ethcore/light/src/transaction_queue.rs index ae3dc26915..e8880037a1 100644 --- a/ethcore/light/src/transaction_queue.rs +++ b/ethcore/light/src/transaction_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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 eba551b533..67e54141b2 100644 --- a/ethcore/light/src/types/mod.rs +++ b/ethcore/light/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/request/batch.rs b/ethcore/light/src/types/request/batch.rs index 21f1264672..16843ae02c 100644 --- a/ethcore/light/src/types/request/batch.rs +++ b/ethcore/light/src/types/request/batch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity 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/request/mod.rs b/ethcore/light/src/types/request/mod.rs index bda992df97..538aa0c6bf 100644 --- a/ethcore/light/src/types/request/mod.rs +++ b/ethcore/light/src/types/request/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -124,8 +124,6 @@ impl Field { } } - - // attempt conversion into scalar value. fn into_scalar(self) -> Result { match self { diff --git a/ethcore/node_filter/src/lib.rs b/ethcore/node_filter/src/lib.rs index c731ad356a..76f6fd18ff 100644 --- a/ethcore/node_filter/src/lib.rs +++ b/ethcore/node_filter/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -90,7 +90,6 @@ impl ConnectionFilter for NodeFilter { return *res; } - let address = self.contract_address; let own_low = H256::from_slice(&own_id[0..32]); let own_high = H256::from_slice(&own_id[32..64]); diff --git a/ethcore/private-tx/src/encryptor.rs b/ethcore/private-tx/src/encryptor.rs index b15acbee71..e171e3e606 100644 --- a/ethcore/private-tx/src/encryptor.rs +++ b/ethcore/private-tx/src/encryptor.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/private-tx/src/error.rs b/ethcore/private-tx/src/error.rs index 3b3c881a94..0456b33053 100644 --- a/ethcore/private-tx/src/error.rs +++ b/ethcore/private-tx/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -205,4 +205,3 @@ impl From> for Error where Error: From { Error::from(*err) } } - diff --git a/ethcore/private-tx/src/lib.rs b/ethcore/private-tx/src/lib.rs index 7aca4c85dc..31abdb1eca 100644 --- a/ethcore/private-tx/src/lib.rs +++ b/ethcore/private-tx/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/private-tx/src/messages.rs b/ethcore/private-tx/src/messages.rs index f465f752be..57362e7ce6 100644 --- a/ethcore/private-tx/src/messages.rs +++ b/ethcore/private-tx/src/messages.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/private-tx/src/private_transactions.rs b/ethcore/private-tx/src/private_transactions.rs index 1a018d927a..fcc6da514e 100644 --- a/ethcore/private-tx/src/private_transactions.rs +++ b/ethcore/private-tx/src/private_transactions.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/private-tx/tests/private_contract.rs b/ethcore/private-tx/tests/private_contract.rs index e7e608c2b6..bc678b1ab5 100644 --- a/ethcore/private-tx/tests/private_contract.rs +++ b/ethcore/private-tx/tests/private_contract.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/service/src/service.rs b/ethcore/service/src/service.rs index f703329d61..7248d97229 100644 --- a/ethcore/service/src/service.rs +++ b/ethcore/service/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 4e715766d7..8fc4b95c6e 100644 --- a/ethcore/src/account_db.rs +++ b/ethcore/src/account_db.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 9d6b814c6f..2ebefc988b 100644 --- a/ethcore/src/account_provider/mod.rs +++ b/ethcore/src/account_provider/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 1563d21bc6..d7725deb7e 100644 --- a/ethcore/src/account_provider/stores.rs +++ b/ethcore/src/account_provider/stores.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 4c47089677..682171170e 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 017c4f86ea..adfaf68aad 100644 --- a/ethcore/src/blockchain/best_block.rs +++ b/ethcore/src/blockchain/best_block.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 ee8a50d09d..6a48e92447 100644 --- a/ethcore/src/blockchain/block_info.rs +++ b/ethcore/src/blockchain/block_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 f2621d00e1..ee781ebe53 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 999be423df..0717011ae6 100644 --- a/ethcore/src/blockchain/cache.rs +++ b/ethcore/src/blockchain/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 312289b060..632f978ac5 100644 --- a/ethcore/src/blockchain/config.rs +++ b/ethcore/src/blockchain/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 3fb25e7b1b..30dbec707e 100644 --- a/ethcore/src/blockchain/extras.rs +++ b/ethcore/src/blockchain/extras.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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.rs b/ethcore/src/blockchain/generator.rs index e767f2211c..5a97f37f98 100644 --- a/ethcore/src/blockchain/generator.rs +++ b/ethcore/src/blockchain/generator.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 080d3b0682..d8b38e6335 100644 --- a/ethcore/src/blockchain/import_route.rs +++ b/ethcore/src/blockchain/import_route.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 f991692ded..6389f308aa 100644 --- a/ethcore/src/blockchain/mod.rs +++ b/ethcore/src/blockchain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/update.rs b/ethcore/src/blockchain/update.rs index b695b9236b..8960d795aa 100644 --- a/ethcore/src/blockchain/update.rs +++ b/ethcore/src/blockchain/update.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::collections::HashMap; use ethereum_types::H256; use header::BlockNumber; diff --git a/ethcore/src/blooms/bloom_group.rs b/ethcore/src/blooms/bloom_group.rs index 4b47b1ad94..0eb1e9c529 100644 --- a/ethcore/src/blooms/bloom_group.rs +++ b/ethcore/src/blooms/bloom_group.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 b1ea827926..1f9ddca7e0 100644 --- a/ethcore/src/blooms/group_position.rs +++ b/ethcore/src/blooms/group_position.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 a66485782b..7658446c74 100644 --- a/ethcore/src/blooms/mod.rs +++ b/ethcore/src/blooms/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 a0833cfb5e..61739c7b1d 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -703,7 +703,6 @@ mod tests { assert_eq!(f.cost(&input[..]), expected_cost.into()); } - // test for potential exp len overflow { let input = FromHex::from_hex("\ @@ -827,7 +826,6 @@ mod tests { assert_eq!(output, expected); } - // no input, should not fail { let mut empty = [0u8; 0]; @@ -859,7 +857,6 @@ mod tests { } } - #[test] fn bn128_mul() { diff --git a/ethcore/src/cache_manager.rs b/ethcore/src/cache_manager.rs index 7d91dcc0d0..4199cb1d59 100644 --- a/ethcore/src/cache_manager.rs +++ b/ethcore/src/cache_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/ancient_import.rs b/ethcore/src/client/ancient_import.rs index c2523a13a5..4586a04eed 100644 --- a/ethcore/src/client/ancient_import.rs +++ b/ethcore/src/client/ancient_import.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 8330fb40d9..62de03591d 100644 --- a/ethcore/src/client/chain_notify.rs +++ b/ethcore/src/client/chain_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 b469cf4518..9e2cfeff40 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -425,7 +425,6 @@ impl Importer { Ok(locked_block) } - /// Import a block with transaction receipts. /// /// The block is guaranteed to be the next best blocks in the @@ -918,7 +917,6 @@ impl Client { Arc::new(last_hashes) } - /// 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 { self.importer.import_verified_blocks(self) @@ -1566,7 +1564,6 @@ impl BlockChainClient for Client { }))) } - fn mode(&self) -> IpcMode { let r = self.mode.lock().clone().into(); trace!(target: "mode", "Asked for mode = {:?}. returning {:?}", &*self.mode.lock(), r); @@ -2280,7 +2277,6 @@ impl ProvingBlockChainClient for Client { ) } - fn epoch_signal(&self, hash: H256) -> Option> { // pending transitions are never deleted, and do not contain // finality proofs by definition. diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 9787f822a4..288de25e4b 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -110,7 +110,6 @@ impl From for Mode { } } - /// Client configuration. Includes configs for all sub-systems. #[derive(Debug, PartialEq, Default)] pub struct ClientConfig { diff --git a/ethcore/src/client/error.rs b/ethcore/src/client/error.rs index d2af13a3b2..0e6608c0ff 100644 --- a/ethcore/src/client/error.rs +++ b/ethcore/src/client/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/evm_test_client.rs b/ethcore/src/client/evm_test_client.rs index b91414ca8f..fbf57cbdc7 100644 --- a/ethcore/src/client/evm_test_client.rs +++ b/ethcore/src/client/evm_test_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/io_message.rs b/ethcore/src/client/io_message.rs index 817c726020..d388f5ed44 100644 --- a/ethcore/src/client/io_message.rs +++ b/ethcore/src/client/io_message.rs @@ -54,4 +54,3 @@ impl fmt::Debug for Callback { write!(fmt, "") } } - diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 4c410d3011..6e12c03052 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/private_notify.rs b/ethcore/src/client/private_notify.rs index 2b865a9e2c..d1fde555c9 100644 --- a/ethcore/src/client/private_notify.rs +++ b/ethcore/src/client/private_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 fab3234657..8acbde4f97 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -704,7 +704,6 @@ impl BlockChainClient for TestBlockChainClient { .map(|header| self.spec.engine.extra_info(&header)) } - fn block_status(&self, id: BlockId) -> BlockStatus { match id { BlockId::Number(number) if (number as usize) < self.blocks.read().len() => BlockStatus::InChain, diff --git a/ethcore/src/client/trace.rs b/ethcore/src/client/trace.rs index 75e0fe34a1..5f1b6c4f4d 100644 --- a/ethcore/src/client/trace.rs +++ b/ethcore/src/client/trace.rs @@ -1,3 +1,18 @@ +// Copyright 2015-2018 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 . //! Bridge between Tracedb and Blockchain. diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 358e24fa90..f0fae4b498 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 a1c7d6b0f5..39c30e9637 100644 --- a/ethcore/src/db.rs +++ b/ethcore/src/db.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/encoded.rs b/ethcore/src/encoded.rs index 5a2d376a2a..5bd723f0e2 100644 --- a/ethcore/src/encoded.rs +++ b/ethcore/src/encoded.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/finality.rs b/ethcore/src/engines/authority_round/finality.rs index 61f1c18229..3745cde96c 100644 --- a/ethcore/src/engines/authority_round/finality.rs +++ b/ethcore/src/engines/authority_round/finality.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/mod.rs b/ethcore/src/engines/authority_round/mod.rs index 02bb88c51f..067c754c7f 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -655,7 +655,6 @@ impl AuthorityRound { }).cloned().collect() } - fn clear_empty_steps(&self, step: U256) { // clear old `empty_steps` messages self.empty_steps.lock().retain(|e| U256::from(e.step) > step); diff --git a/ethcore/src/engines/basic_authority.rs b/ethcore/src/engines/basic_authority.rs index e99fd88dcb..dde0af2d96 100644 --- a/ethcore/src/engines/basic_authority.rs +++ b/ethcore/src/engines/basic_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/epoch.rs b/ethcore/src/engines/epoch.rs index 6975e8898b..53b540cabd 100644 --- a/ethcore/src/engines/epoch.rs +++ b/ethcore/src/engines/epoch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 c16203f105..a35dea5219 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 0878b4595f..54a9dde2e6 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 c6025e6247..f9e698307d 100644 --- a/ethcore/src/engines/null_engine.rs +++ b/ethcore/src/engines/null_engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/signer.rs b/ethcore/src/engines/signer.rs index d9e97fee06..965b619c7d 100644 --- a/ethcore/src/engines/signer.rs +++ b/ethcore/src/engines/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/tendermint/message.rs b/ethcore/src/engines/tendermint/message.rs index 17b79a80b8..ba8e4390ec 100644 --- a/ethcore/src/engines/tendermint/message.rs +++ b/ethcore/src/engines/tendermint/message.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -43,7 +43,6 @@ pub struct VoteStep { pub step: Step, } - impl VoteStep { pub fn new(height: Height, view: View, step: Step) -> Self { VoteStep { height: height, view: view, step: step } diff --git a/ethcore/src/engines/tendermint/mod.rs b/ethcore/src/engines/tendermint/mod.rs index 52bf5ff67b..967ef482a6 100644 --- a/ethcore/src/engines/tendermint/mod.rs +++ b/ethcore/src/engines/tendermint/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -359,7 +359,6 @@ impl Tendermint { && lock_change_view < self.view.load(AtomicOrdering::SeqCst) } - fn has_enough_any_votes(&self) -> bool { let step_votes = self.votes.count_round_votes(&VoteStep::new(self.height.load(AtomicOrdering::SeqCst), self.view.load(AtomicOrdering::SeqCst), *self.step.read())); self.check_above_threshold(step_votes).is_ok() diff --git a/ethcore/src/engines/tendermint/params.rs b/ethcore/src/engines/tendermint/params.rs index c1fd39eb1c..fbd3839cad 100644 --- a/ethcore/src/engines/tendermint/params.rs +++ b/ethcore/src/engines/tendermint/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/transition.rs b/ethcore/src/engines/transition.rs index a0469b6249..ddc9a70628 100644 --- a/ethcore/src/engines/transition.rs +++ b/ethcore/src/engines/transition.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/validator_set/contract.rs b/ethcore/src/engines/validator_set/contract.rs index 00f74fd2eb..c44f2ab303 100644 --- a/ethcore/src/engines/validator_set/contract.rs +++ b/ethcore/src/engines/validator_set/contract.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/validator_set/mod.rs b/ethcore/src/engines/validator_set/mod.rs index d439c69c2e..26b57d78f2 100644 --- a/ethcore/src/engines/validator_set/mod.rs +++ b/ethcore/src/engines/validator_set/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/validator_set/multi.rs b/ethcore/src/engines/validator_set/multi.rs index 89a33abc74..3ac58cd4dc 100644 --- a/ethcore/src/engines/validator_set/multi.rs +++ b/ethcore/src/engines/validator_set/multi.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/validator_set/safe_contract.rs b/ethcore/src/engines/validator_set/safe_contract.rs index f132a0bf9d..e55a0e3e36 100644 --- a/ethcore/src/engines/validator_set/safe_contract.rs +++ b/ethcore/src/engines/validator_set/safe_contract.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/validator_set/simple_list.rs b/ethcore/src/engines/validator_set/simple_list.rs index bb67c9778b..e1339250ef 100644 --- a/ethcore/src/engines/validator_set/simple_list.rs +++ b/ethcore/src/engines/validator_set/simple_list.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/validator_set/test.rs b/ethcore/src/engines/validator_set/test.rs index a6b8930454..6459803d19 100644 --- a/ethcore/src/engines/validator_set/test.rs +++ b/ethcore/src/engines/validator_set/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/vote_collector.rs b/ethcore/src/engines/vote_collector.rs index 7af66b30c5..f416d0c3f7 100644 --- a/ethcore/src/engines/vote_collector.rs +++ b/ethcore/src/engines/vote_collector.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 bec749297c..ba53b9f93e 100644 --- a/ethcore/src/error.rs +++ b/ethcore/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -299,7 +299,6 @@ error_chain! { } } - /// Result of import block operation. pub type ImportResult = EthcoreResult; diff --git a/ethcore/src/ethereum/denominations.rs b/ethcore/src/ethereum/denominations.rs index 4892770df1..4c51932543 100644 --- a/ethcore/src/ethereum/denominations.rs +++ b/ethcore/src/ethereum/denominations.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -35,4 +35,3 @@ pub fn shannon() -> U256 { U256::exp10(9) } #[inline] /// 1 Wei in Wei pub fn wei() -> U256 { U256::exp10(0) } - diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index 9b3945e38b..b51da58fec 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 5cf6462686..6456440759 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/executed.rs b/ethcore/src/executed.rs index 9ffd673154..3d0b9767c4 100644 --- a/ethcore/src/executed.rs +++ b/ethcore/src/executed.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 e29da093c7..f375f3c2e8 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 5d35d1109a..65d130c342 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 68a15f164a..b429073b30 100644 --- a/ethcore/src/factory.rs +++ b/ethcore/src/factory.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 3e9675aa35..5aa4be3237 100644 --- a/ethcore/src/header.rs +++ b/ethcore/src/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -338,7 +338,6 @@ fn change_field(hash: &mut Option, field: &mut T, value: T) where T: Pa } } - impl Decodable for Header { fn decode(r: &Rlp) -> Result { let mut blockheader = Header { diff --git a/ethcore/src/json_tests/chain.rs b/ethcore/src/json_tests/chain.rs index 89b8df4a26..814538cdbd 100644 --- a/ethcore/src/json_tests/chain.rs +++ b/ethcore/src/json_tests/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -152,4 +152,3 @@ mod block_tests { declare_test!{BlockchainTests_TransitionTests_bcHomesteadToDao, "BlockchainTests/TransitionTests/bcHomesteadToDao/"} declare_test!{BlockchainTests_TransitionTests_bcHomesteadToEIP150, "BlockchainTests/TransitionTests/bcHomesteadToEIP150/"} } - diff --git a/ethcore/src/json_tests/difficulty.rs b/ethcore/src/json_tests/difficulty.rs index c0d03c810b..d111f0890d 100644 --- a/ethcore/src/json_tests/difficulty.rs +++ b/ethcore/src/json_tests/difficulty.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -56,7 +56,6 @@ mod difficulty_test_byzantium { declare_test!{DifficultyTests_difficultyByzantium, "BasicTests/difficultyByzantium.json"} } - mod difficulty_test_foundation { use super::json_difficulty_test; use tempdir::TempDir; @@ -68,6 +67,3 @@ mod difficulty_test_foundation { declare_test!{DifficultyTests_difficultyMainNetwork, "BasicTests/difficultyMainNetwork.json"} } - - - diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index 404b1c25e6..5bda6c55a3 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 a0966a2d29..65cc6d2134 100644 --- a/ethcore/src/json_tests/mod.rs +++ b/ethcore/src/json_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 a55ab18443..45ec6f3fb0 100644 --- a/ethcore/src/json_tests/state.rs +++ b/ethcore/src/json_tests/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -135,4 +135,3 @@ mod state_tests { declare_test!{GeneralStateTest_stZeroCallsTest, "GeneralStateTests/stZeroCallsTest/"} declare_test!{GeneralStateTest_stZeroKnowledge, "GeneralStateTests/stZeroKnowledge/"} } - diff --git a/ethcore/src/json_tests/test_common.rs b/ethcore/src/json_tests/test_common.rs index 83f6b55272..6ce38b27a0 100644 --- a/ethcore/src/json_tests/test_common.rs +++ b/ethcore/src/json_tests/test_common.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 1be4900b12..295093305d 100644 --- a/ethcore/src/json_tests/transaction.rs +++ b/ethcore/src/json_tests/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 f5803d2d37..fae7cc7380 100644 --- a/ethcore/src/json_tests/trie.rs +++ b/ethcore/src/json_tests/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 b1782cb1d6..00113f7303 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 9c6db25cbc..d54dd2e292 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -472,7 +472,6 @@ fn round_block_gas_limit(gas_limit: U256, lower_limit: U256, upper_limit: U256) } } - #[cfg(test)] mod tests { use super::*; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 4904535a89..bf51d0b135 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -121,7 +121,6 @@ pub struct MinerOptions { /// will be invalid if mined. pub infinite_pending_block: bool, - /// Strategy to use for prioritizing transactions in the queue. pub tx_queue_strategy: PrioritizationStrategy, /// Simple senders penalization. @@ -506,7 +505,6 @@ impl Miner { || self.engine.seals_internally() == Some(true) || had_requests; - let should_disable_sealing = !sealing_enabled; trace!(target: "miner", "requires_reseal: should_disable_sealing={}; forced={:?}, has_local={:?}, internal={:?}, had_requests={:?}", diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index fbf4f11b7a..dd5f28feb6 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -81,7 +81,6 @@ pub trait MinerService : Send + Sync { fn update_sealing(&self, chain: &C) where C: BlockChain + CallContract + BlockProducer + SealedBlockImporter + Nonce + Sync; - // Notifications /// Called when blocks are imported to chain, updates transactions queue. @@ -90,7 +89,6 @@ pub trait MinerService : Send + Sync { fn chain_new_blocks(&self, chain: &C, imported: &[H256], invalid: &[H256], enacted: &[H256], retracted: &[H256], is_internal_import: bool) where C: BlockChainClient; - // Pending block /// Get a list of all pending receipts from pending block. diff --git a/ethcore/src/miner/pool_client.rs b/ethcore/src/miner/pool_client.rs index dfcdec684f..226fe21e29 100644 --- a/ethcore/src/miner/pool_client.rs +++ b/ethcore/src/miner/pool_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/service_transaction_checker.rs b/ethcore/src/miner/service_transaction_checker.rs index f085564d22..adae0c36ea 100644 --- a/ethcore/src/miner/service_transaction_checker.rs +++ b/ethcore/src/miner/service_transaction_checker.rs @@ -1,4 +1,4 @@ -// Copyright 2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -12,7 +12,7 @@ // 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 . +// along with Parity. If not, see . //! A service transactions contract checker. diff --git a/ethcore/src/miner/stratum.rs b/ethcore/src/miner/stratum.rs index c63124dcd0..0fd892bf50 100644 --- a/ethcore/src/miner/stratum.rs +++ b/ethcore/src/miner/stratum.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -111,7 +111,6 @@ pub struct StratumJobDispatcher { miner: Weak, } - impl JobDispatcher for StratumJobDispatcher { fn initial(&self) -> Option { // initial payload may contain additional data, not in this case diff --git a/ethcore/src/pod_account.rs b/ethcore/src/pod_account.rs index 027e2765ff..281299b3b2 100644 --- a/ethcore/src/pod_account.rs +++ b/ethcore/src/pod_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -165,7 +165,6 @@ pub fn diff_pod(pre: Option<&PodAccount>, post: Option<&PodAccount>) -> Option u64; } - /// Restore from secondary snapshot chunks. pub trait Rebuilder: Send { /// Feed a chunk, potentially out of order. diff --git a/ethcore/src/snapshot/consensus/work.rs b/ethcore/src/snapshot/consensus/work.rs index b71f7b9d1d..31c7b51ec5 100644 --- a/ethcore/src/snapshot/consensus/work.rs +++ b/ethcore/src/snapshot/consensus/work.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 2741f648a2..36fb0927a6 100644 --- a/ethcore/src/snapshot/error.rs +++ b/ethcore/src/snapshot/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 84faa19b48..7d2cbcf92c 100644 --- a/ethcore/src/snapshot/io.rs +++ b/ethcore/src/snapshot/io.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -214,7 +214,6 @@ impl PackedReader { return Ok(None); } - file.seek(SeekFrom::End(-8))?; let mut off_bytes = [0u8; 8]; diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index 8871ced26f..30a61b779c 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 942015d0f1..b76a703675 100644 --- a/ethcore/src/snapshot/service.rs +++ b/ethcore/src/snapshot/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 067a3abab0..516e438abd 100644 --- a/ethcore/src/snapshot/tests/helpers.rs +++ b/ethcore/src/snapshot/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 6e9398356a..c09f2b965c 100644 --- a/ethcore/src/snapshot/tests/mod.rs +++ b/ethcore/src/snapshot/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/proof_of_authority.rs b/ethcore/src/snapshot/tests/proof_of_authority.rs index 4b1b3d6ad0..d26ecfc404 100644 --- a/ethcore/src/snapshot/tests/proof_of_authority.rs +++ b/ethcore/src/snapshot/tests/proof_of_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -52,7 +52,6 @@ lazy_static! { static ref RICH_SECRET: Secret = secret!("1"); } - /// Contract code used here: https://gist.github.com/anonymous/2a43783647e0f0dfcc359bd6fd81d6d9 /// Account with secrets keccak("1") is initially the validator. /// Transitions to the contract at block 2, initially same validator set. diff --git a/ethcore/src/snapshot/tests/proof_of_work.rs b/ethcore/src/snapshot/tests/proof_of_work.rs index 3c3b47ce9c..e689edf80f 100644 --- a/ethcore/src/snapshot/tests/proof_of_work.rs +++ b/ethcore/src/snapshot/tests/proof_of_work.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 3fcb0addfa..55cb0e8338 100644 --- a/ethcore/src/snapshot/tests/service.rs +++ b/ethcore/src/snapshot/tests/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 05926a7e66..12f19e8c27 100644 --- a/ethcore/src/snapshot/tests/state.rs +++ b/ethcore/src/snapshot/tests/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/traits.rs b/ethcore/src/snapshot/traits.rs index d951f4c534..eec629ba6e 100644 --- a/ethcore/src/snapshot/traits.rs +++ b/ethcore/src/snapshot/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 6e04fe6d16..6805679627 100644 --- a/ethcore/src/snapshot/watcher.rs +++ b/ethcore/src/snapshot/watcher.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 937d7ed873..fbfd2cbc42 100644 --- a/ethcore/src/spec/genesis.rs +++ b/ethcore/src/spec/genesis.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 fb60e1cc85..35705f4a8e 100644 --- a/ethcore/src/spec/mod.rs +++ b/ethcore/src/spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 2a07e69c43..0ed41acc84 100644 --- a/ethcore/src/spec/seal.rs +++ b/ethcore/src/spec/seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 98720647d8..a8ab757549 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -320,7 +320,6 @@ impl<'a, T: AsRef> From<&'a T> for SpecParams<'a> { } } - /// Parameters for a block chain; includes both those intrinsic to the design of the /// chain and those to be interpreted by the active chain engine. pub struct Spec { @@ -848,7 +847,6 @@ impl Spec { /// Create the EthereumMachine corresponding to Spec::new_test. pub fn new_test_machine() -> EthereumMachine { load_machine_bundled!("null_morden") } - /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close. pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") } diff --git a/ethcore/src/state/account.rs b/ethcore/src/state/account.rs index 5c1dd40396..a7a40e6a3b 100644 --- a/ethcore/src/state/account.rs +++ b/ethcore/src/state/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/backend.rs b/ethcore/src/state/backend.rs index 1e761506d9..6b2e21cb46 100644 --- a/ethcore/src/state/backend.rs +++ b/ethcore/src/state/backend.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 5b969bccb9..ccca20b71e 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -51,7 +51,6 @@ use trie; use trie::{Trie, TrieError, TrieDB}; use trie::recorder::Recorder; - mod account; mod substate; diff --git a/ethcore/src/state/substate.rs b/ethcore/src/state/substate.rs index e70178a362..c2f3c62dcb 100644 --- a/ethcore/src/state/substate.rs +++ b/ethcore/src/state/substate.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 3b00a42ee6..c3704828c2 100644 --- a/ethcore/src/state_db.rs +++ b/ethcore/src/state_db.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/src/test_helpers.rs b/ethcore/src/test_helpers.rs index e57d16a654..4a83752c04 100644 --- a/ethcore/src/test_helpers.rs +++ b/ethcore/src/test_helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -283,7 +283,6 @@ pub fn generate_dummy_blockchain_with_extra(block_number: u32) -> BlockChain { let db = new_db(); let bc = BlockChain::new(BlockChainConfig::default(), &create_unverifiable_block(0, H256::zero()), db.clone()); - let mut batch = db.transaction(); for block_order in 1..block_number { // Total difficulty is always 0 here. diff --git a/ethcore/src/test_helpers_internal.rs b/ethcore/src/test_helpers_internal.rs index ef98c7c85b..7319d2d763 100644 --- a/ethcore/src/test_helpers_internal.rs +++ b/ethcore/src/test_helpers_internal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 6dcad9ba62..ccafcf6613 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -130,7 +130,6 @@ fn fails_to_import_block_with_invalid_rlp() { } } - #[test] fn query_none_block() { let tempdir = TempDir::new("").unwrap(); @@ -221,7 +220,6 @@ fn can_collect_garbage() { assert!(client.blockchain_cache_info().blocks < 100 * 1024); } - #[test] fn can_generate_gas_price_median() { let client = generate_dummy_client_with_data(3, 1, slice_into![1, 2, 3]); diff --git a/ethcore/src/tests/mod.rs b/ethcore/src/tests/mod.rs index 8b509d2afc..d1d5b6ef7f 100644 --- a/ethcore/src/tests/mod.rs +++ b/ethcore/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/trace.rs b/ethcore/src/tests/trace.rs index a98667b142..7071ef1486 100644 --- a/ethcore/src/tests/trace.rs +++ b/ethcore/src/tests/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 dbd8a97aff..e9b003adf9 100644 --- a/ethcore/src/trace/config.rs +++ b/ethcore/src/trace/config.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 45b9ebc150..29f294062c 100644 --- a/ethcore/src/trace/db.rs +++ b/ethcore/src/trace/db.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -590,7 +590,6 @@ mod tests { assert!(tracedb.traces(&block_0).is_some(), "Traces should be available even if block is non-canon."); } - #[test] fn test_import() { let db = new_db(); diff --git a/ethcore/src/trace/executive_tracer.rs b/ethcore/src/trace/executive_tracer.rs index b1d116d69d..1bae15d595 100644 --- a/ethcore/src/trace/executive_tracer.rs +++ b/ethcore/src/trace/executive_tracer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 fb72e220e4..b720b0b86a 100644 --- a/ethcore/src/trace/import.rs +++ b/ethcore/src/trace/import.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 381dcd9f0d..569b2a6791 100644 --- a/ethcore/src/trace/mod.rs +++ b/ethcore/src/trace/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 ab0bf77ff1..8312de58f8 100644 --- a/ethcore/src/trace/noop_tracer.rs +++ b/ethcore/src/trace/noop_tracer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/types/error.rs b/ethcore/src/trace/types/error.rs index f2fa192d33..a934443c5d 100644 --- a/ethcore/src/trace/types/error.rs +++ b/ethcore/src/trace/types/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/types/filter.rs b/ethcore/src/trace/types/filter.rs index 308eb72da7..b3a5de58cd 100644 --- a/ethcore/src/trace/types/filter.rs +++ b/ethcore/src/trace/types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/types/flat.rs b/ethcore/src/trace/types/flat.rs index 00cf517df8..8610692200 100644 --- a/ethcore/src/trace/types/flat.rs +++ b/ethcore/src/trace/types/flat.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/types/localized.rs b/ethcore/src/trace/types/localized.rs index f649e16997..816eccc937 100644 --- a/ethcore/src/trace/types/localized.rs +++ b/ethcore/src/trace/types/localized.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/types/mod.rs b/ethcore/src/trace/types/mod.rs index a9be2865b0..0e019ac552 100644 --- a/ethcore/src/trace/types/mod.rs +++ b/ethcore/src/trace/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/types/trace.rs b/ethcore/src/trace/types/trace.rs index cdb00a5229..1dde16e23b 100644 --- a/ethcore/src/trace/types/trace.rs +++ b/ethcore/src/trace/types/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -210,7 +210,6 @@ impl Decodable for Reward { } } - /// Suicide action. #[derive(Debug, Clone, PartialEq, RlpEncodable, RlpDecodable)] pub struct Suicide { diff --git a/ethcore/src/tx_filter.rs b/ethcore/src/tx_filter.rs index 8bbb499052..a20ff8e60c 100644 --- a/ethcore/src/tx_filter.rs +++ b/ethcore/src/tx_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -198,4 +198,3 @@ mod test { assert!(!filter.transaction_allowed(&genesis, &call_tx.clone().sign(key4.secret(), None), &*client)); } } - diff --git a/ethcore/src/verification/canon_verifier.rs b/ethcore/src/verification/canon_verifier.rs index 3d0fd77c6e..0ace8987e0 100644 --- a/ethcore/src/verification/canon_verifier.rs +++ b/ethcore/src/verification/canon_verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 d5fd4e8476..ed4227ee21 100644 --- a/ethcore/src/verification/mod.rs +++ b/ethcore/src/verification/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 24b117bbc1..d04eec9b11 100644 --- a/ethcore/src/verification/noop_verifier.rs +++ b/ethcore/src/verification/noop_verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 ce9bddf4ef..2d89f11a33 100644 --- a/ethcore/src/verification/queue/kind.rs +++ b/ethcore/src/verification/queue/kind.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 f7a558f33d..5ae4f7c8fc 100644 --- a/ethcore/src/verification/queue/mod.rs +++ b/ethcore/src/verification/queue/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 de2f6c7195..3b9104f0e1 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 a9ca22a4c8..188254b431 100644 --- a/ethcore/src/verification/verifier.rs +++ b/ethcore/src/verification/verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 3bed1818f2..2a7c2ebd53 100644 --- a/ethcore/src/views/block.rs +++ b/ethcore/src/views/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 d2864b9725..6560140cad 100644 --- a/ethcore/src/views/body.rs +++ b/ethcore/src/views/body.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 8d407f0a1b..4b7b1225d0 100644 --- a/ethcore/src/views/header.rs +++ b/ethcore/src/views/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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 b9cbad8889..6d32649382 100644 --- a/ethcore/src/views/mod.rs +++ b/ethcore/src/views/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -38,4 +38,4 @@ mod tests { fn should_include_file_line_number_in_panic_for_invalid_rlp() { let _ = view!(HeaderView, &[]).parent_hash(); } -} \ No newline at end of file +} diff --git a/ethcore/src/views/transaction.rs b/ethcore/src/views/transaction.rs index 5607482b30..911fde944e 100644 --- a/ethcore/src/views/transaction.rs +++ b/ethcore/src/views/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (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/view_rlp.rs b/ethcore/src/views/view_rlp.rs index 6afdb3af8c..2ecc4dbdd3 100644 --- a/ethcore/src/views/view_rlp.rs +++ b/ethcore/src/views/view_rlp.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -127,4 +127,4 @@ macro_rules! view { ($view: ident, $bytes: expr) => { $view::new($crate::views::ViewRlp::new($bytes, file!(), line!())) }; -} \ No newline at end of file +} diff --git a/ethcore/stratum/src/lib.rs b/ethcore/stratum/src/lib.rs index a4abeffd73..0e9de9b43c 100644 --- a/ethcore/stratum/src/lib.rs +++ b/ethcore/stratum/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/stratum/src/traits.rs b/ethcore/stratum/src/traits.rs index 431d338a42..d1bb9a4da7 100644 --- a/ethcore/stratum/src/traits.rs +++ b/ethcore/stratum/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/api.rs b/ethcore/sync/src/api.rs index 8419fccd7a..b759fb734a 100644 --- a/ethcore/sync/src/api.rs +++ b/ethcore/sync/src/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -536,7 +536,6 @@ pub trait ManageNetwork : Send + Sync { fn with_proto_context(&self, proto: ProtocolId, f: &mut FnMut(&NetworkContext)); } - impl ManageNetwork for EthSync { fn accept_unreserved_peers(&self) { self.network.set_non_reserved_mode(NonReservedPeerMode::Accept); diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index 7411fa30cc..bff9bb071a 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/blocks.rs b/ethcore/sync/src/blocks.rs index 283f4ed610..8485b1d75e 100644 --- a/ethcore/sync/src/blocks.rs +++ b/ethcore/sync/src/blocks.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -194,7 +194,6 @@ impl BlockCollection { needed_bodies } - /// Returns a set of block hashes that require a receipt download. The returned set is marked as being downloaded. pub fn needed_receipts(&mut self, count: usize, _ignore_downloading: bool) -> Vec { if self.head.is_none() || !self.need_receipts { @@ -616,4 +615,3 @@ mod test { assert_eq!(bc.drain().len(), 2); } } - diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index c0ee8299b8..8f0aff7514 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -1348,7 +1348,6 @@ pub mod tests { client.set_nonce(sender, U256::from(0)); } - // when { let queue = RwLock::new(VecDeque::new()); diff --git a/ethcore/sync/src/lib.rs b/ethcore/sync/src/lib.rs index c00ea5e440..35483f4ec3 100644 --- a/ethcore/sync/src/lib.rs +++ b/ethcore/sync/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/light_sync/mod.rs b/ethcore/sync/src/light_sync/mod.rs index 9fa669817a..32e3a0dbfd 100644 --- a/ethcore/sync/src/light_sync/mod.rs +++ b/ethcore/sync/src/light_sync/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/light_sync/response.rs b/ethcore/sync/src/light_sync/response.rs index 3629613224..161461c2a5 100644 --- a/ethcore/sync/src/light_sync/response.rs +++ b/ethcore/sync/src/light_sync/response.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/light_sync/sync_round.rs b/ethcore/sync/src/light_sync/sync_round.rs index d477ecc815..79684efe53 100644 --- a/ethcore/sync/src/light_sync/sync_round.rs +++ b/ethcore/sync/src/light_sync/sync_round.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/light_sync/tests/mod.rs b/ethcore/sync/src/light_sync/tests/mod.rs index 3fee1c7170..e3d46188a6 100644 --- a/ethcore/sync/src/light_sync/tests/mod.rs +++ b/ethcore/sync/src/light_sync/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/light_sync/tests/test_net.rs b/ethcore/sync/src/light_sync/tests/test_net.rs index badd35668b..5995bd7c6c 100644 --- a/ethcore/sync/src/light_sync/tests/test_net.rs +++ b/ethcore/sync/src/light_sync/tests/test_net.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/private_tx.rs b/ethcore/sync/src/private_tx.rs index ded5de2d86..d7434c8bd5 100644 --- a/ethcore/sync/src/private_tx.rs +++ b/ethcore/sync/src/private_tx.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/snapshot.rs b/ethcore/sync/src/snapshot.rs index b603a2a007..e5632e652b 100644 --- a/ethcore/sync/src/snapshot.rs +++ b/ethcore/sync/src/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -274,4 +274,3 @@ mod test { assert_eq!(snapshot.is_known_bad(&hash), true); } } - diff --git a/ethcore/sync/src/sync_io.rs b/ethcore/sync/src/sync_io.rs index 76f323e826..c7704724c6 100644 --- a/ethcore/sync/src/sync_io.rs +++ b/ethcore/sync/src/sync_io.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -136,5 +136,3 @@ impl<'s> SyncIo for NetSyncIo<'s> { self.network.peer_client_version(peer_id) } } - - diff --git a/ethcore/sync/src/tests/chain.rs b/ethcore/sync/src/tests/chain.rs index 6b5ef65da1..0d9c83f2fb 100644 --- a/ethcore/sync/src/tests/chain.rs +++ b/ethcore/sync/src/tests/chain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -253,7 +253,6 @@ fn high_td_attach() { assert_eq!(net.peer(0).chain.chain_info().best_block_number, 5); } - #[test] fn disconnect_on_unrelated_chain() { ::env_logger::init().ok(); @@ -267,4 +266,3 @@ fn disconnect_on_unrelated_chain() { net.sync(); assert_eq!(net.disconnect_events, vec![(0, 0)]); } - diff --git a/ethcore/sync/src/tests/consensus.rs b/ethcore/sync/src/tests/consensus.rs index 8825bad2c8..6b2502f4a6 100644 --- a/ethcore/sync/src/tests/consensus.rs +++ b/ethcore/sync/src/tests/consensus.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/tests/helpers.rs b/ethcore/sync/src/tests/helpers.rs index 407f699e0e..112dab8a98 100644 --- a/ethcore/sync/src/tests/helpers.rs +++ b/ethcore/sync/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/tests/mod.rs b/ethcore/sync/src/tests/mod.rs index eb01108286..0168913aa1 100644 --- a/ethcore/sync/src/tests/mod.rs +++ b/ethcore/sync/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/tests/private.rs b/ethcore/sync/src/tests/private.rs index b54240bfb8..120dc8fc9c 100644 --- a/ethcore/sync/src/tests/private.rs +++ b/ethcore/sync/src/tests/private.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/tests/rpc.rs b/ethcore/sync/src/tests/rpc.rs index 5806fbbd8d..99e95959be 100644 --- a/ethcore/sync/src/tests/rpc.rs +++ b/ethcore/sync/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/sync/src/tests/snapshot.rs b/ethcore/sync/src/tests/snapshot.rs index ffb71d7a73..e6636c02f4 100644 --- a/ethcore/sync/src/tests/snapshot.rs +++ b/ethcore/sync/src/tests/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -154,4 +154,3 @@ fn snapshot_sync() { assert_eq!(net.peer(4).snapshot_service.state_restoration_chunks.lock().len(), net.peer(0).snapshot_service.manifest.as_ref().unwrap().state_hashes.len()); assert_eq!(net.peer(4).snapshot_service.block_restoration_chunks.lock().len(), net.peer(0).snapshot_service.manifest.as_ref().unwrap().block_hashes.len()); } - diff --git a/ethcore/sync/src/transactions_stats.rs b/ethcore/sync/src/transactions_stats.rs index 4d33008621..c45b1ad8b3 100644 --- a/ethcore/sync/src/transactions_stats.rs +++ b/ethcore/sync/src/transactions_stats.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/transaction/src/error.rs b/ethcore/transaction/src/error.rs index eeeba4e53a..0efd18ae6b 100644 --- a/ethcore/transaction/src/error.rs +++ b/ethcore/transaction/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -130,4 +130,3 @@ impl error::Error for Error { "Transaction error" } } - diff --git a/ethcore/transaction/src/lib.rs b/ethcore/transaction/src/lib.rs index 6a478b9463..829613cf9c 100644 --- a/ethcore/transaction/src/lib.rs +++ b/ethcore/transaction/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/transaction/src/transaction.rs b/ethcore/transaction/src/transaction.rs index 6152e61acb..dd1e8ca2cc 100644 --- a/ethcore/transaction/src/transaction.rs +++ b/ethcore/transaction/src/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/account_diff.rs b/ethcore/types/src/account_diff.rs index c3edb1fb1e..521ed8ab1f 100644 --- a/ethcore/types/src/account_diff.rs +++ b/ethcore/types/src/account_diff.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -138,4 +138,3 @@ impl fmt::Display for AccountDiff { Ok(()) } } - diff --git a/ethcore/types/src/basic_account.rs b/ethcore/types/src/basic_account.rs index 79e75dfc01..94157977bc 100644 --- a/ethcore/types/src/basic_account.rs +++ b/ethcore/types/src/basic_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/block_status.rs b/ethcore/types/src/block_status.rs index d330b9ed1b..5455f1d40f 100644 --- a/ethcore/types/src/block_status.rs +++ b/ethcore/types/src/block_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/blockchain_info.rs b/ethcore/types/src/blockchain_info.rs index 836ee7618b..ddd91623d1 100644 --- a/ethcore/types/src/blockchain_info.rs +++ b/ethcore/types/src/blockchain_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/call_analytics.rs b/ethcore/types/src/call_analytics.rs index b0520a0d3f..ae53e6911e 100644 --- a/ethcore/types/src/call_analytics.rs +++ b/ethcore/types/src/call_analytics.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/filter.rs b/ethcore/types/src/filter.rs index 0a37482b94..c32551473d 100644 --- a/ethcore/types/src/filter.rs +++ b/ethcore/types/src/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/ids.rs b/ethcore/types/src/ids.rs index e304698a4c..d1457832c0 100644 --- a/ethcore/types/src/ids.rs +++ b/ethcore/types/src/ids.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/lib.rs b/ethcore/types/src/lib.rs index 18e0dde86a..8db6163bbf 100644 --- a/ethcore/types/src/lib.rs +++ b/ethcore/types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/log_entry.rs b/ethcore/types/src/log_entry.rs index 951a7389f2..0b7455df49 100644 --- a/ethcore/types/src/log_entry.rs +++ b/ethcore/types/src/log_entry.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/mode.rs b/ethcore/types/src/mode.rs index 539ebcdbd8..ee4f9fbf2c 100644 --- a/ethcore/types/src/mode.rs +++ b/ethcore/types/src/mode.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/pruning_info.rs b/ethcore/types/src/pruning_info.rs index 8a47fdd8b9..fcf4a774a2 100644 --- a/ethcore/types/src/pruning_info.rs +++ b/ethcore/types/src/pruning_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/receipt.rs b/ethcore/types/src/receipt.rs index 8846d27c02..b4f105afab 100644 --- a/ethcore/types/src/receipt.rs +++ b/ethcore/types/src/receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/restoration_status.rs b/ethcore/types/src/restoration_status.rs index 51f5b8aa0a..ec15bf4809 100644 --- a/ethcore/types/src/restoration_status.rs +++ b/ethcore/types/src/restoration_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -40,4 +40,3 @@ pub enum RestorationStatus { /// Failed restoration. Failed, } - diff --git a/ethcore/types/src/security_level.rs b/ethcore/types/src/security_level.rs index ea39dc3280..5917584704 100644 --- a/ethcore/types/src/security_level.rs +++ b/ethcore/types/src/security_level.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/snapshot_manifest.rs b/ethcore/types/src/snapshot_manifest.rs index c59402023a..40ff4c532f 100644 --- a/ethcore/types/src/snapshot_manifest.rs +++ b/ethcore/types/src/snapshot_manifest.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -76,4 +76,3 @@ impl ManifestData { }) } } - diff --git a/ethcore/types/src/state_diff.rs b/ethcore/types/src/state_diff.rs index dd976eb36c..4cc85fff93 100644 --- a/ethcore/types/src/state_diff.rs +++ b/ethcore/types/src/state_diff.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/trace_filter.rs b/ethcore/types/src/trace_filter.rs index 2afa752ccb..69a3787027 100644 --- a/ethcore/types/src/trace_filter.rs +++ b/ethcore/types/src/trace_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/tree_route.rs b/ethcore/types/src/tree_route.rs index 5d1bddd87b..9c84052be3 100644 --- a/ethcore/types/src/tree_route.rs +++ b/ethcore/types/src/tree_route.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/types/src/verification_queue_info.rs b/ethcore/types/src/verification_queue_info.rs index db818590af..bc280b15bf 100644 --- a/ethcore/types/src/verification_queue_info.rs +++ b/ethcore/types/src/verification_queue_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/vm/src/action_params.rs b/ethcore/vm/src/action_params.rs index 9e9a35528c..481f637310 100644 --- a/ethcore/vm/src/action_params.rs +++ b/ethcore/vm/src/action_params.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/vm/src/call_type.rs b/ethcore/vm/src/call_type.rs index dc00b2b839..0e58d76bbd 100644 --- a/ethcore/vm/src/call_type.rs +++ b/ethcore/vm/src/call_type.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + //! EVM call types. use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp}; diff --git a/ethcore/vm/src/env_info.rs b/ethcore/vm/src/env_info.rs index 71bb48eeb7..bb1c9ecd91 100644 --- a/ethcore/vm/src/env_info.rs +++ b/ethcore/vm/src/env_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/vm/src/error.rs b/ethcore/vm/src/error.rs index fe8d7054cf..ad23e3e020 100644 --- a/ethcore/vm/src/error.rs +++ b/ethcore/vm/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -71,7 +71,6 @@ pub enum Error { Reverted, } - impl From> for Error { fn from(err: Box) -> Self { Error::Internal(format!("Internal error: {}", err)) diff --git a/ethcore/vm/src/ext.rs b/ethcore/vm/src/ext.rs index 98661e47e2..166e8712aa 100644 --- a/ethcore/vm/src/ext.rs +++ b/ethcore/vm/src/ext.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/vm/src/lib.rs b/ethcore/vm/src/lib.rs index 67fc59bab5..0dc1b79954 100644 --- a/ethcore/vm/src/lib.rs +++ b/ethcore/vm/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/vm/src/return_data.rs b/ethcore/vm/src/return_data.rs index 067a26e35e..24191ec55f 100644 --- a/ethcore/vm/src/return_data.rs +++ b/ethcore/vm/src/return_data.rs @@ -1,3 +1,5 @@ +// Copyright 2015-2018 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 diff --git a/ethcore/vm/src/schedule.rs b/ethcore/vm/src/schedule.rs index a0085ef1ec..960821e72c 100644 --- a/ethcore/vm/src/schedule.rs +++ b/ethcore/vm/src/schedule.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/vm/src/tests.rs b/ethcore/vm/src/tests.rs index daf46be0f0..9a17e0d3dc 100644 --- a/ethcore/vm/src/tests.rs +++ b/ethcore/vm/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/wasm/run/src/fixture.rs b/ethcore/wasm/run/src/fixture.rs index ba2da06706..9fc1ca6fef 100644 --- a/ethcore/wasm/run/src/fixture.rs +++ b/ethcore/wasm/run/src/fixture.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::borrow::Cow; use ethjson::uint::Uint; use ethjson::hash::{Address, H256}; @@ -67,4 +83,4 @@ pub enum Assert { HasStorage(StorageAssert), UsedGas(u64), Return(Bytes), -} \ No newline at end of file +} diff --git a/ethcore/wasm/run/src/main.rs b/ethcore/wasm/run/src/main.rs index ab8ac631df..d2a3a0ff50 100644 --- a/ethcore/wasm/run/src/main.rs +++ b/ethcore/wasm/run/src/main.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 serde; extern crate serde_json; #[macro_use] extern crate serde_derive; diff --git a/ethcore/wasm/run/src/runner.rs b/ethcore/wasm/run/src/runner.rs index 5ae0f941a4..3e24ced5db 100644 --- a/ethcore/wasm/run/src/runner.rs +++ b/ethcore/wasm/run/src/runner.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 fixture::{Fixture, Assert, CallLocator, Source}; use wasm::WasmInterpreter; use vm::{self, Vm, GasLeft, ActionParams, ActionValue, ParamsType}; diff --git a/ethcore/wasm/src/env.rs b/ethcore/wasm/src/env.rs index 7ffaaf98ab..9bcbee63fb 100644 --- a/ethcore/wasm/src/env.rs +++ b/ethcore/wasm/src/env.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -295,4 +295,4 @@ impl wasmi::ModuleImportResolver for ImportResolver { Err(Error::Instantiation("Memory imported under unknown name".to_owned())) } } -} \ No newline at end of file +} diff --git a/ethcore/wasm/src/lib.rs b/ethcore/wasm/src/lib.rs index 5605a7ea18..f1290318e0 100644 --- a/ethcore/wasm/src/lib.rs +++ b/ethcore/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/wasm/src/panic_payload.rs b/ethcore/wasm/src/panic_payload.rs index dc95f53fbf..36aa6c5f58 100644 --- a/ethcore/wasm/src/panic_payload.rs +++ b/ethcore/wasm/src/panic_payload.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ethcore/wasm/src/parser.rs b/ethcore/wasm/src/parser.rs index 62cd66cb98..1efb89e1bd 100644 --- a/ethcore/wasm/src/parser.rs +++ b/ethcore/wasm/src/parser.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -95,4 +95,4 @@ pub fn payload<'a>(params: &'a vm::ActionParams, wasm_costs: &vm::WasmCosts) }; Ok((contract_module, data)) -} \ No newline at end of file +} diff --git a/ethcore/wasm/src/tests.rs b/ethcore/wasm/src/tests.rs index 2b71a1768e..b32ca75ae9 100644 --- a/ethcore/wasm/src/tests.rs +++ b/ethcore/wasm/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/cli/src/main.rs b/ethkey/cli/src/main.rs index 0dfc8aecde..c8f5e2e64e 100644 --- a/ethkey/cli/src/main.rs +++ b/ethkey/cli/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 fffae0bed8..55b525e2a4 100644 --- a/ethkey/src/brain.rs +++ b/ethkey/src/brain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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_prefix.rs b/ethkey/src/brain_prefix.rs index a4e31e989c..accf947370 100644 --- a/ethkey/src/brain_prefix.rs +++ b/ethkey/src/brain_prefix.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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_recover.rs b/ethkey/src/brain_recover.rs index f064c6fd0e..5133193232 100644 --- a/ethkey/src/brain_recover.rs +++ b/ethkey/src/brain_recover.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -21,7 +21,6 @@ use parity_wordlist; use super::{Address, Brain, Generator}; - /// Tries to find a phrase for address, given the number /// of expected words and a partial phrase. /// @@ -150,7 +149,6 @@ impl Iterator for PhrasesIterator { mod tests { use super::PhrasesIterator; - #[test] fn should_generate_possible_combinations() { let mut it = PhrasesIterator::new(vec![ diff --git a/ethkey/src/crypto.rs b/ethkey/src/crypto.rs index 739a463c07..3ff809614e 100644 --- a/ethkey/src/crypto.rs +++ b/ethkey/src/crypto.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c7faf67788..7cba375d0f 100644 --- a/ethkey/src/error.rs +++ b/ethkey/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/extended.rs b/ethkey/src/extended.rs index d41ae54c53..89a4bb26a0 100644 --- a/ethkey/src/extended.rs +++ b/ethkey/src/extended.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 002f20d946..3801d841ab 100644 --- a/ethkey/src/keccak.rs +++ b/ethkey/src/keccak.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 5a13d476bb..610c14524f 100644 --- a/ethkey/src/keypair.rs +++ b/ethkey/src/keypair.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 b5cf984530..7aec015c47 100644 --- a/ethkey/src/lib.rs +++ b/ethkey/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/math.rs b/ethkey/src/math.rs index e2426b4fbd..6b1d4013bd 100644 --- a/ethkey/src/math.rs +++ b/ethkey/src/math.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 f2ef0f0ffb..2668050ef8 100644 --- a/ethkey/src/prefix.rs +++ b/ethkey/src/prefix.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 b44a4b2ca8..d42bb4ea4d 100644 --- a/ethkey/src/random.rs +++ b/ethkey/src/random.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/secret.rs b/ethkey/src/secret.rs index c3bf2a12ba..a3560698af 100644 --- a/ethkey/src/secret.rs +++ b/ethkey/src/secret.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 ec225ec011..cd6d88fe18 100644 --- a/ethkey/src/signature.rs +++ b/ethkey/src/signature.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/cli/src/crack.rs b/ethstore/cli/src/crack.rs index 64eda66e56..3e767a6084 100644 --- a/ethstore/cli/src/crack.rs +++ b/ethstore/cli/src/crack.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::{cmp, thread}; use std::sync::Arc; use std::collections::VecDeque; diff --git a/ethstore/cli/src/main.rs b/ethstore/cli/src/main.rs index 8ebb206a0b..416b64d43e 100644 --- a/ethstore/cli/src/main.rs +++ b/ethstore/cli/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/cli/tests/cli.rs b/ethstore/cli/tests/cli.rs index a740b95c28..1b899f7082 100644 --- a/ethstore/cli/tests/cli.rs +++ b/ethstore/cli/tests/cli.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -74,7 +74,6 @@ fn cli_cmd() { "--vault-pwd", test_password]); assert_eq!(output, "0x54ab6e5cf0c5cb40043fdca5d15d611a3a94285414a076dafecc8dc9c04183f413296a3defff61092c0bb478dc9887ec01070e1275234211208fb8f4be4a9b0101\n"); - let output = run(&["public", &address[2..], test_vault_addr, "--dir", dir_str, "--vault", "test-vault", diff --git a/ethstore/src/account/cipher.rs b/ethstore/src/account/cipher.rs index 427ccafc4a..92a5304edb 100644 --- a/ethstore/src/account/cipher.rs +++ b/ethstore/src/account/cipher.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/crypto.rs b/ethstore/src/account/crypto.rs index bd65bc927b..3143958a12 100644 --- a/ethstore/src/account/crypto.rs +++ b/ethstore/src/account/crypto.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016, 2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 31b8f304ca..4d6d7cd956 100644 --- a/ethstore/src/account/kdf.rs +++ b/ethstore/src/account/kdf.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c352ffe78f..e13237d827 100644 --- a/ethstore/src/account/mod.rs +++ b/ethstore/src/account/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -25,4 +25,3 @@ pub use self::crypto::Crypto; pub use self::kdf::{Kdf, Pbkdf2, Scrypt, Prf}; pub use self::safe_account::SafeAccount; pub use self::version::Version; - diff --git a/ethstore/src/account/safe_account.rs b/ethstore/src/account/safe_account.rs index 069c997e10..0bda99d02c 100644 --- a/ethstore/src/account/safe_account.rs +++ b/ethstore/src/account/safe_account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 2ba0848a68..d206a2c12d 100644 --- a/ethstore/src/account/version.rs +++ b/ethstore/src/account/version.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/accounts_dir/disk.rs b/ethstore/src/accounts_dir/disk.rs index 29b7e52466..79e8c0f4c3 100644 --- a/ethstore/src/accounts_dir/disk.rs +++ b/ethstore/src/accounts_dir/disk.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -153,7 +153,6 @@ impl DiskDirectory where T: KeyFileManager { ) } - /// insert account with given filename. if the filename is a duplicate of any stored account and dedup is set to /// true, a random suffix is appended to the filename. pub fn insert_with_filename(&self, account: SafeAccount, mut filename: String, dedup: bool) -> Result { diff --git a/ethstore/src/accounts_dir/memory.rs b/ethstore/src/accounts_dir/memory.rs index 5cfdba0e5c..71ddfa536e 100644 --- a/ethstore/src/accounts_dir/memory.rs +++ b/ethstore/src/accounts_dir/memory.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -72,4 +72,3 @@ impl KeyDirectory for MemoryDirectory { Ok(val) } } - diff --git a/ethstore/src/accounts_dir/mod.rs b/ethstore/src/accounts_dir/mod.rs index ec72d05da3..b8dd313d26 100644 --- a/ethstore/src/accounts_dir/mod.rs +++ b/ethstore/src/accounts_dir/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/accounts_dir/vault.rs b/ethstore/src/accounts_dir/vault.rs index 2705262666..b2f6ce6160 100644 --- a/ethstore/src/accounts_dir/vault.rs +++ b/ethstore/src/accounts_dir/vault.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016, 2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 7c89473280..6a2c257633 100644 --- a/ethstore/src/error.rs +++ b/ethstore/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 4821263910..34e89a4fb5 100644 --- a/ethstore/src/ethkey.rs +++ b/ethstore/src/ethkey.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 46c81153c7..13780f7f63 100644 --- a/ethstore/src/ethstore.rs +++ b/ethstore/src/ethstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 2aaef51f50..876119fd50 100644 --- a/ethstore/src/import.rs +++ b/ethstore/src/import.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/bytes.rs b/ethstore/src/json/bytes.rs index de2c645636..b5aae19222 100644 --- a/ethstore/src/json/bytes.rs +++ b/ethstore/src/json/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -72,4 +72,3 @@ impl From for Vec { b.0 } } - diff --git a/ethstore/src/json/cipher.rs b/ethstore/src/json/cipher.rs index 33f4ec5721..6fffdde9e2 100644 --- a/ethstore/src/json/cipher.rs +++ b/ethstore/src/json/cipher.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 03f72e576e..0a926cc83f 100644 --- a/ethstore/src/json/crypto.rs +++ b/ethstore/src/json/crypto.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 8a5029642d..81b805bfe2 100644 --- a/ethstore/src/json/error.rs +++ b/ethstore/src/json/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 13564c95d1..c2ad547734 100644 --- a/ethstore/src/json/hash.rs +++ b/ethstore/src/json/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 aa90a4d7a4..7df5c8f7e5 100644 --- a/ethstore/src/json/id.rs +++ b/ethstore/src/json/id.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6498323be2..f8df3c2285 100644 --- a/ethstore/src/json/kdf.rs +++ b/ethstore/src/json/kdf.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 60b34681e2..2c3cf3fdd5 100644 --- a/ethstore/src/json/key_file.rs +++ b/ethstore/src/json/key_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -102,7 +102,6 @@ impl<'a> Deserialize<'a> for KeyFile { } } - fn none_if_empty<'a, T>(v: Option) -> Option where T: DeserializeOwned { diff --git a/ethstore/src/json/mod.rs b/ethstore/src/json/mod.rs index 865b75dea6..e39bff651e 100644 --- a/ethstore/src/json/mod.rs +++ b/ethstore/src/json/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/presale.rs b/ethstore/src/json/presale.rs index d1cffcb6ad..478f328a43 100644 --- a/ethstore/src/json/presale.rs +++ b/ethstore/src/json/presale.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::io::Read; use serde_json; use super::{H160, Bytes}; diff --git a/ethstore/src/json/vault_file.rs b/ethstore/src/json/vault_file.rs index d11e71451f..e962044227 100644 --- a/ethstore/src/json/vault_file.rs +++ b/ethstore/src/json/vault_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016, 2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/vault_key_file.rs b/ethstore/src/json/vault_key_file.rs index 76c59b3808..818487d52b 100644 --- a/ethstore/src/json/vault_key_file.rs +++ b/ethstore/src/json/vault_key_file.rs @@ -1,4 +1,4 @@ -// Copyright 2015, 2016, 2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0eb8450f14..683d4a520f 100644 --- a/ethstore/src/json/version.rs +++ b/ethstore/src/json/version.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -56,4 +56,3 @@ impl<'a> Visitor<'a> for VersionVisitor { } } } - diff --git a/ethstore/src/lib.rs b/ethstore/src/lib.rs index b558126ada..67e636dd5c 100644 --- a/ethstore/src/lib.rs +++ b/ethstore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/presale.rs b/ethstore/src/presale.rs index 555d00c1e9..d7b80d240c 100644 --- a/ethstore/src/presale.rs +++ b/ethstore/src/presale.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::fs; use std::path::Path; use json; diff --git a/ethstore/src/random.rs b/ethstore/src/random.rs index af754471e1..b8b7a71fa8 100644 --- a/ethstore/src/random.rs +++ b/ethstore/src/random.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -43,4 +43,3 @@ pub fn random_string(length: usize) -> String { let mut rng = OsRng::new().expect("Not able to operate without random source."); rng.gen_ascii_chars().take(length).collect() } - diff --git a/ethstore/src/secret_store.rs b/ethstore/src/secret_store.rs index ebac2f9922..fd37267a74 100644 --- a/ethstore/src/secret_store.rs +++ b/ethstore/src/secret_store.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 fb24ff3367..5e4eaab817 100644 --- a/ethstore/tests/api.rs +++ b/ethstore/tests/api.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c0002d4e13..1a7abc93ef 100644 --- a/ethstore/tests/util/mod.rs +++ b/ethstore/tests/util/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 dcc65ec698..c0969418d8 100644 --- a/ethstore/tests/util/transient_dir.rs +++ b/ethstore/tests/util/transient_dir.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/benches/mod.rs b/evmbin/benches/mod.rs index 6b6746e747..8fdd5e9cfe 100644 --- a/evmbin/benches/mod.rs +++ b/evmbin/benches/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -83,4 +83,3 @@ fn rng(gas: U256, b: &mut Bencher) { run_vm(params) }); } - diff --git a/evmbin/src/display/json.rs b/evmbin/src/display/json.rs index 00ca91b94f..ccee9c3717 100644 --- a/evmbin/src/display/json.rs +++ b/evmbin/src/display/json.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -156,7 +156,6 @@ impl trace::VMTracer for Informant { self.storage.insert(pos.into(), val.into()); } - if !self.subtraces.is_empty() { self.traces.extend(mem::replace(&mut self.subtraces, vec![])); } diff --git a/evmbin/src/display/mod.rs b/evmbin/src/display/mod.rs index b9390058b6..a8eb20d9e6 100644 --- a/evmbin/src/display/mod.rs +++ b/evmbin/src/display/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/display/simple.rs b/evmbin/src/display/simple.rs index 30bb8ffcf7..8ff863cfa9 100644 --- a/evmbin/src/display/simple.rs +++ b/evmbin/src/display/simple.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/display/std_json.rs b/evmbin/src/display/std_json.rs index 3d8f52dbd1..6c4dac1626 100644 --- a/evmbin/src/display/std_json.rs +++ b/evmbin/src/display/std_json.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/info.rs b/evmbin/src/info.rs index 1be81d9132..d1cd3cf6fc 100644 --- a/evmbin/src/info.rs +++ b/evmbin/src/info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 bddb40ecd2..4620143f76 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -83,7 +83,6 @@ General options: -h, --help Display this message and exit. "#; - fn main() { panic_hook::set(); diff --git a/hash-fetch/src/client.rs b/hash-fetch/src/client.rs index 1c7d417758..ebdab681a4 100644 --- a/hash-fetch/src/client.rs +++ b/hash-fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/hash-fetch/src/lib.rs b/hash-fetch/src/lib.rs index 18176be500..bdbb0e3505 100644 --- a/hash-fetch/src/lib.rs +++ b/hash-fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/hash-fetch/src/urlhint.rs b/hash-fetch/src/urlhint.rs index d05dd40a22..d80566ea62 100644 --- a/hash-fetch/src/urlhint.rs +++ b/hash-fetch/src/urlhint.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -265,8 +265,6 @@ pub mod tests { let calls = registrar.calls.clone(); let urlhint = URLHintContract::new(Arc::new(registrar)); - - // when let res = urlhint.resolve("test".as_bytes().into()).wait().unwrap(); let calls = calls.lock(); @@ -353,7 +351,6 @@ pub mod tests { let url4 = "https://parity.io/parity.png#content-type=image/jpeg"; let url5 = "https://parity.io/parity.png"; - assert_eq!(guess_mime_type(url1), None); assert_eq!(guess_mime_type(url2), Some(mime::IMAGE_PNG)); assert_eq!(guess_mime_type(url3), Some(mime::IMAGE_PNG)); diff --git a/hw/src/ledger.rs b/hw/src/ledger.rs index e31d49f130..992a565d5a 100644 --- a/hw/src/ledger.rs +++ b/hw/src/ledger.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/hw/src/lib.rs b/hw/src/lib.rs index f51be356ae..4cc0d30856 100644 --- a/hw/src/lib.rs +++ b/hw/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -92,7 +92,6 @@ pub trait Wallet<'a> { where F: Fn() -> Result; } - /// Hardware wallet error. #[derive(Debug)] pub enum Error { diff --git a/hw/src/trezor.rs b/hw/src/trezor.rs index 044e5487b4..21dcd9c9fd 100644 --- a/hw/src/trezor.rs +++ b/hw/src/trezor.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -164,7 +164,6 @@ impl Manager { unlocked } - fn u256_to_be_vec(&self, val: &U256) -> Vec { let mut buf = [0u8; 32]; val.to_big_endian(&mut buf); diff --git a/ipfs/src/error.rs b/ipfs/src/error.rs index fadd75b9b4..1ff2829553 100644 --- a/ipfs/src/error.rs +++ b/ipfs/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipfs/src/lib.rs b/ipfs/src/lib.rs index bb7d0c3897..7f6ebe77c4 100644 --- a/ipfs/src/lib.rs +++ b/ipfs/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/ipfs/src/route.rs b/ipfs/src/route.rs index 2beb4ccc37..8f57fc4d10 100644 --- a/ipfs/src/route.rs +++ b/ipfs/src/route.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 66b5f9b844..38a0b1fa9c 100644 --- a/json/src/blockchain/account.rs +++ b/json/src/blockchain/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 503230f09e..5a6c995658 100644 --- a/json/src/blockchain/block.rs +++ b/json/src/blockchain/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 9edd753130..9e4d650b85 100644 --- a/json/src/blockchain/blockchain.rs +++ b/json/src/blockchain/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 667a36bb1b..ee79a928ea 100644 --- a/json/src/blockchain/header.rs +++ b/json/src/blockchain/header.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e1faa07880..0d8e7ff78f 100644 --- a/json/src/blockchain/mod.rs +++ b/json/src/blockchain/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a64887572b..e23a31efa0 100644 --- a/json/src/blockchain/state.rs +++ b/json/src/blockchain/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 018ae767dd..792303dc7e 100644 --- a/json/src/blockchain/test.rs +++ b/json/src/blockchain/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6b3550fd78..f14dd5e336 100644 --- a/json/src/blockchain/transaction.rs +++ b/json/src/blockchain/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 79ba4f896b..3eb1f54152 100644 --- a/json/src/bytes.rs +++ b/json/src/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 54aea04365..8dac3f6e73 100644 --- a/json/src/hash.rs +++ b/json/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -23,7 +23,6 @@ use serde::de::{Error, Visitor}; use rustc_hex::ToHex; use ethereum_types::{H64 as Hash64, H160 as Hash160, H256 as Hash256, H520 as Hash520, Bloom as Hash2048}; - macro_rules! impl_hash { ($name: ident, $inner: ident) => { /// Lenient hash json deserialization for test json files. diff --git a/json/src/lib.rs b/json/src/lib.rs index 3cb1e49f57..5d31cd6c97 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/maybe.rs b/json/src/maybe.rs index 8b74b22c48..1f77a98ef1 100644 --- a/json/src/maybe.rs +++ b/json/src/maybe.rs @@ -1,3 +1,18 @@ +// Copyright 2015-2018 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 . //! Deserializer of empty string values into optionals. diff --git a/json/src/misc/account_meta.rs b/json/src/misc/account_meta.rs index 9c4d67286e..cb6ed1c877 100644 --- a/json/src/misc/account_meta.rs +++ b/json/src/misc/account_meta.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 5081c62b28..f59f5f1cf6 100644 --- a/json/src/misc/dapps_settings.rs +++ b/json/src/misc/dapps_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 d587f2f157..836094f0c0 100644 --- a/json/src/misc/mod.rs +++ b/json/src/misc/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 fb41137aa9..acc6d96b58 100644 --- a/json/src/spec/account.rs +++ b/json/src/spec/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 4ef9368362..e355c6fe95 100644 --- a/json/src/spec/authority_round.rs +++ b/json/src/spec/authority_round.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0a257f134b..1e5c6b8456 100644 --- a/json/src/spec/basic_authority.rs +++ b/json/src/spec/basic_authority.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 34e9a2df1c..850867d095 100644 --- a/json/src/spec/builtin.rs +++ b/json/src/spec/builtin.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e2545a5f90..55b9c1b2af 100644 --- a/json/src/spec/engine.rs +++ b/json/src/spec/engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -142,4 +142,3 @@ mod tests { }; } } - diff --git a/json/src/spec/ethash.rs b/json/src/spec/ethash.rs index 66f6913e57..19fd096627 100644 --- a/json/src/spec/ethash.rs +++ b/json/src/spec/ethash.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 f595e7750f..d8e2ad5357 100644 --- a/json/src/spec/genesis.rs +++ b/json/src/spec/genesis.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/hardcoded_sync.rs b/json/src/spec/hardcoded_sync.rs index 548fd66f0f..8b00b5413b 100644 --- a/json/src/spec/hardcoded_sync.rs +++ b/json/src/spec/hardcoded_sync.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 285596f14a..26965c887d 100644 --- a/json/src/spec/mod.rs +++ b/json/src/spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/null_engine.rs b/json/src/spec/null_engine.rs index cfd3d6ce63..87827bd5b9 100644 --- a/json/src/spec/null_engine.rs +++ b/json/src/spec/null_engine.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 f171a88101..e03fe7081b 100644 --- a/json/src/spec/params.rs +++ b/json/src/spec/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6654a309a3..b61d141d64 100644 --- a/json/src/spec/seal.rs +++ b/json/src/spec/seal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 7003cb4cfc..2be695689e 100644 --- a/json/src/spec/spec.rs +++ b/json/src/spec/spec.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 ad6f2e548d..d15ad540ce 100644 --- a/json/src/spec/state.rs +++ b/json/src/spec/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/tendermint.rs b/json/src/spec/tendermint.rs index 8f3d4c2248..e0a6568aa9 100644 --- a/json/src/spec/tendermint.rs +++ b/json/src/spec/tendermint.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/validator_set.rs b/json/src/spec/validator_set.rs index 9c6b4e79a1..41fa60961a 100644 --- a/json/src/spec/validator_set.rs +++ b/json/src/spec/validator_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 823979f627..1e07d9ed1e 100644 --- a/json/src/state/log.rs +++ b/json/src/state/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 316744983c..6037ca514d 100644 --- a/json/src/state/mod.rs +++ b/json/src/state/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 9daecaed8e..c6837d1fd6 100644 --- a/json/src/state/state.rs +++ b/json/src/state/state.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3a25c007df..528a49b5a6 100644 --- a/json/src/state/test.rs +++ b/json/src/state/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 606c40f21f..89edb08692 100644 --- a/json/src/state/transaction.rs +++ b/json/src/state/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/test/mod.rs b/json/src/test/mod.rs index 1a6e4db7da..8f95a9aec4 100644 --- a/json/src/test/mod.rs +++ b/json/src/test/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -64,4 +64,3 @@ impl DifficultyTest { serde_json::from_reader(reader) } } - diff --git a/json/src/transaction/mod.rs b/json/src/transaction/mod.rs index 5cde3eff40..8ebab3f1c2 100644 --- a/json/src/transaction/mod.rs +++ b/json/src/transaction/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a2ef9ad36a..e1bd588de3 100644 --- a/json/src/transaction/test.rs +++ b/json/src/transaction/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 d9b6abb14e..13b342b3f6 100644 --- a/json/src/transaction/transaction.rs +++ b/json/src/transaction/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 33bc0152f2..60d65e70d6 100644 --- a/json/src/transaction/txtest.rs +++ b/json/src/transaction/txtest.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c84f1aa1e1..e1c46ac537 100644 --- a/json/src/trie/input.rs +++ b/json/src/trie/input.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 ce19922058..5dc52cb21d 100644 --- a/json/src/trie/mod.rs +++ b/json/src/trie/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 30811ca661..c6cd99c25e 100644 --- a/json/src/trie/test.rs +++ b/json/src/trie/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e4951f8141..ca18de7daa 100644 --- a/json/src/trie/trie.rs +++ b/json/src/trie/trie.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 70e0390a34..25c5049c45 100644 --- a/json/src/uint.rs +++ b/json/src/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 39d5a828eb..026951c028 100644 --- a/json/src/vm/call.rs +++ b/json/src/vm/call.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c7f0ccd725..f4af8119c3 100644 --- a/json/src/vm/env.rs +++ b/json/src/vm/env.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a2588e37c7..29b12d4805 100644 --- a/json/src/vm/mod.rs +++ b/json/src/vm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 68112e6015..10b4aae54f 100644 --- a/json/src/vm/test.rs +++ b/json/src/vm/test.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 efdad0f9cc..44b79e8622 100644 --- a/json/src/vm/transaction.rs +++ b/json/src/vm/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 8cc01e3bac..7fd101da83 100644 --- a/json/src/vm/vm.rs +++ b/json/src/vm/vm.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 f90ec463dc..4738554f91 100644 --- a/license_header +++ b/license_header @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/local-store/src/lib.rs b/local-store/src/lib.rs index 078dff36ed..83bc07b901 100644 --- a/local-store/src/lib.rs +++ b/local-store/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/src/lib.rs b/logger/src/lib.rs index 863075a0e5..2a50969802 100644 --- a/logger/src/lib.rs +++ b/logger/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/src/rotating.rs b/logger/src/rotating.rs index e67bdfaad0..ddc24792ae 100644 --- a/logger/src/rotating.rs +++ b/logger/src/rotating.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -121,4 +121,3 @@ mod test { assert_eq!(logs.len(), 2); } } - diff --git a/machine/src/lib.rs b/machine/src/lib.rs index 075a42d731..6d152851da 100644 --- a/machine/src/lib.rs +++ b/machine/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/external.rs b/miner/src/external.rs index b49a9a4e2c..a56be42f02 100644 --- a/miner/src/external.rs +++ b/miner/src/external.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -106,7 +106,6 @@ mod tests { m.submit_hashrate(U256::from(15), H256::from(1)); m.submit_hashrate(U256::from(20), H256::from(2)); - // then assert_eq!(m.hashrate(), U256::from(35)); } diff --git a/miner/src/gas_pricer.rs b/miner/src/gas_pricer.rs index f826ccf77d..ecb69ba572 100644 --- a/miner/src/gas_pricer.rs +++ b/miner/src/gas_pricer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/lib.rs b/miner/src/lib.rs index 08ea7d204f..107b9b22b5 100644 --- a/miner/src/lib.rs +++ b/miner/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/pool/client.rs b/miner/src/pool/client.rs index 622e9a8492..bdf57312ee 100644 --- a/miner/src/pool/client.rs +++ b/miner/src/pool/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/pool/listener.rs b/miner/src/pool/listener.rs index 3f42372e84..e881a2ba29 100644 --- a/miner/src/pool/listener.rs +++ b/miner/src/pool/listener.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -64,7 +64,6 @@ impl txpool::Listener for Notifier { } } - /// Transaction pool logger. #[derive(Default, Debug)] pub struct Logger; @@ -113,7 +112,6 @@ impl txpool::Listener for Logger { } } - #[cfg(test)] mod tests { use super::*; diff --git a/miner/src/pool/local_transactions.rs b/miner/src/pool/local_transactions.rs index 12ffa84c19..d69da3347a 100644 --- a/miner/src/pool/local_transactions.rs +++ b/miner/src/pool/local_transactions.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -190,7 +190,6 @@ impl txpool::Listener for LocalTransactionsList { self.clear_old(); } - /// The transaction has been mined. fn mined(&mut self, tx: &Arc) { if !tx.priority().is_local() { diff --git a/miner/src/pool/mod.rs b/miner/src/pool/mod.rs index 45d28f3c12..57f813157b 100644 --- a/miner/src/pool/mod.rs +++ b/miner/src/pool/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/pool/queue.rs b/miner/src/pool/queue.rs index 8cf4534b76..bd5a98edc7 100644 --- a/miner/src/pool/queue.rs +++ b/miner/src/pool/queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -412,7 +412,6 @@ impl TransactionQueue { } } - fn convert_error(err: txpool::Error) -> transaction::Error { use self::txpool::ErrorKind; diff --git a/miner/src/pool/ready.rs b/miner/src/pool/ready.rs index c2829b34a9..0b4d27f7f2 100644 --- a/miner/src/pool/ready.rs +++ b/miner/src/pool/ready.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -83,7 +83,6 @@ impl txpool::Ready for State { _ => {}, } - let sender = tx.sender(); let state = &self.state; let state_nonce = || state.account_nonce(sender); diff --git a/miner/src/pool/scoring.rs b/miner/src/pool/scoring.rs index aedc40e1f2..e7551ed6a3 100644 --- a/miner/src/pool/scoring.rs +++ b/miner/src/pool/scoring.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/pool/tests/client.rs b/miner/src/pool/tests/client.rs index a00cc541eb..101b6cdc21 100644 --- a/miner/src/pool/tests/client.rs +++ b/miner/src/pool/tests/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/miner/src/pool/tests/mod.rs b/miner/src/pool/tests/mod.rs index 85dedaaa45..552903a4bb 100644 --- a/miner/src/pool/tests/mod.rs +++ b/miner/src/pool/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -491,7 +491,6 @@ fn should_accept_same_transaction_twice_if_removed() { let (tx1, _) = txs.clone(); let (hash, _) = txs.hash(); - let res = txq.import(TestClient::new(), txs.local().into_vec()); assert_eq!(res, vec![Ok(()), Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); @@ -731,7 +730,6 @@ fn should_not_return_transactions_over_nonce_cap() { // This should invalidate the cache! let limited = txq.pending(TestClient::new(), 0, 0, Some(123.into())); - // then assert_eq!(all.len(), 3); assert_eq!(limited.len(), 1); diff --git a/miner/src/pool/tests/tx.rs b/miner/src/pool/tests/tx.rs index c0f8751ebb..a8b06f5436 100644 --- a/miner/src/pool/tests/tx.rs +++ b/miner/src/pool/tests/tx.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -64,7 +64,6 @@ impl Tx { self.nonce += 1; let tx3 = self.unsigned().sign(keypair.secret(), None); - (tx1, tx2, tx3) } diff --git a/miner/src/pool/verifier.rs b/miner/src/pool/verifier.rs index 0a89a784b1..4675303928 100644 --- a/miner/src/pool/verifier.rs +++ b/miner/src/pool/verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -91,7 +91,6 @@ impl Transaction { } } - fn gas_price(&self) -> &U256 { match *self { Transaction::Unverified(ref tx) => &tx.gas_price, diff --git a/miner/src/work_notify.rs b/miner/src/work_notify.rs index 3436938097..8825fd4b65 100644 --- a/miner/src/work_notify.rs +++ b/miner/src/work_notify.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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-clib-example/main.cpp b/parity-clib-example/main.cpp index becce8598e..c5e83d0649 100644 --- a/parity-clib-example/main.cpp +++ b/parity-clib-example/main.cpp @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + #include #include #include diff --git a/parity-clib/src/lib.rs b/parity-clib/src/lib.rs index fe631ce8a8..f7a98f811d 100644 --- a/parity-clib/src/lib.rs +++ b/parity-clib/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 676cf93e73..c2f15546e6 100644 --- a/parity/account.rs +++ b/parity/account.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 027814f245..d33ac1eacb 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0bf0717a30..5848e404c2 100644 --- a/parity/cache.rs +++ b/parity/cache.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/presets/mod.rs b/parity/cli/presets/mod.rs index ca1ad4559b..125ab510c3 100644 --- a/parity/cli/presets/mod.rs +++ b/parity/cli/presets/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -25,4 +25,4 @@ pub fn preset_config_string(arg: &str) -> Result<&'static str, Error> { "dev-insecure" => Ok(include_str!("./config.dev-insecure.toml")), _ => Err(Error::new(ErrorKind::InvalidInput, "Config doesn't match any presets [dev, mining, non-standard-ports, insecure, dev-insecure]")) } -} \ No newline at end of file +} diff --git a/parity/cli/usage.rs b/parity/cli/usage.rs index ce138fdff3..9a892c0091 100644 --- a/parity/cli/usage.rs +++ b/parity/cli/usage.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 426b651015..6f475aa83c 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -1982,7 +1982,6 @@ mod tests { assert_eq!(conf0.ipfs_config().port, 5002); assert_eq!(conf0.stratum_options().unwrap().unwrap().port, 8009); - assert_eq!(conf1.net_addresses().unwrap().0.port(), 30304); assert_eq!(conf1.network_settings().unwrap().network_port, 30304); assert_eq!(conf1.network_settings().unwrap().rpc_port, 8545); diff --git a/parity/dapps.rs b/parity/dapps.rs index 2219f7cbee..427bfa53b3 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/db/rocksdb/migration.rs b/parity/db/rocksdb/migration.rs index df6a4b5dc9..e92a9db035 100644 --- a/parity/db/rocksdb/migration.rs +++ b/parity/db/rocksdb/migration.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -40,7 +40,6 @@ pub const TO_V12: ChangeColumns = ChangeColumns { version: 12, }; - /// Database is assumed to be at default version, when no version file is found. const DEFAULT_VERSION: u32 = 5; /// Current version of database models. diff --git a/parity/deprecated.rs b/parity/deprecated.rs index b41475d9db..f3e433d138 100644 --- a/parity/deprecated.rs +++ b/parity/deprecated.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -160,4 +160,3 @@ mod tests { ]); } } - diff --git a/parity/export_hardcoded_sync.rs b/parity/export_hardcoded_sync.rs index 3aa2b56149..008a5b9ecd 100644 --- a/parity/export_hardcoded_sync.rs +++ b/parity/export_hardcoded_sync.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a5ec3c99d4..8de3728c3a 100644 --- a/parity/helpers.rs +++ b/parity/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/ipfs.rs b/parity/ipfs.rs index ac9a4662b2..2cc2effca5 100644 --- a/parity/ipfs.rs +++ b/parity/ipfs.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light_helpers/epoch_fetch.rs b/parity/light_helpers/epoch_fetch.rs index 1b9ae86484..a7d8f4171f 100644 --- a/parity/light_helpers/epoch_fetch.rs +++ b/parity/light_helpers/epoch_fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light_helpers/mod.rs b/parity/light_helpers/mod.rs index 5fc9c516b4..c30b62da55 100644 --- a/parity/light_helpers/mod.rs +++ b/parity/light_helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light_helpers/queue_cull.rs b/parity/light_helpers/queue_cull.rs index b6be59e2ce..03ec2efe74 100644 --- a/parity/light_helpers/queue_cull.rs +++ b/parity/light_helpers/queue_cull.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 cf46149b8e..e12e8ee458 100644 --- a/parity/modules.rs +++ b/parity/modules.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/params.rs b/parity/params.rs index 957b280193..9ceac1e4f0 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 216ff66a84..4106ad8992 100644 --- a/parity/presale.rs +++ b/parity/presale.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 21bc9a4096..cdc8e7ca5b 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -212,7 +212,6 @@ pub fn new_ws( let url = format!("{}:{}", conf.interface, conf.port); let addr = url.parse().map_err(|_| format!("Invalid WebSockets listen host/port given: {}", url))?; - let full_handler = setup_apis(rpc_apis::ApiSet::SafeContext, deps); let handler = { let mut handler = MetaIoHandler::with_middleware(( diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index 855f917b13..ce30f3cd85 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/run.rs b/parity/run.rs index bd8d4fb4a8..b1bf67f022 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/secretstore.rs b/parity/secretstore.rs index 168a9b3fcf..3b4a4e468c 100644 --- a/parity/secretstore.rs +++ b/parity/secretstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/signer.rs b/parity/signer.rs index ab476ef9d7..4388e11aa8 100644 --- a/parity/signer.rs +++ b/parity/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3c0dadedaa..90ae8327a6 100644 --- a/parity/snapshot.rs +++ b/parity/snapshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 043ba50622..efaa6b307c 100644 --- a/parity/stratum.rs +++ b/parity/stratum.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/upgrade.rs b/parity/upgrade.rs index c5c2e1ed48..d98123ce13 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 4f547c28f0..d9eb2c9d3c 100644 --- a/parity/url.rs +++ b/parity/url.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 be91e302eb..cb4a0a40a4 100644 --- a/parity/user_defaults.rs +++ b/parity/user_defaults.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/whisper.rs b/parity/whisper.rs index bb9aebf0b9..c3c8854dcb 100644 --- a/parity/whisper.rs +++ b/parity/whisper.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/price-info/src/lib.rs b/price-info/src/lib.rs index e3594ad2ae..93dacca338 100644 --- a/price-info/src/lib.rs +++ b/price-info/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/registrar/src/lib.rs b/registrar/src/lib.rs index 961fbb17ee..aad33765ef 100644 --- a/registrar/src/lib.rs +++ b/registrar/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/registrar/src/registrar.rs b/registrar/src/registrar.rs index c4128660d2..0a17de499a 100644 --- a/registrar/src/registrar.rs +++ b/registrar/src/registrar.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -74,4 +74,3 @@ pub trait RegistrarClient: Send + Sync { /// Call Contract fn call_contract(&self, address: Address, data: Bytes) -> Self::Call; } - diff --git a/rpc/src/authcodes.rs b/rpc/src/authcodes.rs index d18d0741fd..5b7309a317 100644 --- a/rpc/src/authcodes.rs +++ b/rpc/src/authcodes.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/http_common.rs b/rpc/src/http_common.rs index 72af6e4697..8296720b20 100644 --- a/rpc/src/http_common.rs +++ b/rpc/src/http_common.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 1fc3d0e242..2d49a8c771 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/tests/helpers.rs b/rpc/src/tests/helpers.rs index db61353d53..602648d063 100644 --- a/rpc/src/tests/helpers.rs +++ b/rpc/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/tests/mod.rs b/rpc/src/tests/mod.rs index d4d9538dca..6ecab3299a 100644 --- a/rpc/src/tests/mod.rs +++ b/rpc/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/tests/rpc.rs b/rpc/src/tests/rpc.rs index 6e2900c8b7..015c2764a6 100644 --- a/rpc/src/tests/rpc.rs +++ b/rpc/src/tests/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/tests/ws.rs b/rpc/src/tests/ws.rs index 429ff6d3c4..91f10e6475 100644 --- a/rpc/src/tests/ws.rs +++ b/rpc/src/tests/ws.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -177,7 +177,6 @@ mod testing { ) ); - // then assert_eq!(response1.status, "HTTP/1.1 101 Switching Protocols".to_owned()); assert_eq!(response2.status, "HTTP/1.1 403 Forbidden".to_owned()); diff --git a/rpc/src/v1/extractors.rs b/rpc/src/v1/extractors.rs index 071e57dae4..c69c41dddf 100644 --- a/rpc/src/v1/extractors.rs +++ b/rpc/src/v1/extractors.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/accounts.rs b/rpc/src/v1/helpers/accounts.rs new file mode 100644 index 0000000000..4268bf2f99 --- /dev/null +++ b/rpc/src/v1/helpers/accounts.rs @@ -0,0 +1,27 @@ +// Copyright 2015-2018 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; +use ethcore::account_provider::AccountProvider; +use jsonrpc_core::Error; +use v1::helpers::errors; + +pub fn unwrap_provider(provider: &Option>) -> Result, Error> { + match *provider { + Some(ref arc) => Ok(arc.clone()), + None => Err(errors::public_unsupported(None)), + } +} diff --git a/rpc/src/v1/helpers/block_import.rs b/rpc/src/v1/helpers/block_import.rs index 1246faa658..9e947e5baa 100644 --- a/rpc/src/v1/helpers/block_import.rs +++ b/rpc/src/v1/helpers/block_import.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -35,7 +35,6 @@ mod tests { use sync::SyncState; use super::is_major_importing; - fn queue_info(unverified: usize, verified: usize) -> BlockQueueInfo { BlockQueueInfo { unverified_queue_size: unverified, diff --git a/rpc/src/v1/helpers/dapps.rs b/rpc/src/v1/helpers/dapps.rs index 391a12c824..88a9cce6fb 100644 --- a/rpc/src/v1/helpers/dapps.rs +++ b/rpc/src/v1/helpers/dapps.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 1f43ef008e..9bec8e1d31 100644 --- a/rpc/src/v1/helpers/dispatch.rs +++ b/rpc/src/v1/helpers/dispatch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0d36a926e9..6207d4542f 100644 --- a/rpc/src/v1/helpers/errors.rs +++ b/rpc/src/v1/helpers/errors.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/fake_sign.rs b/rpc/src/v1/helpers/fake_sign.rs index 84a225d814..eca8a5abbd 100644 --- a/rpc/src/v1/helpers/fake_sign.rs +++ b/rpc/src/v1/helpers/fake_sign.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/ipfs.rs b/rpc/src/v1/helpers/ipfs.rs index da51f1fd54..12980d3f41 100644 --- a/rpc/src/v1/helpers/ipfs.rs +++ b/rpc/src/v1/helpers/ipfs.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light_fetch.rs b/rpc/src/v1/helpers/light_fetch.rs index 1baf9a7647..c11f47a456 100644 --- a/rpc/src/v1/helpers/light_fetch.rs +++ b/rpc/src/v1/helpers/light_fetch.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -86,7 +86,6 @@ pub fn extract_transaction_at_index(block: encoded::Block, index: usize, eip86_t .map(|tx| Transaction::from_localized(tx, eip86_transition)) } - /// Type alias for convenience. pub type ExecutionResult = ::std::result::Result; diff --git a/rpc/src/v1/helpers/mod.rs b/rpc/src/v1/helpers/mod.rs index 9adb5d68d4..97b96675e4 100644 --- a/rpc/src/v1/helpers/mod.rs +++ b/rpc/src/v1/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a798286244..d011d2394f 100644 --- a/rpc/src/v1/helpers/network_settings.rs +++ b/rpc/src/v1/helpers/network_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -13,6 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . + //! Structure to hold network settings configured from CLI /// Networking & RPC settings diff --git a/rpc/src/v1/helpers/nonce.rs b/rpc/src/v1/helpers/nonce.rs index 06f38a8589..12dfd3d520 100644 --- a/rpc/src/v1/helpers/nonce.rs +++ b/rpc/src/v1/helpers/nonce.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 harity Technologies (UK) Ltd. +// Copyright 2015-2018 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/oneshot.rs b/rpc/src/v1/helpers/oneshot.rs index 89e90dbd18..5ede0ae912 100644 --- a/rpc/src/v1/helpers/oneshot.rs +++ b/rpc/src/v1/helpers/oneshot.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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_filter.rs b/rpc/src/v1/helpers/poll_filter.rs index 7ef8db0f15..c7284d6651 100644 --- a/rpc/src/v1/helpers/poll_filter.rs +++ b/rpc/src/v1/helpers/poll_filter.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + //! Helper type with all filter state data. use std::collections::HashSet; diff --git a/rpc/src/v1/helpers/poll_manager.rs b/rpc/src/v1/helpers/poll_manager.rs index f367f669fd..e176ed440e 100644 --- a/rpc/src/v1/helpers/poll_manager.rs +++ b/rpc/src/v1/helpers/poll_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 13bfbb1b38..478f6785b4 100644 --- a/rpc/src/v1/helpers/requests.rs +++ b/rpc/src/v1/helpers/requests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/secretstore.rs b/rpc/src/v1/helpers/secretstore.rs index 019d2b1051..f23222824f 100644 --- a/rpc/src/v1/helpers/secretstore.rs +++ b/rpc/src/v1/helpers/secretstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6d9606f878..0ee14bad1b 100644 --- a/rpc/src/v1/helpers/signer.rs +++ b/rpc/src/v1/helpers/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -88,4 +88,3 @@ impl Deref for SignerService { &self.queue } } - diff --git a/rpc/src/v1/helpers/signing_queue.rs b/rpc/src/v1/helpers/signing_queue.rs index b73535ba4f..c6a8048825 100644 --- a/rpc/src/v1/helpers/signing_queue.rs +++ b/rpc/src/v1/helpers/signing_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -227,7 +227,6 @@ impl SigningQueue for ConfirmationsQueue { } } - #[cfg(test)] mod test { use std::sync::Arc; diff --git a/rpc/src/v1/helpers/subscribers.rs b/rpc/src/v1/helpers/subscribers.rs index 11dd45d11b..6871207643 100644 --- a/rpc/src/v1/helpers/subscribers.rs +++ b/rpc/src/v1/helpers/subscribers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -22,7 +22,6 @@ use jsonrpc_macros::pubsub::{Subscriber, Sink, SubscriptionId}; use rand::{Rng, StdRng}; use v1::types::H64; - #[derive(Debug, Clone, Hash, Eq, PartialEq)] pub struct Id(H64); impl str::FromStr for Id { diff --git a/rpc/src/v1/helpers/subscription_manager.rs b/rpc/src/v1/helpers/subscription_manager.rs index 5988824b6a..5f6d77d883 100644 --- a/rpc/src/v1/helpers/subscription_manager.rs +++ b/rpc/src/v1/helpers/subscription_manager.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 32ba36deb8..38e36cf11c 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -495,7 +495,6 @@ impl Eth for EthClient< _ => (false, None, None), }; - if warping || is_major_importing(Some(status.state), client.queue_info()) { let chain_info = client.chain_info(); let current_block = U256::from(chain_info.best_block_number); diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index 6ca1c355f3..bbad2fe27d 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -102,8 +102,6 @@ impl Filterable for EthFilterClient where fn polls(&self) -> &Mutex> { &self.polls } } - - impl EthFilter for T { fn new_filter(&self, filter: Filter) -> Result { let mut polls = self.polls().lock(); diff --git a/rpc/src/v1/impls/eth_pubsub.rs b/rpc/src/v1/impls/eth_pubsub.rs index c0789910c3..11fef2e0bd 100644 --- a/rpc/src/v1/impls/eth_pubsub.rs +++ b/rpc/src/v1/impls/eth_pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light/eth.rs b/rpc/src/v1/impls/light/eth.rs index 10ad024f24..68afe649b8 100644 --- a/rpc/src/v1/impls/light/eth.rs +++ b/rpc/src/v1/impls/light/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light/mod.rs b/rpc/src/v1/impls/light/mod.rs index 38ba2438e2..40f1df8990 100644 --- a/rpc/src/v1/impls/light/mod.rs +++ b/rpc/src/v1/impls/light/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light/net.rs b/rpc/src/v1/impls/light/net.rs index 1b374247a3..4dbc9d1908 100644 --- a/rpc/src/v1/impls/light/net.rs +++ b/rpc/src/v1/impls/light/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light/parity.rs b/rpc/src/v1/impls/light/parity.rs index 025538fc42..91db00ca30 100644 --- a/rpc/src/v1/impls/light/parity.rs +++ b/rpc/src/v1/impls/light/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light/parity_set.rs b/rpc/src/v1/impls/light/parity_set.rs index 76c33cf458..4e907deaf1 100644 --- a/rpc/src/v1/impls/light/parity_set.rs +++ b/rpc/src/v1/impls/light/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/light/trace.rs b/rpc/src/v1/impls/light/trace.rs index 1d2c7fcaa0..d1e99fb9a1 100644 --- a/rpc/src/v1/impls/light/trace.rs +++ b/rpc/src/v1/impls/light/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 4edaf6bcd2..1349147207 100644 --- a/rpc/src/v1/impls/mod.rs +++ b/rpc/src/v1/impls/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3f42f01b94..74521d8135 100644 --- a/rpc/src/v1/impls/net.rs +++ b/rpc/src/v1/impls/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 f5d4a58949..e3ad5a3b1b 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 adb97db28d..eb069cf27f 100644 --- a/rpc/src/v1/impls/parity_accounts.rs +++ b/rpc/src/v1/impls/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 612e6aa78b..4ba9ab658e 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 da5ef983a2..045496fc95 100644 --- a/rpc/src/v1/impls/personal.rs +++ b/rpc/src/v1/impls/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/private.rs b/rpc/src/v1/impls/private.rs index 4034d2b9a1..a1110eed11 100644 --- a/rpc/src/v1/impls/private.rs +++ b/rpc/src/v1/impls/private.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/pubsub.rs b/rpc/src/v1/impls/pubsub.rs index 59eef19533..564c8b90d5 100644 --- a/rpc/src/v1/impls/pubsub.rs +++ b/rpc/src/v1/impls/pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3c76a31646..9f15cc1a38 100644 --- a/rpc/src/v1/impls/rpc.rs +++ b/rpc/src/v1/impls/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/secretstore.rs b/rpc/src/v1/impls/secretstore.rs index f85fa6f584..52404a58d0 100644 --- a/rpc/src/v1/impls/secretstore.rs +++ b/rpc/src/v1/impls/secretstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 eafa07ad4d..14fd6a33a4 100644 --- a/rpc/src/v1/impls/signer.rs +++ b/rpc/src/v1/impls/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 71cf18a06b..6229a54c84 100644 --- a/rpc/src/v1/impls/signing.rs +++ b/rpc/src/v1/impls/signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 75f5f5e2bf..f14d1e028d 100644 --- a/rpc/src/v1/impls/signing_unsafe.rs +++ b/rpc/src/v1/impls/signing_unsafe.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0130b3b9c1..0e43d8c11a 100644 --- a/rpc/src/v1/impls/traces.rs +++ b/rpc/src/v1/impls/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6fd6ff7a46..aa30447285 100644 --- a/rpc/src/v1/impls/web3.rs +++ b/rpc/src/v1/impls/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/informant.rs b/rpc/src/v1/informant.rs index 9a9cde3837..07a70eeb10 100644 --- a/rpc/src/v1/informant.rs +++ b/rpc/src/v1/informant.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/metadata.rs b/rpc/src/v1/metadata.rs index f0644d455c..970ec60e48 100644 --- a/rpc/src/v1/metadata.rs +++ b/rpc/src/v1/metadata.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 154317eb2f..cb510ae294 100644 --- a/rpc/src/v1/mod.rs +++ b/rpc/src/v1/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/eth.rs b/rpc/src/v1/tests/eth.rs index e0931ae6bf..7354eb18b0 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2016 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/dapps.rs b/rpc/src/v1/tests/helpers/dapps.rs index 10c54cf4c2..70f42a29e5 100644 --- a/rpc/src/v1/tests/helpers/dapps.rs +++ b/rpc/src/v1/tests/helpers/dapps.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6781d10b95..90201e346a 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-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 8e1aeeb147..a2782eec60 100644 --- a/rpc/src/v1/tests/helpers/mod.rs +++ b/rpc/src/v1/tests/helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 91cd14d73f..4e45488dbe 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-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a5ca4a4b36..7cb0acffef 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-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -123,4 +123,3 @@ impl SyncProvider for TestSyncProvider { ] } } - diff --git a/rpc/src/v1/tests/helpers/update_service.rs b/rpc/src/v1/tests/helpers/update_service.rs index eaa3b06fbe..3c4d0b1d7d 100644 --- a/rpc/src/v1/tests/helpers/update_service.rs +++ b/rpc/src/v1/tests/helpers/update_service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a6c8772439..a8875a3354 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -149,7 +149,6 @@ fn rpc_eth_syncing() { // causes TestBlockChainClient to return 1000 for its best block number. tester.add_blocks(1000, EachBlockWith::Nothing); - let true_res = r#"{"jsonrpc":"2.0","result":{"currentBlock":"0x3e8","highestBlock":"0x9c4","startingBlock":"0x0","warpChunksAmount":null,"warpChunksProcessed":null},"id":1}"#; assert_eq!(tester.io.handle_request_sync(request), Some(true_res.to_owned())); @@ -221,7 +220,6 @@ fn rpc_eth_logs() { log_index: 1, }]); - let request1 = r#"{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{}], "id": 1}"#; let request2 = r#"{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"limit":1}], "id": 1}"#; let request3 = r#"{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"limit":0}], "id": 1}"#; @@ -582,7 +580,6 @@ fn rpc_eth_pending_transaction_by_hash() { assert_eq!(tester.io.handle_request_sync(request), Some(response.to_owned())); } - #[test] fn rpc_eth_uncle_count_by_block_hash() { let request = r#"{ @@ -933,7 +930,6 @@ fn rpc_eth_send_transaction_with_bad_to() { assert_eq!(tester.io.handle_request_sync(&request), Some(response.into())); } - #[test] fn rpc_eth_send_transaction_error() { let tester = EthTester::default(); diff --git a/rpc/src/v1/tests/mocked/eth_pubsub.rs b/rpc/src/v1/tests/mocked/eth_pubsub.rs index 936695a9a1..0d886fe2f1 100644 --- a/rpc/src/v1/tests/mocked/eth_pubsub.rs +++ b/rpc/src/v1/tests/mocked/eth_pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -144,7 +144,6 @@ fn should_subscribe_to_logs() { + r#"","transactionIndex":"0x0","transactionLogIndex":"0x0","type":"removed"},"subscription":"0x416d77337e24399d"}}"#; assert_eq!(res, Some(response.into())); - // And unsubscribe let request = r#"{"jsonrpc": "2.0", "method": "eth_unsubscribe", "params": ["0x416d77337e24399d"], "id": 1}"#; let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#; @@ -154,7 +153,6 @@ fn should_subscribe_to_logs() { assert_eq!(res, None); } - #[test] fn should_subscribe_to_pending_transactions() { // given diff --git a/rpc/src/v1/tests/mocked/manage_network.rs b/rpc/src/v1/tests/mocked/manage_network.rs index da4f1aa511..a742f03c2f 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-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 ae51c2be67..a3de3b3b71 100644 --- a/rpc/src/v1/tests/mocked/mod.rs +++ b/rpc/src/v1/tests/mocked/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0f77dfb11a..b94bf2b113 100644 --- a/rpc/src/v1/tests/mocked/net.rs +++ b/rpc/src/v1/tests/mocked/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 c27615a589..c9dd50a3c6 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -150,7 +150,6 @@ fn rpc_parity_default_account() { let deps = Dependencies::new(); let io = deps.default_client(); - // Check empty let address = Address::default(); let request = r#"{"jsonrpc": "2.0", "method": "parity_defaultAccount", "params": [], "id": 1}"#; diff --git a/rpc/src/v1/tests/mocked/parity_accounts.rs b/rpc/src/v1/tests/mocked/parity_accounts.rs index c30b4b9ced..8342641d6c 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-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -206,7 +206,6 @@ fn rpc_parity_set_and_get_new_dapps_default_address() { assert_eq!(tester.io.handle_request_sync(request), Some(response.to_owned())); } - #[test] fn rpc_parity_recent_dapps() { // given @@ -474,7 +473,6 @@ fn derive_key_index() { assert_eq!(res, Some(response.into())); } - #[test] fn should_export_account() { // given diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index 78c73f9479..bc9f04de7c 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-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -181,7 +181,6 @@ fn rpc_parity_set_engine_signer() { assert_eq!(*miner.password.read(), "password".to_string()); } - #[test] fn rpc_parity_set_transactions_limit() { let miner = miner_service(); diff --git a/rpc/src/v1/tests/mocked/personal.rs b/rpc/src/v1/tests/mocked/personal.rs index 323f9fe137..131a865da7 100644 --- a/rpc/src/v1/tests/mocked/personal.rs +++ b/rpc/src/v1/tests/mocked/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/pubsub.rs b/rpc/src/v1/tests/mocked/pubsub.rs index 99b34366c8..a21f8a4903 100644 --- a/rpc/src/v1/tests/mocked/pubsub.rs +++ b/rpc/src/v1/tests/mocked/pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -75,4 +75,3 @@ fn should_subscribe_to_a_method() { let (res, _receiver) = receiver.into_future().wait().unwrap(); assert_eq!(res, None); } - diff --git a/rpc/src/v1/tests/mocked/rpc.rs b/rpc/src/v1/tests/mocked/rpc.rs index d0a6d2fab4..ed6503cea5 100644 --- a/rpc/src/v1/tests/mocked/rpc.rs +++ b/rpc/src/v1/tests/mocked/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -18,7 +18,6 @@ use std::collections::BTreeMap; use jsonrpc_core::IoHandler; use v1::{Rpc, RpcClient}; - fn rpc_client() -> RpcClient { let mut modules = BTreeMap::new(); modules.insert("rpc".to_owned(), "1.0".to_owned()); diff --git a/rpc/src/v1/tests/mocked/secretstore.rs b/rpc/src/v1/tests/mocked/secretstore.rs index 6ee9b6c245..33592a4883 100644 --- a/rpc/src/v1/tests/mocked/secretstore.rs +++ b/rpc/src/v1/tests/mocked/secretstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 8881dc41c3..8bbb590c06 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -76,7 +76,6 @@ fn signer_tester() -> SignerTester { } } - #[test] fn should_return_list_of_items_to_confirm() { // given @@ -107,7 +106,6 @@ fn should_return_list_of_items_to_confirm() { assert_eq!(tester.io.handle_request_sync(&request), Some(response.to_owned())); } - #[test] fn should_reject_transaction_from_queue_without_dispatching() { // given diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 84cf2e376e..2dc80f066c 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -393,7 +393,6 @@ fn should_decrypt_message_if_account_is_unlocked() { let (address, public) = tester.accounts.new_account_and_public("test").unwrap(); tester.accounts.unlock_account_permanently(address, "test".into()).unwrap(); - // First encrypt message let request = format!("{}0x{:x}{}", r#"{"jsonrpc": "2.0", "method": "parity_encryptMessage", "params":[""#, @@ -473,7 +472,6 @@ fn should_compose_transaction() { + &from + r#"","gas":"0x5208","gasPrice":"0x4a817c800","nonce":"0x0","to":null,"value":"0x5"},"id":1}"#; - // then let res = tester.io.handle_request(&request).wait().unwrap(); assert_eq!(res, Some(response.to_owned())); diff --git a/rpc/src/v1/tests/mocked/traces.rs b/rpc/src/v1/tests/mocked/traces.rs index 0b2e7d5ccb..70a862d332 100644 --- a/rpc/src/v1/tests/mocked/traces.rs +++ b/rpc/src/v1/tests/mocked/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3c78d67ad3..e16c5f4926 100644 --- a/rpc/src/v1/tests/mocked/web3.rs +++ b/rpc/src/v1/tests/mocked/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/mod.rs b/rpc/src/v1/tests/mod.rs index 31ac1c5410..471569e523 100644 --- a/rpc/src/v1/tests/mod.rs +++ b/rpc/src/v1/tests/mod.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + //! RPC unit test moduleS pub mod helpers; diff --git a/rpc/src/v1/traits/eth.rs b/rpc/src/v1/traits/eth.rs index f4ea1e10d6..48e315ce7e 100644 --- a/rpc/src/v1/traits/eth.rs +++ b/rpc/src/v1/traits/eth.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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_pubsub.rs b/rpc/src/v1/traits/eth_pubsub.rs index cfbe4c54bc..38babeef42 100644 --- a/rpc/src/v1/traits/eth_pubsub.rs +++ b/rpc/src/v1/traits/eth_pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 9830ac54d8..27657475ba 100644 --- a/rpc/src/v1/traits/eth_signing.rs +++ b/rpc/src/v1/traits/eth_signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 26a43fa3f8..62edac8ed6 100644 --- a/rpc/src/v1/traits/mod.rs +++ b/rpc/src/v1/traits/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 bc2068ff9a..d70a4653a6 100644 --- a/rpc/src/v1/traits/net.rs +++ b/rpc/src/v1/traits/net.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 83d8b19811..f78cf8052e 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 494f1576cb..977593d44e 100644 --- a/rpc/src/v1/traits/parity_accounts.rs +++ b/rpc/src/v1/traits/parity_accounts.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 40aad1a4bd..8cfffb50c7 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 8015b04317..208422222e 100644 --- a/rpc/src/v1/traits/parity_signing.rs +++ b/rpc/src/v1/traits/parity_signing.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 7c187fcffe..7187219105 100644 --- a/rpc/src/v1/traits/personal.rs +++ b/rpc/src/v1/traits/personal.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/private.rs b/rpc/src/v1/traits/private.rs index 7106e0bf43..b7b1aa20a7 100644 --- a/rpc/src/v1/traits/private.rs +++ b/rpc/src/v1/traits/private.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/pubsub.rs b/rpc/src/v1/traits/pubsub.rs index 0b77fc64d6..840de8d4b0 100644 --- a/rpc/src/v1/traits/pubsub.rs +++ b/rpc/src/v1/traits/pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a813aa94e6..8c0b3c2c90 100644 --- a/rpc/src/v1/traits/rpc.rs +++ b/rpc/src/v1/traits/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/secretstore.rs b/rpc/src/v1/traits/secretstore.rs index 6d2e5669c0..e15d71a72f 100644 --- a/rpc/src/v1/traits/secretstore.rs +++ b/rpc/src/v1/traits/secretstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 b7f60619e8..4ede0ce534 100644 --- a/rpc/src/v1/traits/signer.rs +++ b/rpc/src/v1/traits/signer.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 1fe01f47ef..2d3665f6bc 100644 --- a/rpc/src/v1/traits/traces.rs +++ b/rpc/src/v1/traits/traces.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e4fb8b0d1f..713cd9a32d 100644 --- a/rpc/src/v1/traits/web3.rs +++ b/rpc/src/v1/traits/web3.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/account_info.rs b/rpc/src/v1/types/account_info.rs index f9cabb450b..5a0e2952a1 100644 --- a/rpc/src/v1/types/account_info.rs +++ b/rpc/src/v1/types/account_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -41,4 +41,3 @@ pub struct HwAccountInfo { /// Device manufacturer. pub manufacturer: String, } - diff --git a/rpc/src/v1/types/block.rs b/rpc/src/v1/types/block.rs index 486e3b9c14..9ae870dc55 100644 --- a/rpc/src/v1/types/block.rs +++ b/rpc/src/v1/types/block.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 b6c1860f5b..b92a0d4a3f 100644 --- a/rpc/src/v1/types/block_number.rs +++ b/rpc/src/v1/types/block_number.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -135,4 +135,3 @@ mod tests { block_number_to_id(BlockNumber::Pending); } } - diff --git a/rpc/src/v1/types/bytes.rs b/rpc/src/v1/types/bytes.rs index fdbcb729bb..0bd62c601c 100644 --- a/rpc/src/v1/types/bytes.rs +++ b/rpc/src/v1/types/bytes.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -86,7 +86,6 @@ impl<'a> Visitor<'a> for BytesVisitor { } } - #[cfg(test)] mod tests { use super::*; @@ -118,4 +117,3 @@ mod tests { assert_eq!(bytes6, Bytes(vec![0x1, 0x23])); } } - diff --git a/rpc/src/v1/types/call_request.rs b/rpc/src/v1/types/call_request.rs index 71b562e45a..39d4d17b78 100644 --- a/rpc/src/v1/types/call_request.rs +++ b/rpc/src/v1/types/call_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 5dcb11316c..7f4f3ad106 100644 --- a/rpc/src/v1/types/confirmations.rs +++ b/rpc/src/v1/types/confirmations.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/consensus_status.rs b/rpc/src/v1/types/consensus_status.rs index 96657adbc9..0cbdf1f007 100644 --- a/rpc/src/v1/types/consensus_status.rs +++ b/rpc/src/v1/types/consensus_status.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/dapps.rs b/rpc/src/v1/types/dapps.rs index 418717fccf..81339fb1dc 100644 --- a/rpc/src/v1/types/dapps.rs +++ b/rpc/src/v1/types/dapps.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/derivation.rs b/rpc/src/v1/types/derivation.rs index 76becbaebe..0e39b65322 100644 --- a/rpc/src/v1/types/derivation.rs +++ b/rpc/src/v1/types/derivation.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 52217459c1..dd8b823e87 100644 --- a/rpc/src/v1/types/filter.rs +++ b/rpc/src/v1/types/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e3cc73e272..07c7ef24f4 100644 --- a/rpc/src/v1/types/hash.rs +++ b/rpc/src/v1/types/hash.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 26bbc7d2de..2b71b88bf6 100644 --- a/rpc/src/v1/types/histogram.rs +++ b/rpc/src/v1/types/histogram.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -12,7 +12,7 @@ // 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 . +// along with Parity. If not, see . //! Gas prices histogram. diff --git a/rpc/src/v1/types/index.rs b/rpc/src/v1/types/index.rs index 4e44ce49ce..4c8af60004 100644 --- a/rpc/src/v1/types/index.rs +++ b/rpc/src/v1/types/index.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -73,4 +73,3 @@ mod tests { assert_eq!(deserialized, vec![Index(10), Index(10)]); } } - diff --git a/rpc/src/v1/types/log.rs b/rpc/src/v1/types/log.rs index e178516d6d..1d3335bcad 100644 --- a/rpc/src/v1/types/log.rs +++ b/rpc/src/v1/types/log.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e7f764b8b1..4a0ccee906 100644 --- a/rpc/src/v1/types/mod.rs +++ b/rpc/src/v1/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - //! RPC types mod account_info; diff --git a/rpc/src/v1/types/node_kind.rs b/rpc/src/v1/types/node_kind.rs index 5c96fafc63..8061d82808 100644 --- a/rpc/src/v1/types/node_kind.rs +++ b/rpc/src/v1/types/node_kind.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/private_receipt.rs b/rpc/src/v1/types/private_receipt.rs index 328013d7f6..7e758af3a5 100644 --- a/rpc/src/v1/types/private_receipt.rs +++ b/rpc/src/v1/types/private_receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -51,4 +51,3 @@ pub struct PrivateTransactionReceiptAndTransaction { #[serde(rename="transaction")] pub transaction: TransactionRequest, } - diff --git a/rpc/src/v1/types/provenance.rs b/rpc/src/v1/types/provenance.rs index 6bcd43a21f..328f2ded3e 100644 --- a/rpc/src/v1/types/provenance.rs +++ b/rpc/src/v1/types/provenance.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/pubsub.rs b/rpc/src/v1/types/pubsub.rs index dfac5a0abb..ea01d6427b 100644 --- a/rpc/src/v1/types/pubsub.rs +++ b/rpc/src/v1/types/pubsub.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 e20856b822..f8d111887a 100644 --- a/rpc/src/v1/types/receipt.rs +++ b/rpc/src/v1/types/receipt.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -165,4 +165,3 @@ mod tests { assert_eq!(serialized, s); } } - diff --git a/rpc/src/v1/types/rpc_settings.rs b/rpc/src/v1/types/rpc_settings.rs index bc5bf72171..3be781f206 100644 --- a/rpc/src/v1/types/rpc_settings.rs +++ b/rpc/src/v1/types/rpc_settings.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -12,7 +12,7 @@ // 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 . +// along with Parity. If not, see . //! RPC Settings data. diff --git a/rpc/src/v1/types/secretstore.rs b/rpc/src/v1/types/secretstore.rs index 4388b308ba..22b61b5e15 100644 --- a/rpc/src/v1/types/secretstore.rs +++ b/rpc/src/v1/types/secretstore.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 cbac3e1bbb..ec43fb27d6 100644 --- a/rpc/src/v1/types/sync.rs +++ b/rpc/src/v1/types/sync.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 6eb222f5e6..08ddfb2767 100644 --- a/rpc/src/v1/types/trace.rs +++ b/rpc/src/v1/types/trace.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -327,7 +327,6 @@ impl From for RewardType { } } - /// Reward action #[derive(Debug, Serialize)] pub struct Reward { diff --git a/rpc/src/v1/types/trace_filter.rs b/rpc/src/v1/types/trace_filter.rs index 3a64f52488..83247dade0 100644 --- a/rpc/src/v1/types/trace_filter.rs +++ b/rpc/src/v1/types/trace_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 0ac3e37454..d41fc84e00 100644 --- a/rpc/src/v1/types/transaction.rs +++ b/rpc/src/v1/types/transaction.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -327,4 +327,3 @@ mod tests { ); } } - diff --git a/rpc/src/v1/types/transaction_condition.rs b/rpc/src/v1/types/transaction_condition.rs index 541bd364a3..65642224c2 100644 --- a/rpc/src/v1/types/transaction_condition.rs +++ b/rpc/src/v1/types/transaction_condition.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -64,4 +64,3 @@ mod tests { assert_eq!(transaction::Condition::Timestamp(100), TransactionCondition::Timestamp(100).into()); } } - diff --git a/rpc/src/v1/types/transaction_request.rs b/rpc/src/v1/types/transaction_request.rs index 2d4c86c7e7..7fed6f681a 100644 --- a/rpc/src/v1/types/transaction_request.rs +++ b/rpc/src/v1/types/transaction_request.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -127,7 +127,6 @@ impl Into for TransactionRequest { } } - #[cfg(test)] mod tests { use std::str::FromStr; diff --git a/rpc/src/v1/types/uint.rs b/rpc/src/v1/types/uint.rs index 4e2a189a63..cb6dd5d3fd 100644 --- a/rpc/src/v1/types/uint.rs +++ b/rpc/src/v1/types/uint.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 3664892df7..5fdc117a20 100644 --- a/rpc/src/v1/types/work.rs +++ b/rpc/src/v1/types/work.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -40,4 +40,3 @@ impl Serialize for Work { } } } - diff --git a/rpc_cli/src/lib.rs b/rpc_cli/src/lib.rs index f322129d1c..e4554d6ed5 100644 --- a/rpc_cli/src/lib.rs +++ b/rpc_cli/src/lib.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 futures; extern crate rpassword; diff --git a/rpc_client/src/client.rs b/rpc_client/src/client.rs index 17a8d9d724..93abdac88e 100644 --- a/rpc_client/src/client.rs +++ b/rpc_client/src/client.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::fmt::{Debug, Formatter, Error as FmtError}; use std::io::{BufReader, BufRead}; use std::sync::Arc; diff --git a/rpc_client/src/lib.rs b/rpc_client/src/lib.rs index 49f537708e..98614bd763 100644 --- a/rpc_client/src/lib.rs +++ b/rpc_client/src/lib.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 client; pub mod signer_client; diff --git a/rpc_client/src/signer_client.rs b/rpc_client/src/signer_client.rs index cee063109b..e7a241137f 100644 --- a/rpc_client/src/signer_client.rs +++ b/rpc_client/src/signer_client.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 client::{Rpc, RpcError}; use rpc::signer::{ConfirmationRequest, TransactionModification, U256, TransactionCondition}; use serde; diff --git a/scripts/add_license.sh b/scripts/add_license.sh index 1d916f4279..2b283590b0 100755 --- a/scripts/add_license.sh +++ b/scripts/add_license.sh @@ -1,6 +1,20 @@ -#!/bin/sh +#!/usr/bin/env sh -for f in $(find . -name '*.rs'); do - cat license_header $f > $f.new - mv $f.new $f +PAT_GPL="^// Copyright.*If not, see \.$" +PAT_OTHER="^// Copyright" + +for f in $(find . -type f | egrep '\.(c|cpp|rs)$'); do + HEADER=$(head -16 $f) + if [[ $HEADER =~ $PAT_GPL ]]; then + BODY=$(tail -n +17 $f) + cat license_header > temp + echo "$BODY" >> temp + mv temp $f + elif [[ $HEADER =~ $PAT_OTHER ]]; then + echo "Other license was found do nothing" + else + echo "$f was missing header" + cat license_header $f > temp + mv temp $f + fi done diff --git a/scripts/remove_duplicate_empty_lines.sh b/scripts/remove_duplicate_empty_lines.sh new file mode 100755 index 0000000000..0df265ab9f --- /dev/null +++ b/scripts/remove_duplicate_empty_lines.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +for f in $(find . -name '*.rs'); do + cat -s $f > $f.temp + mv $f.temp $f +done diff --git a/secret_store/src/acl_storage.rs b/secret_store/src/acl_storage.rs index bc75cfec44..10b58a9c74 100644 --- a/secret_store/src/acl_storage.rs +++ b/secret_store/src/acl_storage.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server.rs b/secret_store/src/key_server.rs index b06be2422e..099d8aa451 100644 --- a/secret_store/src/key_server.rs +++ b/secret_store/src/key_server.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/admin_sessions/key_version_negotiation_session.rs b/secret_store/src/key_server_cluster/admin_sessions/key_version_negotiation_session.rs index 6c39fd8e7e..9aeb5ca34d 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/key_version_negotiation_session.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/key_version_negotiation_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/admin_sessions/mod.rs b/secret_store/src/key_server_cluster/admin_sessions/mod.rs index 11c01cac53..1fedc1db40 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/mod.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/admin_sessions/servers_set_change_session.rs b/secret_store/src/key_server_cluster/admin_sessions/servers_set_change_session.rs index 698872aadc..01cb03131e 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/servers_set_change_session.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/servers_set_change_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/admin_sessions/sessions_queue.rs b/secret_store/src/key_server_cluster/admin_sessions/sessions_queue.rs index 35adaab68c..7657dfc826 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/sessions_queue.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/sessions_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/admin_sessions/share_add_session.rs b/secret_store/src/key_server_cluster/admin_sessions/share_add_session.rs index abe34edeab..4b79473b56 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/share_add_session.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/share_add_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/admin_sessions/share_change_session.rs b/secret_store/src/key_server_cluster/admin_sessions/share_change_session.rs index 1e408ee52e..af16ef2f6d 100644 --- a/secret_store/src/key_server_cluster/admin_sessions/share_change_session.rs +++ b/secret_store/src/key_server_cluster/admin_sessions/share_change_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/client_sessions/decryption_session.rs b/secret_store/src/key_server_cluster/client_sessions/decryption_session.rs index f852451b43..724d2fe49f 100644 --- a/secret_store/src/key_server_cluster/client_sessions/decryption_session.rs +++ b/secret_store/src/key_server_cluster/client_sessions/decryption_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/client_sessions/encryption_session.rs b/secret_store/src/key_server_cluster/client_sessions/encryption_session.rs index 3c863d1cb9..70532b6905 100644 --- a/secret_store/src/key_server_cluster/client_sessions/encryption_session.rs +++ b/secret_store/src/key_server_cluster/client_sessions/encryption_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/client_sessions/generation_session.rs b/secret_store/src/key_server_cluster/client_sessions/generation_session.rs index c2effe6c26..7001ccf69e 100644 --- a/secret_store/src/key_server_cluster/client_sessions/generation_session.rs +++ b/secret_store/src/key_server_cluster/client_sessions/generation_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -1299,7 +1299,6 @@ pub mod tests { }).unwrap_err(), Error::InvalidMessage); } - #[test] fn encryption_fails_on_session_timeout() { let (_, _, _, l) = make_simple_cluster(0, 2).unwrap(); diff --git a/secret_store/src/key_server_cluster/client_sessions/mod.rs b/secret_store/src/key_server_cluster/client_sessions/mod.rs index ba2fbd5350..133edcffbb 100644 --- a/secret_store/src/key_server_cluster/client_sessions/mod.rs +++ b/secret_store/src/key_server_cluster/client_sessions/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/client_sessions/signing_session_ecdsa.rs b/secret_store/src/key_server_cluster/client_sessions/signing_session_ecdsa.rs index b0d465343b..670fa138f2 100644 --- a/secret_store/src/key_server_cluster/client_sessions/signing_session_ecdsa.rs +++ b/secret_store/src/key_server_cluster/client_sessions/signing_session_ecdsa.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -644,7 +644,6 @@ impl SessionImpl { Self::compute_inversed_nonce_coeff(&self.core, &*data)? }; - let version = data.version.as_ref().ok_or(Error::InvalidMessage)?.clone(); let message_hash = data.message_hash .expect("we are on master node; on master node message_hash is filled in initialize(); on_generation_message follows initialize; qed"); diff --git a/secret_store/src/key_server_cluster/client_sessions/signing_session_schnorr.rs b/secret_store/src/key_server_cluster/client_sessions/signing_session_schnorr.rs index 013748827c..376eab26b4 100644 --- a/secret_store/src/key_server_cluster/client_sessions/signing_session_schnorr.rs +++ b/secret_store/src/key_server_cluster/client_sessions/signing_session_schnorr.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -1289,4 +1289,4 @@ mod tests { _ => unreachable!(), } } -} \ No newline at end of file +} diff --git a/secret_store/src/key_server_cluster/cluster.rs b/secret_store/src/key_server_cluster/cluster.rs index d782ccd035..86de005b77 100644 --- a/secret_store/src/key_server_cluster/cluster.rs +++ b/secret_store/src/key_server_cluster/cluster.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/cluster_sessions.rs b/secret_store/src/key_server_cluster/cluster_sessions.rs index 780c947fc3..4dcfd3f881 100644 --- a/secret_store/src/key_server_cluster/cluster_sessions.rs +++ b/secret_store/src/key_server_cluster/cluster_sessions.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/cluster_sessions_creator.rs b/secret_store/src/key_server_cluster/cluster_sessions_creator.rs index a56f51f8fb..e1b5125ac4 100644 --- a/secret_store/src/key_server_cluster/cluster_sessions_creator.rs +++ b/secret_store/src/key_server_cluster/cluster_sessions_creator.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/connection_trigger.rs b/secret_store/src/key_server_cluster/connection_trigger.rs index 66612f044b..71f17313fe 100644 --- a/secret_store/src/key_server_cluster/connection_trigger.rs +++ b/secret_store/src/key_server_cluster/connection_trigger.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/connection_trigger_with_migration.rs b/secret_store/src/key_server_cluster/connection_trigger_with_migration.rs index 40a4b5028e..cc8db3e665 100644 --- a/secret_store/src/key_server_cluster/connection_trigger_with_migration.rs +++ b/secret_store/src/key_server_cluster/connection_trigger_with_migration.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/deadline.rs b/secret_store/src/key_server_cluster/io/deadline.rs index 1088f4f337..94a1895227 100644 --- a/secret_store/src/key_server_cluster/io/deadline.rs +++ b/secret_store/src/key_server_cluster/io/deadline.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/handshake.rs b/secret_store/src/key_server_cluster/io/handshake.rs index af64295632..5081004d0b 100644 --- a/secret_store/src/key_server_cluster/io/handshake.rs +++ b/secret_store/src/key_server_cluster/io/handshake.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/message.rs b/secret_store/src/key_server_cluster/io/message.rs index 9925b789d2..e8e01a91f5 100644 --- a/secret_store/src/key_server_cluster/io/message.rs +++ b/secret_store/src/key_server_cluster/io/message.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/mod.rs b/secret_store/src/key_server_cluster/io/mod.rs index dfea336830..02adb72ad7 100644 --- a/secret_store/src/key_server_cluster/io/mod.rs +++ b/secret_store/src/key_server_cluster/io/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/read_header.rs b/secret_store/src/key_server_cluster/io/read_header.rs index 2fd8960e30..803e01b95b 100644 --- a/secret_store/src/key_server_cluster/io/read_header.rs +++ b/secret_store/src/key_server_cluster/io/read_header.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/read_message.rs b/secret_store/src/key_server_cluster/io/read_message.rs index 1ffb98792a..b1d0395d57 100644 --- a/secret_store/src/key_server_cluster/io/read_message.rs +++ b/secret_store/src/key_server_cluster/io/read_message.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/read_payload.rs b/secret_store/src/key_server_cluster/io/read_payload.rs index 1246092e90..da4f4d3c01 100644 --- a/secret_store/src/key_server_cluster/io/read_payload.rs +++ b/secret_store/src/key_server_cluster/io/read_payload.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/shared_tcp_stream.rs b/secret_store/src/key_server_cluster/io/shared_tcp_stream.rs index a847b14280..64afbbe82f 100644 --- a/secret_store/src/key_server_cluster/io/shared_tcp_stream.rs +++ b/secret_store/src/key_server_cluster/io/shared_tcp_stream.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/io/write_message.rs b/secret_store/src/key_server_cluster/io/write_message.rs index 8a89cf4552..d337a3705a 100644 --- a/secret_store/src/key_server_cluster/io/write_message.rs +++ b/secret_store/src/key_server_cluster/io/write_message.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/consensus_session.rs b/secret_store/src/key_server_cluster/jobs/consensus_session.rs index 5d780a48eb..6d2866750e 100644 --- a/secret_store/src/key_server_cluster/jobs/consensus_session.rs +++ b/secret_store/src/key_server_cluster/jobs/consensus_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/decryption_job.rs b/secret_store/src/key_server_cluster/jobs/decryption_job.rs index 2c11fe0ab3..debffa25e0 100644 --- a/secret_store/src/key_server_cluster/jobs/decryption_job.rs +++ b/secret_store/src/key_server_cluster/jobs/decryption_job.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/dummy_job.rs b/secret_store/src/key_server_cluster/jobs/dummy_job.rs index 3e84c0d49d..f7e771d155 100644 --- a/secret_store/src/key_server_cluster/jobs/dummy_job.rs +++ b/secret_store/src/key_server_cluster/jobs/dummy_job.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/job_session.rs b/secret_store/src/key_server_cluster/jobs/job_session.rs index d3a765bf5b..ab0300db36 100644 --- a/secret_store/src/key_server_cluster/jobs/job_session.rs +++ b/secret_store/src/key_server_cluster/jobs/job_session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/key_access_job.rs b/secret_store/src/key_server_cluster/jobs/key_access_job.rs index a47385b5ae..6a0577f022 100644 --- a/secret_store/src/key_server_cluster/jobs/key_access_job.rs +++ b/secret_store/src/key_server_cluster/jobs/key_access_job.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/mod.rs b/secret_store/src/key_server_cluster/jobs/mod.rs index 817f09b71d..75d07e313b 100644 --- a/secret_store/src/key_server_cluster/jobs/mod.rs +++ b/secret_store/src/key_server_cluster/jobs/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/servers_set_change_access_job.rs b/secret_store/src/key_server_cluster/jobs/servers_set_change_access_job.rs index 1d16286926..6c142d2a2f 100644 --- a/secret_store/src/key_server_cluster/jobs/servers_set_change_access_job.rs +++ b/secret_store/src/key_server_cluster/jobs/servers_set_change_access_job.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/signing_job_ecdsa.rs b/secret_store/src/key_server_cluster/jobs/signing_job_ecdsa.rs index 8f4ab1d68e..6349c2e7db 100644 --- a/secret_store/src/key_server_cluster/jobs/signing_job_ecdsa.rs +++ b/secret_store/src/key_server_cluster/jobs/signing_job_ecdsa.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/jobs/signing_job_schnorr.rs b/secret_store/src/key_server_cluster/jobs/signing_job_schnorr.rs index 54225a6cf5..4d1a0e7d90 100644 --- a/secret_store/src/key_server_cluster/jobs/signing_job_schnorr.rs +++ b/secret_store/src/key_server_cluster/jobs/signing_job_schnorr.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -148,4 +148,4 @@ impl JobExecutor for SchnorrSigningJob { Ok((signature_c, signature_s)) } -} \ No newline at end of file +} diff --git a/secret_store/src/key_server_cluster/jobs/unknown_sessions_job.rs b/secret_store/src/key_server_cluster/jobs/unknown_sessions_job.rs index 13f2f8b8bb..908afa1ecc 100644 --- a/secret_store/src/key_server_cluster/jobs/unknown_sessions_job.rs +++ b/secret_store/src/key_server_cluster/jobs/unknown_sessions_job.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/math.rs b/secret_store/src/key_server_cluster/math.rs index ef6d88f67c..66f26b5086 100644 --- a/secret_store/src/key_server_cluster/math.rs +++ b/secret_store/src/key_server_cluster/math.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/message.rs b/secret_store/src/key_server_cluster/message.rs index cc49e56fdb..8aecdc9dd6 100644 --- a/secret_store/src/key_server_cluster/message.rs +++ b/secret_store/src/key_server_cluster/message.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/mod.rs b/secret_store/src/key_server_cluster/mod.rs index d5ac85b3de..018d70d305 100644 --- a/secret_store/src/key_server_cluster/mod.rs +++ b/secret_store/src/key_server_cluster/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/net/accept_connection.rs b/secret_store/src/key_server_cluster/net/accept_connection.rs index d85e492dd7..3565ea3d0f 100644 --- a/secret_store/src/key_server_cluster/net/accept_connection.rs +++ b/secret_store/src/key_server_cluster/net/accept_connection.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/net/connect.rs b/secret_store/src/key_server_cluster/net/connect.rs index 7515494e44..8b93479f97 100644 --- a/secret_store/src/key_server_cluster/net/connect.rs +++ b/secret_store/src/key_server_cluster/net/connect.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/net/connection.rs b/secret_store/src/key_server_cluster/net/connection.rs index 577f5828f6..7776e97a74 100644 --- a/secret_store/src/key_server_cluster/net/connection.rs +++ b/secret_store/src/key_server_cluster/net/connection.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_cluster/net/mod.rs b/secret_store/src/key_server_cluster/net/mod.rs index 6abf83ceb8..e76f4f476c 100644 --- a/secret_store/src/key_server_cluster/net/mod.rs +++ b/secret_store/src/key_server_cluster/net/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_server_set.rs b/secret_store/src/key_server_set.rs index 8a0d786af9..cf95e917ae 100644 --- a/secret_store/src/key_server_set.rs +++ b/secret_store/src/key_server_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/key_storage.rs b/secret_store/src/key_storage.rs index 848e6bf2a5..f5d6df8010 100644 --- a/secret_store/src/key_storage.rs +++ b/secret_store/src/key_storage.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -348,7 +348,6 @@ impl DocumentKeyShareVersion { } } - /// Calculate hash of given version data. pub fn data_hash<'a, I>(id_numbers: I) -> H256 where I: Iterator { let mut nodes_keccak = Keccak::new_keccak256(); diff --git a/secret_store/src/lib.rs b/secret_store/src/lib.rs index 80b15318a9..404c278d53 100644 --- a/secret_store/src/lib.rs +++ b/secret_store/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/listener/http_listener.rs b/secret_store/src/listener/http_listener.rs index 074052fae4..5aa82a1cbd 100644 --- a/secret_store/src/listener/http_listener.rs +++ b/secret_store/src/listener/http_listener.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/listener/mod.rs b/secret_store/src/listener/mod.rs index 0d1f3f2675..8837e7ffd6 100644 --- a/secret_store/src/listener/mod.rs +++ b/secret_store/src/listener/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/listener/service_contract.rs b/secret_store/src/listener/service_contract.rs index eac3cfa9da..72c23b86b5 100644 --- a/secret_store/src/listener/service_contract.rs +++ b/secret_store/src/listener/service_contract.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/listener/service_contract_aggregate.rs b/secret_store/src/listener/service_contract_aggregate.rs index 9ec467fea4..cc2e97b8d4 100644 --- a/secret_store/src/listener/service_contract_aggregate.rs +++ b/secret_store/src/listener/service_contract_aggregate.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/listener/service_contract_listener.rs b/secret_store/src/listener/service_contract_listener.rs index 214235210f..724c902d12 100644 --- a/secret_store/src/listener/service_contract_listener.rs +++ b/secret_store/src/listener/service_contract_listener.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/listener/tasks_queue.rs b/secret_store/src/listener/tasks_queue.rs index e228d12cef..934459940a 100644 --- a/secret_store/src/listener/tasks_queue.rs +++ b/secret_store/src/listener/tasks_queue.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/node_key_pair.rs b/secret_store/src/node_key_pair.rs index 428dba6c1a..93cf285b2f 100644 --- a/secret_store/src/node_key_pair.rs +++ b/secret_store/src/node_key_pair.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/serialization.rs b/secret_store/src/serialization.rs index f3e9aa1d76..7ae5e8f269 100644 --- a/secret_store/src/serialization.rs +++ b/secret_store/src/serialization.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/traits.rs b/secret_store/src/traits.rs index 704be1c254..d92983fe8d 100644 --- a/secret_store/src/traits.rs +++ b/secret_store/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/trusted_client.rs b/secret_store/src/trusted_client.rs index 94b1c0174d..cf9c987be3 100644 --- a/secret_store/src/trusted_client.rs +++ b/secret_store/src/trusted_client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/types/all.rs b/secret_store/src/types/all.rs index ab0aea1b13..f0e0388104 100644 --- a/secret_store/src/types/all.rs +++ b/secret_store/src/types/all.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/types/error.rs b/secret_store/src/types/error.rs index eae914ec86..74e6bb9e3c 100644 --- a/secret_store/src/types/error.rs +++ b/secret_store/src/types/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/secret_store/src/types/mod.rs b/secret_store/src/types/mod.rs index 9da7f6ef98..443f4acb3a 100644 --- a/secret_store/src/types/mod.rs +++ b/secret_store/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/error.rs b/transaction-pool/src/error.rs index 4cf221a71e..c7666841a2 100644 --- a/transaction-pool/src/error.rs +++ b/transaction-pool/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/lib.rs b/transaction-pool/src/lib.rs index 4a1bdcde14..ea77debfa2 100644 --- a/transaction-pool/src/lib.rs +++ b/transaction-pool/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/listener.rs b/transaction-pool/src/listener.rs index 728a035e31..3339a7730d 100644 --- a/transaction-pool/src/listener.rs +++ b/transaction-pool/src/listener.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/options.rs b/transaction-pool/src/options.rs index 8ccf8adfd1..291001a202 100644 --- a/transaction-pool/src/options.rs +++ b/transaction-pool/src/options.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/pool.rs b/transaction-pool/src/pool.rs index 5cb6e479b8..dcd52a3e7e 100644 --- a/transaction-pool/src/pool.rs +++ b/transaction-pool/src/pool.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -95,7 +95,6 @@ impl> Pool { } } - const INITIAL_NUMBER_OF_SENDERS: usize = 16; impl Pool where diff --git a/transaction-pool/src/ready.rs b/transaction-pool/src/ready.rs index aa913a9eb5..0bee5188df 100644 --- a/transaction-pool/src/ready.rs +++ b/transaction-pool/src/ready.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/scoring.rs b/transaction-pool/src/scoring.rs index 2acfb33748..462b708651 100644 --- a/transaction-pool/src/scoring.rs +++ b/transaction-pool/src/scoring.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/status.rs b/transaction-pool/src/status.rs index a03bc6b062..b9e7656d44 100644 --- a/transaction-pool/src/status.rs +++ b/transaction-pool/src/status.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/tests/helpers.rs b/transaction-pool/src/tests/helpers.rs index cfc6641b5e..b71959b08e 100644 --- a/transaction-pool/src/tests/helpers.rs +++ b/transaction-pool/src/tests/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/tests/mod.rs b/transaction-pool/src/tests/mod.rs index b21ea31807..6edd60e60e 100644 --- a/transaction-pool/src/tests/mod.rs +++ b/transaction-pool/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -578,4 +578,3 @@ mod listener { assert_eq!(*results.borrow(), &["added", "added", "mined", "mined"]); } } - diff --git a/transaction-pool/src/tests/tx_builder.rs b/transaction-pool/src/tests/tx_builder.rs index 88a881aca8..9478d417a2 100644 --- a/transaction-pool/src/tests/tx_builder.rs +++ b/transaction-pool/src/tests/tx_builder.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/transactions.rs b/transaction-pool/src/transactions.rs index f1a91ff4f8..edc26b69f4 100644 --- a/transaction-pool/src/transactions.rs +++ b/transaction-pool/src/transactions.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/transaction-pool/src/verifier.rs b/transaction-pool/src/verifier.rs index e55a17e911..312a3eae3c 100644 --- a/transaction-pool/src/verifier.rs +++ b/transaction-pool/src/verifier.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/updater/src/lib.rs b/updater/src/lib.rs index 67525aa4b2..f27d74e7d7 100644 --- a/updater/src/lib.rs +++ b/updater/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/updater/src/service.rs b/updater/src/service.rs index b025eb42ea..604c01ec76 100644 --- a/updater/src/service.rs +++ b/updater/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -35,4 +35,3 @@ pub trait Service: Send + Sync { /// Information gathered concerning the release. fn info(&self) -> Option; } - diff --git a/updater/src/types/all.rs b/updater/src/types/all.rs index 7079fb8ded..9dd782683d 100644 --- a/updater/src/types/all.rs +++ b/updater/src/types/all.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/updater/src/types/mod.rs b/updater/src/types/mod.rs index b6d3c60254..8fdbcf169d 100644 --- a/updater/src/types/mod.rs +++ b/updater/src/types/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -23,4 +23,3 @@ mod version_info; pub use self::all::{ReleaseInfo, OperationsInfo, CapState}; pub use self::release_track::ReleaseTrack; pub use self::version_info::VersionInfo; - diff --git a/updater/src/types/release_track.rs b/updater/src/types/release_track.rs index a1f646805a..eefe18d9f2 100644 --- a/updater/src/types/release_track.rs +++ b/updater/src/types/release_track.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -70,7 +70,6 @@ impl From for ReleaseTrack { } } - impl From for u8 { fn from(rt: ReleaseTrack) -> Self { rt as u8 diff --git a/updater/src/types/version_info.rs b/updater/src/types/version_info.rs index 4409153e2a..955be05660 100644 --- a/updater/src/types/version_info.rs +++ b/updater/src/types/version_info.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/updater/src/updater.rs b/updater/src/updater.rs index f8a98f3b0f..8e9efa0aa1 100644 --- a/updater/src/updater.rs +++ b/updater/src/updater.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/src/lib.rs b/util/bloom/src/lib.rs index 22a2cbc2aa..32aad24bf2 100644 --- a/util/bloom/src/lib.rs +++ b/util/bloom/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - extern crate siphasher; use std::cmp; @@ -208,7 +207,6 @@ pub struct BloomJournal { pub entries: Vec<(usize, u64)>, } - #[cfg(test)] mod tests { use super::Bloom; diff --git a/util/bloomchain/src/chain.rs b/util/bloomchain/src/chain.rs index ba7bc21b35..1017c874e4 100644 --- a/util/bloomchain/src/chain.rs +++ b/util/bloomchain/src/chain.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::collections::{HashMap, HashSet}; use std::ops::Range; use number::Number; diff --git a/util/bloomchain/src/config.rs b/util/bloomchain/src/config.rs index 3e729922a1..58a600e1a1 100644 --- a/util/bloomchain/src/config.rs +++ b/util/bloomchain/src/config.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + /// `BloomChain` configuration. #[derive(Debug, PartialEq, Clone, Copy)] pub struct Config { diff --git a/util/bloomchain/src/database.rs b/util/bloomchain/src/database.rs index 9aba41e7c6..b6dc77a199 100644 --- a/util/bloomchain/src/database.rs +++ b/util/bloomchain/src/database.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 position::Position; use bloom::Bloom; diff --git a/util/bloomchain/src/filter.rs b/util/bloomchain/src/filter.rs index 06d657ba44..83edd95a72 100644 --- a/util/bloomchain/src/filter.rs +++ b/util/bloomchain/src/filter.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::ops::Range; use bloom::Bloom; use number::Number; diff --git a/util/bloomchain/src/group/bridge.rs b/util/bloomchain/src/group/bridge.rs index b01650157c..4efbec6274 100644 --- a/util/bloomchain/src/group/bridge.rs +++ b/util/bloomchain/src/group/bridge.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 bloom::Bloom; use config::Config; use database::BloomDatabase; diff --git a/util/bloomchain/src/group/chain.rs b/util/bloomchain/src/group/chain.rs index cfd7796f4d..3108ba649b 100644 --- a/util/bloomchain/src/group/chain.rs +++ b/util/bloomchain/src/group/chain.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::collections::HashMap; use std::ops::Range; use bloom::Bloom; diff --git a/util/bloomchain/src/group/database.rs b/util/bloomchain/src/group/database.rs index 494184f3eb..a3d0847b65 100644 --- a/util/bloomchain/src/group/database.rs +++ b/util/bloomchain/src/group/database.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 group::{GroupPosition, BloomGroup}; /// Readonly `BloomGroup` database. diff --git a/util/bloomchain/src/group/group.rs b/util/bloomchain/src/group/group.rs index 084c8f8e48..dc19926c58 100644 --- a/util/bloomchain/src/group/group.rs +++ b/util/bloomchain/src/group/group.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 bloom::Bloom; /// Group of blooms that are in the same index. diff --git a/util/bloomchain/src/group/mod.rs b/util/bloomchain/src/group/mod.rs index b6cabf628f..9123037ec6 100644 --- a/util/bloomchain/src/group/mod.rs +++ b/util/bloomchain/src/group/mod.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + //! Bloom grouping. //! //! Optimization gathering together blooms that are in the same index and are likely to be retrived together. diff --git a/util/bloomchain/src/group/position/manager.rs b/util/bloomchain/src/group/position/manager.rs index 611a5bb784..fc5656537a 100644 --- a/util/bloomchain/src/group/position/manager.rs +++ b/util/bloomchain/src/group/position/manager.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 super::{Position, GroupPosition}; use position::Position as BloomPosition; diff --git a/util/bloomchain/src/group/position/mod.rs b/util/bloomchain/src/group/position/mod.rs index fc95de4dd0..7173d1d9bb 100644 --- a/util/bloomchain/src/group/position/mod.rs +++ b/util/bloomchain/src/group/position/mod.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + mod position; mod manager; diff --git a/util/bloomchain/src/group/position/position.rs b/util/bloomchain/src/group/position/position.rs index 88f26d69ab..1d8f89af54 100644 --- a/util/bloomchain/src/group/position/position.rs +++ b/util/bloomchain/src/group/position/position.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + /// Uniquely identifies bloom group position. #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub struct GroupPosition { diff --git a/util/bloomchain/src/lib.rs b/util/bloomchain/src/lib.rs index 997ae08391..a82b898caf 100644 --- a/util/bloomchain/src/lib.rs +++ b/util/bloomchain/src/lib.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 ethbloom as bloom; mod chain; diff --git a/util/bloomchain/src/number.rs b/util/bloomchain/src/number.rs index 3ff82f1957..6c5af2e25d 100644 --- a/util/bloomchain/src/number.rs +++ b/util/bloomchain/src/number.rs @@ -1,2 +1,18 @@ +// Copyright 2015-2018 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 . + /// Represents block number. pub type Number = usize; diff --git a/util/bloomchain/src/position/manager.rs b/util/bloomchain/src/position/manager.rs index a405878ab5..707afb667c 100644 --- a/util/bloomchain/src/position/manager.rs +++ b/util/bloomchain/src/position/manager.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + //! Simplifies working with bloom indexes. use super::Position; diff --git a/util/bloomchain/src/position/mod.rs b/util/bloomchain/src/position/mod.rs index 4fa736a163..623e9784e3 100644 --- a/util/bloomchain/src/position/mod.rs +++ b/util/bloomchain/src/position/mod.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 position; pub mod manager; diff --git a/util/bloomchain/src/position/position.rs b/util/bloomchain/src/position/position.rs index 32845cbcc5..c822d03e00 100644 --- a/util/bloomchain/src/position/position.rs +++ b/util/bloomchain/src/position/position.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + /// Uniquely identifies bloom position. #[derive(Debug, PartialEq, Eq, Hash)] pub struct Position { diff --git a/util/bloomchain/tests/bloomchain.rs b/util/bloomchain/tests/bloomchain.rs index 4a77407a7a..f1e260bfdd 100644 --- a/util/bloomchain/tests/bloomchain.rs +++ b/util/bloomchain/tests/bloomchain.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 bloomchain; extern crate rustc_hex; @@ -53,7 +69,6 @@ fn partly_matching_bloom_searach() { db.insert_blooms(modified_blooms_1); - let chain = BloomChain::new(config, &db); assert_eq!(chain.with_bloom(&(0..100), &bloom2), vec![14, 15]); } @@ -101,7 +116,6 @@ fn bloom_replace() { db.insert_blooms(modified_blooms_3); - let reset_modified_blooms = { let chain = BloomChain::new(config, &db); chain.replace(&(15..17), vec![bloom4.clone(), bloom5.clone()]) diff --git a/util/bloomchain/tests/groupchain.rs b/util/bloomchain/tests/groupchain.rs index ec396346ac..048edc03ce 100644 --- a/util/bloomchain/tests/groupchain.rs +++ b/util/bloomchain/tests/groupchain.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 bloomchain; extern crate rustc_hex; @@ -23,7 +39,6 @@ fn simple_bloom_group_search() { assert_eq!(modified_blooms.len(), config.levels); db.insert_blooms(modified_blooms); - let chain = BloomGroupChain::new(config, &db); assert_eq!(chain.with_bloom(&(0..100), &bloom), vec![23]); assert_eq!(chain.with_bloom(&(0..22), &bloom), vec![]); @@ -55,7 +70,6 @@ fn partly_matching_bloom_group_searach() { db.insert_blooms(modified_blooms_1); - let chain = BloomGroupChain::new(config, &db); assert_eq!(chain.with_bloom(&(0..100), &bloom2), vec![14, 15]); } @@ -103,7 +117,6 @@ fn bloom_group_replace() { db.insert_blooms(modified_blooms_3); - let reset_modified_blooms = { let chain = BloomGroupChain::new(config, &db); chain.replace(&(15..17), vec![bloom4.clone(), bloom5.clone()]) diff --git a/util/bloomchain/tests/util/db.rs b/util/bloomchain/tests/util/db.rs index 8101b37848..b28e7b524b 100644 --- a/util/bloomchain/tests/util/db.rs +++ b/util/bloomchain/tests/util/db.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::collections::HashMap; use bloomchain::{Position, Bloom, BloomDatabase}; use bloomchain::group::{GroupPosition, BloomGroup, BloomGroupDatabase}; diff --git a/util/bloomchain/tests/util/each.rs b/util/bloomchain/tests/util/each.rs index 19ca1b67cf..1d8fc9a1d4 100644 --- a/util/bloomchain/tests/util/each.rs +++ b/util/bloomchain/tests/util/each.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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::io::{BufReader, Read, BufRead}; use bloomchain::Bloom; use super::FromHex; diff --git a/util/bloomchain/tests/util/from_hex.rs b/util/bloomchain/tests/util/from_hex.rs index 9152d304fd..20c59333ae 100644 --- a/util/bloomchain/tests/util/from_hex.rs +++ b/util/bloomchain/tests/util/from_hex.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 rustc_hex::FromHex as RustcFromHex; use bloomchain::Bloom; diff --git a/util/bloomchain/tests/util/mod.rs b/util/bloomchain/tests/util/mod.rs index 2a1e55af9a..998e7c9520 100644 --- a/util/bloomchain/tests/util/mod.rs +++ b/util/bloomchain/tests/util/mod.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + mod db; mod each; mod from_hex; diff --git a/util/bloomchain/tests/util/random.rs b/util/bloomchain/tests/util/random.rs index 3d50b5ac10..06e3d13520 100644 --- a/util/bloomchain/tests/util/random.rs +++ b/util/bloomchain/tests/util/random.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 rand; use self::rand::random; diff --git a/util/bytes/src/lib.rs b/util/bytes/src/lib.rs index 4303f70150..03b4745598 100644 --- a/util/bytes/src/lib.rs +++ b/util/bytes/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/dir/src/helpers.rs b/util/dir/src/helpers.rs index 95f8090c87..820b9dc5af 100644 --- a/util/dir/src/helpers.rs +++ b/util/dir/src/helpers.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/dir/src/lib.rs b/util/dir/src/lib.rs index bb36a46a83..7404a2cbca 100644 --- a/util/dir/src/lib.rs +++ b/util/dir/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/error/src/lib.rs b/util/error/src/lib.rs index 9a1ab87536..bacc66c283 100644 --- a/util/error/src/lib.rs +++ b/util/error/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -74,4 +74,3 @@ error_chain! { BaseData(BaseDataError); } } - diff --git a/util/fetch/src/client.rs b/util/fetch/src/client.rs index 9bb55aad0e..cda802cfb0 100644 --- a/util/fetch/src/client.rs +++ b/util/fetch/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 f42aacec5b..8e50fa5e6a 100644 --- a/util/fetch/src/lib.rs +++ b/util/fetch/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/hash/benches/keccak_256.rs b/util/hash/benches/keccak_256.rs index 8b398417d8..d59e534104 100644 --- a/util/hash/benches/keccak_256.rs +++ b/util/hash/benches/keccak_256.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + #![feature(test)] extern crate test; @@ -33,4 +49,4 @@ fn bench_keccak_256_with_large_input(b: &mut Bencher) { b.iter(|| { let _out = keccak(&data); }) -} \ No newline at end of file +} diff --git a/util/hash/src/lib.rs b/util/hash/src/lib.rs index b75e095a68..c54d7233cd 100644 --- a/util/hash/src/lib.rs +++ b/util/hash/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -32,7 +32,6 @@ pub const KECCAK_NULL_RLP: H256 = H256( [0x56, 0xe8, 0x1f, 0x17, 0x1b, 0xcc, 0x5 /// The KECCAK of the RLP encoding of empty list. pub const KECCAK_EMPTY_LIST_RLP: H256 = H256( [0x1d, 0xcc, 0x4d, 0xe8, 0xde, 0xc7, 0x5d, 0x7a, 0xab, 0x85, 0xb5, 0x67, 0xb6, 0xcc, 0xd4, 0x1a, 0xd3, 0x12, 0x45, 0x1b, 0x94, 0x8a, 0x74, 0x13, 0xf0, 0xa1, 0x42, 0xfd, 0x40, 0xd4, 0x93, 0x47] ); - pub fn keccak>(s: T) -> H256 { let mut result = [0u8; 32]; write_keccak(s, &mut result); diff --git a/util/hashdb/src/lib.rs b/util/hashdb/src/lib.rs index b65f304e42..182e81c5dc 100644 --- a/util/hashdb/src/lib.rs +++ b/util/hashdb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/lib.rs b/util/io/src/lib.rs index cd635121ff..02dbf223be 100644 --- a/util/io/src/lib.rs +++ b/util/io/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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_mio.rs b/util/io/src/service_mio.rs index 2ae3d55e0f..089d54cc45 100644 --- a/util/io/src/service_mio.rs +++ b/util/io/src/service_mio.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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_non_mio.rs b/util/io/src/service_non_mio.rs index 22a795e4e8..315f84c4d1 100644 --- a/util/io/src/service_non_mio.rs +++ b/util/io/src/service_non_mio.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 89657810dc..da144afea4 100644 --- a/util/io/src/worker.rs +++ b/util/io/src/worker.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/journaldb/src/archivedb.rs b/util/journaldb/src/archivedb.rs index b58558a332..e2d8c80070 100644 --- a/util/journaldb/src/archivedb.rs +++ b/util/journaldb/src/archivedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/journaldb/src/earlymergedb.rs b/util/journaldb/src/earlymergedb.rs index c26a67e0ad..25e078bdae 100644 --- a/util/journaldb/src/earlymergedb.rs +++ b/util/journaldb/src/earlymergedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -394,7 +394,6 @@ impl JournalDB for EarlyMergeDB { .filter_map(|(k, (v, r))| if r > 0 { assert!(r == 1); Some((k, v)) } else { assert!(r >= -1); None }) .collect(); - // TODO: check all removes are in the db. // Process the new inserts. diff --git a/util/journaldb/src/lib.rs b/util/journaldb/src/lib.rs index c1fb23b6cd..7607271c8d 100644 --- a/util/journaldb/src/lib.rs +++ b/util/journaldb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/journaldb/src/overlaydb.rs b/util/journaldb/src/overlaydb.rs index 54d0bb12d7..46bf42c0ad 100644 --- a/util/journaldb/src/overlaydb.rs +++ b/util/journaldb/src/overlaydb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/journaldb/src/overlayrecentdb.rs b/util/journaldb/src/overlayrecentdb.rs index 2c9ce5cb1d..c7153b889d 100644 --- a/util/journaldb/src/overlayrecentdb.rs +++ b/util/journaldb/src/overlayrecentdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/journaldb/src/refcounteddb.rs b/util/journaldb/src/refcounteddb.rs index d182d5cf80..cc81bbfba4 100644 --- a/util/journaldb/src/refcounteddb.rs +++ b/util/journaldb/src/refcounteddb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/journaldb/src/traits.rs b/util/journaldb/src/traits.rs index aaf5b27970..e37ac8aabf 100644 --- a/util/journaldb/src/traits.rs +++ b/util/journaldb/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/kvdb-memorydb/src/lib.rs b/util/kvdb-memorydb/src/lib.rs index 0530c613e3..45ed1c3e69 100644 --- a/util/kvdb-memorydb/src/lib.rs +++ b/util/kvdb-memorydb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/kvdb-rocksdb/src/lib.rs b/util/kvdb-rocksdb/src/lib.rs index 4f2220a11d..6052468298 100644 --- a/util/kvdb-rocksdb/src/lib.rs +++ b/util/kvdb-rocksdb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -388,7 +388,6 @@ impl Database { DBTransaction::new() } - fn to_overlay_column(col: Option) -> usize { col.map_or(0, |c| (c + 1) as usize) } diff --git a/util/kvdb/src/lib.rs b/util/kvdb/src/lib.rs index 9ed1038bff..78e7b2dc19 100644 --- a/util/kvdb/src/lib.rs +++ b/util/kvdb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/macros/src/lib.rs b/util/macros/src/lib.rs index 78bcd0397e..cc5f92ba15 100644 --- a/util/macros/src/lib.rs +++ b/util/macros/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/mem/src/lib.rs b/util/mem/src/lib.rs index a8b9e53f66..db3ad59239 100644 --- a/util/mem/src/lib.rs +++ b/util/mem/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -54,4 +54,3 @@ impl> DerefMut for Memzero { &mut self.mem } } - diff --git a/util/memory_cache/src/lib.rs b/util/memory_cache/src/lib.rs index af70b0cff3..ff996142b9 100644 --- a/util/memory_cache/src/lib.rs +++ b/util/memory_cache/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/memorydb/src/lib.rs b/util/memorydb/src/lib.rs index 12eb62e057..e297d1e6d1 100644 --- a/util/memorydb/src/lib.rs +++ b/util/memorydb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/migration-rocksdb/src/lib.rs b/util/migration-rocksdb/src/lib.rs index fbc9681b40..2e39a380ba 100644 --- a/util/migration-rocksdb/src/lib.rs +++ b/util/migration-rocksdb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/migration-rocksdb/tests/tests.rs b/util/migration-rocksdb/tests/tests.rs index 85c48f12b6..c98ff9d71b 100644 --- a/util/migration-rocksdb/tests/tests.rs +++ b/util/migration-rocksdb/tests/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -119,7 +119,6 @@ impl Migration for AddsColumn { batch.insert(key.into_vec(), value.into_vec(), dest)?; } - if col == Some(1) { batch.insert(vec![1, 2, 3], vec![4, 5, 6], dest)?; } diff --git a/util/network-devp2p/src/connection.rs b/util/network-devp2p/src/connection.rs index 5dbf71fa01..37824ae5d7 100644 --- a/util/network-devp2p/src/connection.rs +++ b/util/network-devp2p/src/connection.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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-devp2p/src/discovery.rs b/util/network-devp2p/src/discovery.rs index af43546a5f..8e8a3d6cc6 100644 --- a/util/network-devp2p/src/discovery.rs +++ b/util/network-devp2p/src/discovery.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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-devp2p/src/handshake.rs b/util/network-devp2p/src/handshake.rs index ffe0276d97..18869de55f 100644 --- a/util/network-devp2p/src/handshake.rs +++ b/util/network-devp2p/src/handshake.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -515,4 +515,3 @@ mod test { check_ack(&h, 57); } } - diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index 245492de80..6d28a838c2 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -1154,7 +1154,6 @@ fn key_save_load() { assert_eq!(key, r.unwrap()); } - #[test] fn host_client_url() { let mut config = NetworkConfiguration::new_local(); diff --git a/util/network-devp2p/src/ip_utils.rs b/util/network-devp2p/src/ip_utils.rs index 3d7d33a066..a68fc51f10 100644 --- a/util/network-devp2p/src/ip_utils.rs +++ b/util/network-devp2p/src/ip_utils.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -533,5 +533,3 @@ fn ipv6_properties() { check("::", true, false, true); check("::1", false, true, false); } - - diff --git a/util/network-devp2p/src/lib.rs b/util/network-devp2p/src/lib.rs index 12383fdbee..01fc1fe25f 100644 --- a/util/network-devp2p/src/lib.rs +++ b/util/network-devp2p/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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-devp2p/src/node_table.rs b/util/network-devp2p/src/node_table.rs index d5d0207ecd..087caefe18 100644 --- a/util/network-devp2p/src/node_table.rs +++ b/util/network-devp2p/src/node_table.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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-devp2p/src/service.rs b/util/network-devp2p/src/service.rs index f90c660671..d7182f4618 100644 --- a/util/network-devp2p/src/service.rs +++ b/util/network-devp2p/src/service.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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-devp2p/src/session.rs b/util/network-devp2p/src/session.rs index f830dcc0d7..a405ad469d 100644 --- a/util/network-devp2p/src/session.rs +++ b/util/network-devp2p/src/session.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -515,4 +515,3 @@ impl Session { Ok(()) } } - diff --git a/util/network-devp2p/tests/tests.rs b/util/network-devp2p/tests/tests.rs index 3c2333cd10..970aa3b8a5 100644 --- a/util/network-devp2p/tests/tests.rs +++ b/util/network-devp2p/tests/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -99,7 +99,6 @@ impl NetworkProtocolHandler for TestProtocol { } } - #[test] fn net_service() { let service = NetworkService::new(NetworkConfiguration::new_local(), None).expect("Error creating network service"); diff --git a/util/network/src/connection_filter.rs b/util/network/src/connection_filter.rs index 5afe5865b7..e146aee4c7 100644 --- a/util/network/src/connection_filter.rs +++ b/util/network/src/connection_filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 50bd01e9ba..4233b9e058 100644 --- a/util/network/src/error.rs +++ b/util/network/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 a04eb04880..9b7328bdbd 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/panic_hook/src/lib.rs b/util/panic_hook/src/lib.rs index 1136e9e362..ef6220572a 100644 --- a/util/panic_hook/src/lib.rs +++ b/util/panic_hook/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -8,7 +8,7 @@ // 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 +// 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 diff --git a/util/path/src/lib.rs b/util/path/src/lib.rs index 761b511522..38608db660 100644 --- a/util/path/src/lib.rs +++ b/util/path/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -98,4 +98,3 @@ pub fn restrict_permissions_owner(_file_path: &Path, _write: bool, _executable: //TODO: implement me Ok(()) } - diff --git a/util/patricia_trie/src/fatdb.rs b/util/patricia_trie/src/fatdb.rs index d428ff8116..90cdef9021 100644 --- a/util/patricia_trie/src/fatdb.rs +++ b/util/patricia_trie/src/fatdb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/fatdbmut.rs b/util/patricia_trie/src/fatdbmut.rs index 4b7f2de063..9bf7b88036 100644 --- a/util/patricia_trie/src/fatdbmut.rs +++ b/util/patricia_trie/src/fatdbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/lib.rs b/util/patricia_trie/src/lib.rs index d1563becff..8e0e44f032 100644 --- a/util/patricia_trie/src/lib.rs +++ b/util/patricia_trie/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/lookup.rs b/util/patricia_trie/src/lookup.rs index 2d63f7d00e..ae91689a31 100644 --- a/util/patricia_trie/src/lookup.rs +++ b/util/patricia_trie/src/lookup.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/nibbleslice.rs b/util/patricia_trie/src/nibbleslice.rs index c2dd6611e2..4153049810 100644 --- a/util/patricia_trie/src/nibbleslice.rs +++ b/util/patricia_trie/src/nibbleslice.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/nibblevec.rs b/util/patricia_trie/src/nibblevec.rs index fbe97496ae..4398dbc6f7 100644 --- a/util/patricia_trie/src/nibblevec.rs +++ b/util/patricia_trie/src/nibblevec.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/node.rs b/util/patricia_trie/src/node.rs index 0b99acded3..0ded1f66db 100644 --- a/util/patricia_trie/src/node.rs +++ b/util/patricia_trie/src/node.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/recorder.rs b/util/patricia_trie/src/recorder.rs index 35a515b704..6a0f9b45eb 100644 --- a/util/patricia_trie/src/recorder.rs +++ b/util/patricia_trie/src/recorder.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/sectriedb.rs b/util/patricia_trie/src/sectriedb.rs index a9176d022a..c8d5ec0ec8 100644 --- a/util/patricia_trie/src/sectriedb.rs +++ b/util/patricia_trie/src/sectriedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/sectriedbmut.rs b/util/patricia_trie/src/sectriedbmut.rs index b0436b271f..335fb2f183 100644 --- a/util/patricia_trie/src/sectriedbmut.rs +++ b/util/patricia_trie/src/sectriedbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/triedb.rs b/util/patricia_trie/src/triedb.rs index c18e4fce96..65ce3caba8 100644 --- a/util/patricia_trie/src/triedb.rs +++ b/util/patricia_trie/src/triedb.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/patricia_trie/src/triedbmut.rs b/util/patricia_trie/src/triedbmut.rs index b8d919deea..994045eb3a 100644 --- a/util/patricia_trie/src/triedbmut.rs +++ b/util/patricia_trie/src/triedbmut.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -893,7 +893,6 @@ impl<'a> TrieMut for TrieDBMut<'a> { self.lookup(NibbleSlice::new(key), &self.root_handle) } - fn insert(&mut self, key: &[u8], value: &[u8]) -> super::Result> { if value.is_empty() { return self.remove(key) } diff --git a/util/plain_hasher/benches/bench.rs b/util/plain_hasher/benches/bench.rs index e7e8570abb..cfaa95eaa6 100644 --- a/util/plain_hasher/benches/bench.rs +++ b/util/plain_hasher/benches/bench.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + #![feature(test)] extern crate test; diff --git a/util/plain_hasher/src/lib.rs b/util/plain_hasher/src/lib.rs index d08d4dd1ab..74e2225dc8 100644 --- a/util/plain_hasher/src/lib.rs +++ b/util/plain_hasher/src/lib.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 . + #[macro_use] extern crate crunchy; extern crate ethereum_types; diff --git a/util/reactor/src/lib.rs b/util/reactor/src/lib.rs index 9c049b8f75..8fd37e7c88 100644 --- a/util/reactor/src/lib.rs +++ b/util/reactor/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . - //! Tokio Core Reactor wrapper. extern crate futures; @@ -122,7 +121,6 @@ impl Remote { } } - /// Spawn a future to this event loop pub fn spawn(&self, r: R) where R: IntoFuture + Send + 'static, diff --git a/util/rlp/src/rlpin.rs b/util/rlp/src/rlpin.rs index a55b4f7907..23fdc452e7 100644 --- a/util/rlp/src/rlpin.rs +++ b/util/rlp/src/rlpin.rs @@ -281,7 +281,6 @@ impl<'a, 'view> Rlp<'a> where 'a: 'view { Ok(result) } - /// consumes slice prefix of length `len` fn consume(bytes: &'a [u8], len: usize) -> Result<&'a [u8], DecoderError> { match bytes.len() >= len { diff --git a/util/rlp/src/stream.rs b/util/rlp/src/stream.rs index 000b6e15bc..550ede0399 100644 --- a/util/rlp/src/stream.rs +++ b/util/rlp/src/stream.rs @@ -133,7 +133,6 @@ impl RlpStream { self } - /// Declare appending the list of unknown size, chainable. pub fn begin_unbounded_list(&mut self) -> &mut RlpStream { self.finished_list = false; @@ -206,7 +205,6 @@ impl RlpStream { base_size } - /// Returns current RLP size in bytes for the data pushed into the list. pub fn len<'a>(&'a self) -> usize { self.estimate_size(0) diff --git a/util/rlp_compress/src/lib.rs b/util/rlp_compress/src/lib.rs index b895e1ce1a..af5b09aac7 100644 --- a/util/rlp_compress/src/lib.rs +++ b/util/rlp_compress/src/lib.rs @@ -107,4 +107,3 @@ impl<'a> Compressor for Swapper<'a> { self.rlp_to_compressed.get(rlp).cloned() } } - diff --git a/util/rlp_compress/tests/compress.rs b/util/rlp_compress/tests/compress.rs index a01dbde358..9d23f8c670 100644 --- a/util/rlp_compress/tests/compress.rs +++ b/util/rlp_compress/tests/compress.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 rlp_compress; use rlp_compress::{compress, decompress, Swapper, snapshot_swapper, blocks_swapper, Compressor, Decompressor}; diff --git a/util/rlp_derive/src/de.rs b/util/rlp_derive/src/de.rs index dac4e34cdb..fe0ccfba6f 100644 --- a/util/rlp_derive/src/de.rs +++ b/util/rlp_derive/src/de.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 {syn, quote}; struct ParseQuotes { @@ -28,7 +44,6 @@ pub fn impl_decodable(ast: &syn::DeriveInput) -> quote::Tokens { _ => panic!("#[derive(RlpDecodable)] is only defined for structs."), }; - let stmts: Vec<_> = body.fields.iter().enumerate().map(decodable_field_map).collect(); let name = &ast.ident; @@ -132,4 +147,3 @@ fn decodable_field(index: usize, field: &syn::Field, quotes: ParseQuotes) -> quo _ => panic!("rlp_derive not supported"), } } - diff --git a/util/rlp_derive/src/en.rs b/util/rlp_derive/src/en.rs index 484ac015e5..607255a96c 100644 --- a/util/rlp_derive/src/en.rs +++ b/util/rlp_derive/src/en.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 {syn, quote}; pub fn impl_encodable(ast: &syn::DeriveInput) -> quote::Tokens { @@ -104,4 +120,3 @@ fn encodable_field(index: usize, field: &syn::Field) -> quote::Tokens { _ => panic!("rlp_derive not supported"), } } - diff --git a/util/rlp_derive/src/lib.rs b/util/rlp_derive/src/lib.rs index 93f8d9619d..bc6bff1d5c 100644 --- a/util/rlp_derive/src/lib.rs +++ b/util/rlp_derive/src/lib.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 proc_macro; extern crate syn; #[macro_use] diff --git a/util/rlp_derive/tests/rlp.rs b/util/rlp_derive/tests/rlp.rs index ba51309146..7115b87c96 100644 --- a/util/rlp_derive/tests/rlp.rs +++ b/util/rlp_derive/tests/rlp.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2018 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 rlp; #[macro_use] extern crate rlp_derive; @@ -41,4 +57,3 @@ fn test_encode_foo_wrapper() { let decoded = decode(&expected).expect("decode failure"); assert_eq!(foo, decoded); } - diff --git a/util/stats/src/lib.rs b/util/stats/src/lib.rs index 74fda92726..8d107f4e9c 100644 --- a/util/stats/src/lib.rs +++ b/util/stats/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -130,7 +130,6 @@ impl Histogram } } - #[cfg(test)] mod tests { use super::*; diff --git a/util/stop-guard/src/lib.rs b/util/stop-guard/src/lib.rs index f208138ab6..208b57c6d9 100644 --- a/util/stop-guard/src/lib.rs +++ b/util/stop-guard/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/trace-time/src/lib.rs b/util/trace-time/src/lib.rs index e9566e7f94..4c3b0b2743 100644 --- a/util/trace-time/src/lib.rs +++ b/util/trace-time/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/trie-standardmap/src/lib.rs b/util/trie-standardmap/src/lib.rs index d7ee08ac46..51c8593ea4 100644 --- a/util/trie-standardmap/src/lib.rs +++ b/util/trie-standardmap/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/triehash/src/lib.rs b/util/triehash/src/lib.rs index 7f20d3915e..c78ed0ca1b 100644 --- a/util/triehash/src/lib.rs +++ b/util/triehash/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -283,7 +283,6 @@ fn hash256aux, B: AsRef<[u8]>>(input: &[(A, B)], pre_len: usize, }; } - #[test] fn test_nibbles() { let v = vec![0x31, 0x23, 0x45]; @@ -296,7 +295,6 @@ fn test_nibbles() { assert_eq!(as_nibbles(&v), e); } - #[cfg(test)] mod tests { use super::{trie_root, shared_prefix_len, hex_prefix_encode}; diff --git a/util/unexpected/src/lib.rs b/util/unexpected/src/lib.rs index 4cf8448bd4..77d4035a64 100644 --- a/util/unexpected/src/lib.rs +++ b/util/unexpected/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/src/lib.rs b/util/using_queue/src/lib.rs index 03862e9c8a..42eb1cbe38 100644 --- a/util/using_queue/src/lib.rs +++ b/util/using_queue/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/version/build.rs b/util/version/build.rs index 47c0e128f2..a367296a5f 100644 --- a/util/version/build.rs +++ b/util/version/build.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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/version/src/lib.rs b/util/version/src/lib.rs index 6c56bfb7e6..77fc71c70f 100644 --- a/util/version/src/lib.rs +++ b/util/version/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/lib.rs b/whisper/src/lib.rs index 85ab55e0f4..190169b2c2 100644 --- a/whisper/src/lib.rs +++ b/whisper/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/message.rs b/whisper/src/message.rs index d0de9af4b5..95c2112551 100644 --- a/whisper/src/message.rs +++ b/whisper/src/message.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/net/mod.rs b/whisper/src/net/mod.rs index 1115b17d4f..6ec3b08a54 100644 --- a/whisper/src/net/mod.rs +++ b/whisper/src/net/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/net/tests.rs b/whisper/src/net/tests.rs index 51c9c00ce2..15aba5c3ee 100644 --- a/whisper/src/net/tests.rs +++ b/whisper/src/net/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/rpc/crypto.rs b/whisper/src/rpc/crypto.rs index 667656d6bf..a796a0613c 100644 --- a/whisper/src/rpc/crypto.rs +++ b/whisper/src/rpc/crypto.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/rpc/filter.rs b/whisper/src/rpc/filter.rs index 8d125174ed..d1b9c4c1cc 100644 --- a/whisper/src/rpc/filter.rs +++ b/whisper/src/rpc/filter.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/rpc/key_store.rs b/whisper/src/rpc/key_store.rs index 1fb4e264ac..a63ef8652c 100644 --- a/whisper/src/rpc/key_store.rs +++ b/whisper/src/rpc/key_store.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/rpc/mod.rs b/whisper/src/rpc/mod.rs index 7daa3f4559..7406d6421d 100644 --- a/whisper/src/rpc/mod.rs +++ b/whisper/src/rpc/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify diff --git a/whisper/src/rpc/payload.rs b/whisper/src/rpc/payload.rs index 75d24bd7cf..5884cdee98 100644 --- a/whisper/src/rpc/payload.rs +++ b/whisper/src/rpc/payload.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -184,7 +184,6 @@ pub fn decode(payload: &[u8]) -> Result { } }; - if next_slice(1)?[0] != STANDARD_PAYLOAD_VERSION { return Err("unknown payload version."); } diff --git a/whisper/src/rpc/types.rs b/whisper/src/rpc/types.rs index 9598f48bf8..3d132c73cc 100644 --- a/whisper/src/rpc/types.rs +++ b/whisper/src/rpc/types.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 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 8fc29880e9..8701daecb5 100644 --- a/windows/ptray/ptray.cpp +++ b/windows/ptray/ptray.cpp @@ -1,4 +1,4 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -358,4 +358,3 @@ void EnableAutostart(bool enable) { RegDeleteValue(hKey, L"Parity"); } } - -- GitLab From 8057e8df43e78328509c3a468592b8e798772f84 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 4 Jun 2018 10:26:30 +0100 Subject: [PATCH 004/191] Remove Result wrapper from AccountProvider in RPC impls (#8763) * Remove AccountProvider Result, it's always `Ok` * Remove unnecessary clones * Remove redundant `Ok` --- rpc/src/v1/impls/eth.rs | 11 +-- rpc/src/v1/impls/parity.rs | 23 ++---- rpc/src/v1/impls/parity_accounts.rs | 117 ++++++++++------------------ rpc/src/v1/impls/personal.rs | 17 ++-- rpc/src/v1/impls/secretstore.rs | 15 +--- rpc/src/v1/impls/signer.rs | 7 +- rpc/src/v1/impls/signing.rs | 9 +-- rpc/src/v1/impls/signing_unsafe.rs | 8 +- rpc/src/v1/tests/mocked/parity.rs | 4 +- rpc/src/v1/tests/mocked/personal.rs | 3 +- rpc/src/v1/tests/mocked/signer.rs | 3 +- rpc/src/v1/tests/mocked/signing.rs | 5 +- 12 files changed, 66 insertions(+), 156 deletions(-) diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index 38e36cf11c..8de5783aa3 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -170,12 +170,6 @@ impl EthClient`, errors if provider was not - /// set. - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } - fn rich_block(&self, id: BlockNumberOrId, include_txs: bool) -> Result> { let client = &self.client; @@ -404,10 +398,9 @@ impl EthClient Result> { - let store = self.account_provider()?; - store + self.accounts .note_dapp_used(dapp.clone()) - .and_then(|_| store.dapp_addresses(dapp)) + .and_then(|_| self.accounts.dapp_addresses(dapp)) .map_err(|e| errors::account("Could not fetch accounts.", e)) } diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index e3ad5a3b1b..5707104212 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -105,12 +105,6 @@ impl ParityClient where eip86_transition, } } - - /// Attempt to get the `Arc`, errors if provider was not - /// set. - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } } impl Parity for ParityClient where @@ -124,15 +118,14 @@ impl Parity for ParityClient where fn accounts_info(&self, dapp: Trailing) -> Result> { let dapp = dapp.unwrap_or_default(); - let store = self.account_provider()?; - let dapp_accounts = store + let dapp_accounts = self.accounts .note_dapp_used(dapp.clone().into()) - .and_then(|_| store.dapp_addresses(dapp.into())) + .and_then(|_| self.accounts.dapp_addresses(dapp.into())) .map_err(|e| errors::account("Could not fetch accounts.", e))? .into_iter().collect::>(); - let info = store.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?; - let other = store.addresses_info(); + let info = self.accounts.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?; + let other = self.accounts.addresses_info(); Ok(info .into_iter() @@ -144,8 +137,7 @@ impl Parity for ParityClient where } fn hardware_accounts_info(&self) -> Result> { - let store = self.account_provider()?; - let info = store.hardware_accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?; + let info = self.accounts.hardware_accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?; Ok(info .into_iter() .map(|(a, v)| (H160::from(a), HwAccountInfo { name: v.name, manufacturer: v.meta })) @@ -154,14 +146,13 @@ impl Parity for ParityClient where } fn locked_hardware_accounts_info(&self) -> Result> { - let store = self.account_provider()?; - Ok(store.locked_hardware_accounts().map_err(|e| errors::account("Error communicating with hardware wallet.", e))?) + self.accounts.locked_hardware_accounts().map_err(|e| errors::account("Error communicating with hardware wallet.", e)) } fn default_account(&self, meta: Self::Metadata) -> Result { let dapp_id = meta.dapp_id(); - Ok(self.account_provider()? + Ok(self.accounts .dapp_default_address(dapp_id.into()) .map(Into::into) .ok() diff --git a/rpc/src/v1/impls/parity_accounts.rs b/rpc/src/v1/impls/parity_accounts.rs index eb069cf27f..d7e1fd2546 100644 --- a/rpc/src/v1/impls/parity_accounts.rs +++ b/rpc/src/v1/impls/parity_accounts.rs @@ -40,19 +40,12 @@ impl ParityAccountsClient { accounts: store.clone(), } } - - /// Attempt to get the `Arc`, errors if provider was not - /// set. - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } } impl ParityAccounts for ParityAccountsClient { fn all_accounts_info(&self) -> Result> { - let store = self.account_provider()?; - let info = store.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?; - let other = store.addresses_info(); + let info = self.accounts.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e))?; + let other = self.accounts.addresses_info(); let account_iter = info .into_iter() @@ -82,29 +75,23 @@ impl ParityAccounts for ParityAccountsClient { } fn new_account_from_phrase(&self, phrase: String, pass: String) -> Result { - let store = self.account_provider()?; - let brain = Brain::new(phrase).generate().unwrap(); - store.insert_account(brain.secret().clone(), &pass) + self.accounts.insert_account(brain.secret().clone(), &pass) .map(Into::into) .map_err(|e| errors::account("Could not create account.", e)) } fn new_account_from_wallet(&self, json: String, pass: String) -> Result { - let store = self.account_provider()?; - - store.import_presale(json.as_bytes(), &pass) - .or_else(|_| store.import_wallet(json.as_bytes(), &pass, true)) + self.accounts.import_presale(json.as_bytes(), &pass) + .or_else(|_| self.accounts.import_wallet(json.as_bytes(), &pass, true)) .map(Into::into) .map_err(|e| errors::account("Could not create account.", e)) } fn new_account_from_secret(&self, secret: RpcH256, pass: String) -> Result { - let store = self.account_provider()?; - let secret = Secret::from_unsafe_slice(&secret.0) .map_err(|e| errors::account("Could not create account.", e))?; - store.insert_account(secret, &pass) + self.accounts.insert_account(secret, &pass) .map(Into::into) .map_err(|e| errors::account("Could not create account.", e)) } @@ -112,14 +99,14 @@ impl ParityAccounts for ParityAccountsClient { fn test_password(&self, account: RpcH160, password: String) -> Result { let account: Address = account.into(); - self.account_provider()? + self.accounts .test_password(&account, &password) .map_err(|e| errors::account("Could not fetch account info.", e)) } fn change_password(&self, account: RpcH160, password: String, new_password: String) -> Result { let account: Address = account.into(); - self.account_provider()? + self.accounts .change_password(&account, password, new_password) .map(|_| true) .map_err(|e| errors::account("Could not fetch account info.", e)) @@ -127,181 +114,156 @@ impl ParityAccounts for ParityAccountsClient { fn kill_account(&self, account: RpcH160, password: String) -> Result { let account: Address = account.into(); - self.account_provider()? + self.accounts .kill_account(&account, &password) .map(|_| true) .map_err(|e| errors::account("Could not delete account.", e)) } fn remove_address(&self, addr: RpcH160) -> Result { - let store = self.account_provider()?; let addr: Address = addr.into(); - store.remove_address(addr); + self.accounts.remove_address(addr); Ok(true) } fn set_account_name(&self, addr: RpcH160, name: String) -> Result { - let store = self.account_provider()?; let addr: Address = addr.into(); - store.set_account_name(addr.clone(), name.clone()) - .unwrap_or_else(|_| store.set_address_name(addr, name)); + self.accounts.set_account_name(addr.clone(), name.clone()) + .unwrap_or_else(|_| self.accounts.set_address_name(addr, name)); Ok(true) } fn set_account_meta(&self, addr: RpcH160, meta: String) -> Result { - let store = self.account_provider()?; let addr: Address = addr.into(); - store.set_account_meta(addr.clone(), meta.clone()) - .unwrap_or_else(|_| store.set_address_meta(addr, meta)); + self.accounts.set_account_meta(addr.clone(), meta.clone()) + .unwrap_or_else(|_| self.accounts.set_address_meta(addr, meta)); Ok(true) } fn set_dapp_addresses(&self, dapp: DappId, addresses: Option>) -> Result { - let store = self.account_provider()?; - - store.set_dapp_addresses(dapp.into(), addresses.map(into_vec)) + self.accounts.set_dapp_addresses(dapp.into(), addresses.map(into_vec)) .map_err(|e| errors::account("Couldn't set dapp addresses.", e)) .map(|_| true) } fn dapp_addresses(&self, dapp: DappId) -> Result> { - let store = self.account_provider()?; - - store.dapp_addresses(dapp.into()) + self.accounts.dapp_addresses(dapp.into()) .map_err(|e| errors::account("Couldn't get dapp addresses.", e)) .map(into_vec) } fn set_dapp_default_address(&self, dapp: DappId, address: RpcH160) -> Result { - let store = self.account_provider()?; - - store.set_dapp_default_address(dapp.into(), address.into()) + self.accounts.set_dapp_default_address(dapp.into(), address.into()) .map_err(|e| errors::account("Couldn't set dapp default address.", e)) .map(|_| true) } fn dapp_default_address(&self, dapp: DappId) -> Result { - let store = self.account_provider()?; - - store.dapp_default_address(dapp.into()) + self.accounts.dapp_default_address(dapp.into()) .map_err(|e| errors::account("Couldn't get dapp default address.", e)) .map(Into::into) } fn set_new_dapps_addresses(&self, addresses: Option>) -> Result { - let store = self.account_provider()?; - - store + self.accounts .set_new_dapps_addresses(addresses.map(into_vec)) .map_err(|e| errors::account("Couldn't set dapps addresses.", e)) .map(|_| true) } fn new_dapps_addresses(&self) -> Result>> { - let store = self.account_provider()?; - - store.new_dapps_addresses() + self.accounts.new_dapps_addresses() .map_err(|e| errors::account("Couldn't get dapps addresses.", e)) .map(|accounts| accounts.map(into_vec)) } fn set_new_dapps_default_address(&self, address: RpcH160) -> Result { - let store = self.account_provider()?; - - store.set_new_dapps_default_address(address.into()) + self.accounts.set_new_dapps_default_address(address.into()) .map_err(|e| errors::account("Couldn't set new dapps default address.", e)) .map(|_| true) } fn new_dapps_default_address(&self) -> Result { - let store = self.account_provider()?; - - store.new_dapps_default_address() + self.accounts.new_dapps_default_address() .map_err(|e| errors::account("Couldn't get new dapps default address.", e)) .map(Into::into) } fn recent_dapps(&self) -> Result> { - let store = self.account_provider()?; - - store.recent_dapps() + self.accounts.recent_dapps() .map_err(|e| errors::account("Couldn't get recent dapps.", e)) .map(|map| map.into_iter().map(|(k, v)| (k.into(), v)).collect()) } fn import_geth_accounts(&self, addresses: Vec) -> Result> { - let store = self.account_provider()?; - - store + self.accounts .import_geth_accounts(into_vec(addresses), false) .map(into_vec) .map_err(|e| errors::account("Couldn't import Geth accounts", e)) } fn geth_accounts(&self) -> Result> { - let store = self.account_provider()?; - - Ok(into_vec(store.list_geth_accounts(false))) + Ok(into_vec(self.accounts.list_geth_accounts(false))) } fn create_vault(&self, name: String, password: String) -> Result { - self.account_provider()? + self.accounts .create_vault(&name, &password) .map_err(|e| errors::account("Could not create vault.", e)) .map(|_| true) } fn open_vault(&self, name: String, password: String) -> Result { - self.account_provider()? + self.accounts .open_vault(&name, &password) .map_err(|e| errors::account("Could not open vault.", e)) .map(|_| true) } fn close_vault(&self, name: String) -> Result { - self.account_provider()? + self.accounts .close_vault(&name) .map_err(|e| errors::account("Could not close vault.", e)) .map(|_| true) } fn list_vaults(&self) -> Result> { - self.account_provider()? + self.accounts .list_vaults() .map_err(|e| errors::account("Could not list vaults.", e)) } fn list_opened_vaults(&self) -> Result> { - self.account_provider()? + self.accounts .list_opened_vaults() .map_err(|e| errors::account("Could not list vaults.", e)) } fn change_vault_password(&self, name: String, new_password: String) -> Result { - self.account_provider()? + self.accounts .change_vault_password(&name, &new_password) .map_err(|e| errors::account("Could not change vault password.", e)) .map(|_| true) } fn change_vault(&self, address: RpcH160, new_vault: String) -> Result { - self.account_provider()? + self.accounts .change_vault(address.into(), &new_vault) .map_err(|e| errors::account("Could not change vault.", e)) .map(|_| true) } fn get_vault_meta(&self, name: String) -> Result { - self.account_provider()? + self.accounts .get_vault_meta(&name) .map_err(|e| errors::account("Could not get vault metadata.", e)) } fn set_vault_meta(&self, name: String, meta: String) -> Result { - self.account_provider()? + self.accounts .set_vault_meta(&name, &meta) .map_err(|e| errors::account("Could not update vault metadata.", e)) .map(|_| true) @@ -309,7 +271,7 @@ impl ParityAccounts for ParityAccountsClient { fn derive_key_index(&self, addr: RpcH160, password: String, derivation: DeriveHierarchical, save_as_account: bool) -> Result { let addr: Address = addr.into(); - self.account_provider()? + self.accounts .derive_account( &addr, Some(password), @@ -322,7 +284,7 @@ impl ParityAccounts for ParityAccountsClient { fn derive_key_hash(&self, addr: RpcH160, password: String, derivation: DeriveHash, save_as_account: bool) -> Result { let addr: Address = addr.into(); - self.account_provider()? + self.accounts .derive_account( &addr, Some(password), @@ -335,7 +297,7 @@ impl ParityAccounts for ParityAccountsClient { fn export_account(&self, addr: RpcH160, password: String) -> Result { let addr = addr.into(); - self.account_provider()? + self.accounts .export_account( &addr, password, @@ -345,7 +307,7 @@ impl ParityAccounts for ParityAccountsClient { } fn sign_message(&self, addr: RpcH160, password: String, message: RpcH256) -> Result { - self.account_provider()? + self.accounts .sign( addr.into(), Some(password), @@ -356,8 +318,7 @@ impl ParityAccounts for ParityAccountsClient { } fn hardware_pin_matrix_ack(&self, path: String, pin: String) -> Result { - let store = self.account_provider()?; - Ok(store.hardware_pin_matrix_ack(&path, &pin).map_err(|e| errors::account("Error communicating with hardware wallet.", e))?) + self.accounts.hardware_pin_matrix_ack(&path, &pin).map_err(|e| errors::account("Error communicating with hardware wallet.", e)) } } diff --git a/rpc/src/v1/impls/personal.rs b/rpc/src/v1/impls/personal.rs index 045496fc95..3a8d13c82e 100644 --- a/rpc/src/v1/impls/personal.rs +++ b/rpc/src/v1/impls/personal.rs @@ -55,16 +55,12 @@ impl PersonalClient { allow_perm_unlock, } } - - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } } impl PersonalClient { fn do_sign_transaction(&self, meta: Metadata, request: TransactionRequest, password: String) -> BoxFuture<(PendingTransaction, D)> { let dispatcher = self.dispatcher.clone(); - let accounts = try_bf!(self.account_provider()); + let accounts = self.accounts.clone(); let default = match request.from.as_ref() { Some(account) => Ok(account.clone().into()), @@ -94,22 +90,19 @@ impl Personal for PersonalClient { type Metadata = Metadata; fn accounts(&self) -> Result> { - let store = self.account_provider()?; - let accounts = store.accounts().map_err(|e| errors::account("Could not fetch accounts.", e))?; + let accounts = self.accounts.accounts().map_err(|e| errors::account("Could not fetch accounts.", e))?; Ok(accounts.into_iter().map(Into::into).collect::>()) } fn new_account(&self, pass: String) -> Result { - let store = self.account_provider()?; - - store.new_account(&pass) + self.accounts.new_account(&pass) .map(Into::into) .map_err(|e| errors::account("Could not create account.", e)) } fn unlock_account(&self, account: RpcH160, account_pass: String, duration: Option) -> Result { let account: Address = account.into(); - let store = self.account_provider()?; + let store = self.accounts.clone(); let duration = match duration { None => None, Some(duration) => { @@ -141,7 +134,7 @@ impl Personal for PersonalClient { fn sign(&self, data: RpcBytes, account: RpcH160, password: String) -> BoxFuture { let dispatcher = self.dispatcher.clone(); - let accounts = try_bf!(self.account_provider()); + let accounts = self.accounts.clone(); let payload = RpcConfirmationPayload::EthSignMessage((account.clone(), data).into()); diff --git a/rpc/src/v1/impls/secretstore.rs b/rpc/src/v1/impls/secretstore.rs index 52404a58d0..771599eca3 100644 --- a/rpc/src/v1/impls/secretstore.rs +++ b/rpc/src/v1/impls/secretstore.rs @@ -43,16 +43,9 @@ impl SecretStoreClient { } } - /// Attempt to get the `Arc`, errors if provider was not - /// set. - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } - /// Decrypt public key using account' private key fn decrypt_key(&self, address: H160, password: String, key: Bytes) -> Result> { - let store = self.account_provider()?; - store.decrypt(address.into(), Some(password), &DEFAULT_MAC, &key.0) + self.accounts.decrypt(address.into(), Some(password), &DEFAULT_MAC, &key.0) .map_err(|e| errors::account("Could not decrypt key.", e)) } @@ -65,8 +58,7 @@ impl SecretStoreClient { impl SecretStore for SecretStoreClient { fn generate_document_key(&self, address: H160, password: String, server_key_public: H512) -> Result { - let store = self.account_provider()?; - let account_public = store.account_public(address.into(), &password) + let account_public = self.accounts.account_public(address.into(), &password) .map_err(|e| errors::account("Could not read account public.", e))?; generate_document_key(account_public, server_key_public.into()) } @@ -96,8 +88,7 @@ impl SecretStore for SecretStoreClient { } fn sign_raw_hash(&self, address: H160, password: String, raw_hash: H256) -> Result { - let store = self.account_provider()?; - store + self.accounts .sign(address.into(), Some(password), raw_hash.into()) .map(|s| Bytes::new((*s).to_vec())) .map_err(|e| errors::account("Could not sign raw hash.", e)) diff --git a/rpc/src/v1/impls/signer.rs b/rpc/src/v1/impls/signer.rs index 14fd6a33a4..e679388cbf 100644 --- a/rpc/src/v1/impls/signer.rs +++ b/rpc/src/v1/impls/signer.rs @@ -77,17 +77,12 @@ impl SignerClient { } } - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } - fn confirm_internal(&self, id: U256, modification: TransactionModification, f: F) -> BoxFuture> where F: FnOnce(D, Arc, ConfirmationPayload) -> T, T: IntoFuture, Error=Error>, T::Future: Send + 'static { let id = id.into(); - let accounts = try_bf!(self.account_provider()); let dispatcher = self.dispatcher.clone(); let signer = self.signer.clone(); @@ -110,7 +105,7 @@ impl SignerClient { request.condition = condition.clone().map(Into::into); } } - let fut = f(dispatcher, accounts, payload); + let fut = f(dispatcher, self.accounts.clone(), payload); Either::A(fut.into_future().then(move |result| { // Execute if let Ok(ref response) = result { diff --git a/rpc/src/v1/impls/signing.rs b/rpc/src/v1/impls/signing.rs index 6229a54c84..b22bbc80dd 100644 --- a/rpc/src/v1/impls/signing.rs +++ b/rpc/src/v1/impls/signing.rs @@ -108,12 +108,8 @@ impl SigningQueueClient { } } - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } - fn dispatch(&self, payload: RpcConfirmationPayload, default_account: DefaultAccount, origin: Origin) -> BoxFuture { - let accounts = try_bf!(self.account_provider()); + let accounts = self.accounts.clone(); let default_account = match default_account { DefaultAccount::Provided(acc) => acc, DefaultAccount::ForDapp(dapp) => accounts.dapp_default_address(dapp).ok().unwrap_or_default(), @@ -143,8 +139,7 @@ impl ParitySigning for SigningQueueClient { type Metadata = Metadata; fn compose_transaction(&self, meta: Metadata, transaction: RpcTransactionRequest) -> BoxFuture { - let accounts = try_bf!(self.account_provider()); - let default_account = accounts.dapp_default_address(meta.dapp_id().into()).ok().unwrap_or_default(); + let default_account = self.accounts.dapp_default_address(meta.dapp_id().into()).ok().unwrap_or_default(); Box::new(self.dispatcher.fill_optional_fields(transaction.into(), default_account, true).map(Into::into)) } diff --git a/rpc/src/v1/impls/signing_unsafe.rs b/rpc/src/v1/impls/signing_unsafe.rs index f14d1e028d..6016cbbfc0 100644 --- a/rpc/src/v1/impls/signing_unsafe.rs +++ b/rpc/src/v1/impls/signing_unsafe.rs @@ -51,12 +51,8 @@ impl SigningUnsafeClient { } } - fn account_provider(&self) -> Result> { - Ok(self.accounts.clone()) - } - fn handle(&self, payload: RpcConfirmationPayload, account: DefaultAccount) -> BoxFuture { - let accounts = try_bf!(self.account_provider()); + let accounts = self.accounts.clone(); let default = match account { DefaultAccount::Provided(acc) => acc, DefaultAccount::ForDapp(dapp) => accounts.dapp_default_address(dapp).ok().unwrap_or_default(), @@ -107,7 +103,7 @@ impl ParitySigning for SigningUnsafeClient { type Metadata = Metadata; fn compose_transaction(&self, meta: Metadata, transaction: RpcTransactionRequest) -> BoxFuture { - let accounts = try_bf!(self.account_provider()); + let accounts = self.accounts.clone(); let default_account = accounts.dapp_default_address(meta.dapp_id().into()).ok().unwrap_or_default(); Box::new(self.dispatcher.fill_optional_fields(transaction.into(), default_account, true).map(Into::into)) } diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index c9dd50a3c6..4bb653c4d2 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -81,8 +81,6 @@ impl Dependencies { } pub fn client(&self, signer: Option>) -> TestParityClient { - let opt_accounts = self.accounts.clone(); - ParityClient::new( self.client.clone(), self.miner.clone(), @@ -90,7 +88,7 @@ impl Dependencies { self.updater.clone(), self.network.clone(), self.health.clone(), - opt_accounts.clone(), + self.accounts.clone(), self.logger.clone(), self.settings.clone(), signer, diff --git a/rpc/src/v1/tests/mocked/personal.rs b/rpc/src/v1/tests/mocked/personal.rs index 131a865da7..1e445c67a0 100644 --- a/rpc/src/v1/tests/mocked/personal.rs +++ b/rpc/src/v1/tests/mocked/personal.rs @@ -52,13 +52,12 @@ fn miner_service() -> Arc { fn setup() -> PersonalTester { let accounts = accounts_provider(); - let opt_accounts = accounts.clone(); let client = blockchain_client(); let miner = miner_service(); let reservations = Arc::new(Mutex::new(nonce::Reservations::new())); let dispatcher = FullDispatcher::new(client, miner.clone(), reservations, 50); - let personal = PersonalClient::new(&opt_accounts, dispatcher, false); + let personal = PersonalClient::new(&accounts, dispatcher, false); let mut io = IoHandler::default(); io.extend_with(personal.to_delegate()); diff --git a/rpc/src/v1/tests/mocked/signer.rs b/rpc/src/v1/tests/mocked/signer.rs index 8bbb590c06..b935818422 100644 --- a/rpc/src/v1/tests/mocked/signer.rs +++ b/rpc/src/v1/tests/mocked/signer.rs @@ -58,7 +58,6 @@ fn miner_service() -> Arc { fn signer_tester() -> SignerTester { let signer = Arc::new(SignerService::new_test(false)); let accounts = accounts_provider(); - let opt_accounts = accounts.clone(); let client = blockchain_client(); let miner = miner_service(); let reservations = Arc::new(Mutex::new(nonce::Reservations::new())); @@ -66,7 +65,7 @@ fn signer_tester() -> SignerTester { let dispatcher = FullDispatcher::new(client, miner.clone(), reservations, 50); let mut io = IoHandler::default(); - io.extend_with(SignerClient::new(&opt_accounts, dispatcher, &signer, event_loop.remote()).to_delegate()); + io.extend_with(SignerClient::new(&accounts, dispatcher, &signer, event_loop.remote()).to_delegate()); SignerTester { signer: signer, diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 2dc80f066c..ba9fa6d4b6 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -56,7 +56,6 @@ impl Default for SigningTester { let client = Arc::new(TestBlockChainClient::default()); let miner = Arc::new(TestMinerService::default()); let accounts = Arc::new(AccountProvider::transient_provider()); - let opt_accounts = accounts.clone(); let reservations = Arc::new(Mutex::new(nonce::Reservations::new())); let mut io = IoHandler::default(); @@ -64,9 +63,9 @@ impl Default for SigningTester { let remote = Remote::new_thread_per_future(); - let rpc = SigningQueueClient::new(&signer, dispatcher.clone(), remote.clone(), &opt_accounts); + let rpc = SigningQueueClient::new(&signer, dispatcher.clone(), remote.clone(), &accounts); io.extend_with(EthSigning::to_delegate(rpc)); - let rpc = SigningQueueClient::new(&signer, dispatcher, remote, &opt_accounts); + let rpc = SigningQueueClient::new(&signer, dispatcher, remote, &accounts); io.extend_with(ParitySigning::to_delegate(rpc)); SigningTester { -- GitLab From e2a90ce159c751fdc548610749388a3c3a3cd9ad Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 4 Jun 2018 21:58:44 +0800 Subject: [PATCH 005/191] Conditionally compile ethcore public test helpers (#8743) * Mark test helpers and test-only specs as cfg(test) * Use test-probe to conditionally compile test helpers * Remove test probe and directly use features tag --- ethcore/Cargo.toml | 2 ++ ethcore/private-tx/Cargo.toml | 3 +++ ethcore/src/client/mod.rs | 4 ++++ ethcore/src/lib.rs | 4 ++-- ethcore/src/spec/spec.rs | 25 +++++++++++++++++++------ ethcore/sync/Cargo.toml | 1 + 6 files changed, 31 insertions(+), 8 deletions(-) diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 71c84a293f..2b6ab9ebc3 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -89,3 +89,5 @@ json-tests = ["ethcore-transaction/json-tests"] test-heavy = [] # Compile benches benches = [] +# Compile test helpers +test-helpers = [] diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 8283ab314a..441c9882e2 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -35,3 +35,6 @@ serde_derive = "1.0" serde_json = "1.0" tiny-keccak = "1.4" url = "1" + +[dev-dependencies] +ethcore = { path = "..", features = ["test-helpers"] } diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 6e12c03052..3691768dcf 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -20,16 +20,20 @@ mod ancient_import; mod client; mod config; mod error; +#[cfg(any(test, feature="test-helpers"))] mod evm_test_client; mod io_message; +#[cfg(any(test, feature="test-helpers"))] mod test_client; mod trace; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; +#[cfg(any(test, feature="test-helpers"))] pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult}; pub use self::io_message::ClientIoMessage; +#[cfg(any(test, feature="test-helpers"))] pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 00113f7303..e89b0dfff9 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -157,8 +157,6 @@ pub mod snapshot; pub mod spec; pub mod state; pub mod state_db; -// Test helpers made public for usage outside ethcore -pub mod test_helpers; pub mod trace; pub mod verification; @@ -177,6 +175,8 @@ mod tests; #[cfg(test)] #[cfg(feature="json-tests")] mod json_tests; +#[cfg(any(test, feature="test-helpers"))] +pub mod test_helpers; #[cfg(test)] mod test_helpers_internal; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index a8ab757549..784aa2a4e5 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -515,6 +515,7 @@ macro_rules! load_bundled { }; } +#[cfg(any(test, feature="test-helpers"))] macro_rules! load_machine_bundled { ($e:expr) => { Spec::load_machine( @@ -838,38 +839,44 @@ impl Spec { self.engine.genesis_epoch_data(&genesis, &call) } + /// Create a new Spec with InstantSeal consensus which does internal sealing (not requiring + /// work). + pub fn new_instant() -> Spec { + load_bundled!("instant_seal") + } + /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a /// NullEngine consensus. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test() -> Spec { load_bundled!("null_morden") } /// Create the EthereumMachine corresponding to Spec::new_test. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_machine() -> EthereumMachine { load_machine_bundled!("null_morden") } /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") } /// Create a new Spec which is a NullEngine consensus with a premine of address whose /// secret is keccak(''). + #[cfg(any(test, feature="test-helpers"))] pub fn new_null() -> Spec { load_bundled!("null") } /// Create a new Spec which constructs a contract at address 5 with storage at 0 equal to 1. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_constructor() -> Spec { load_bundled!("constructor") } - /// Create a new Spec with InstantSeal consensus which does internal sealing (not requiring - /// work). - pub fn new_instant() -> Spec { - load_bundled!("instant_seal") - } - /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work). /// Accounts with secrets keccak("0") and keccak("1") are the validators. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_round() -> Self { load_bundled!("authority_round") } @@ -877,6 +884,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work) with empty step messages enabled. /// Accounts with secrets keccak("0") and keccak("1") are the validators. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_round_empty_steps() -> Self { load_bundled!("authority_round_empty_steps") } @@ -884,6 +892,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus (with empty steps) using a block reward /// contract. The contract source code can be found at: /// https://github.com/parity-contracts/block-reward/blob/daf7d44383b6cdb11cb6b953b018648e2b027cfb/contracts/ExampleBlockReward.sol + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_round_block_reward_contract() -> Self { load_bundled!("authority_round_block_reward_contract") } @@ -891,6 +900,7 @@ impl Spec { /// Create a new Spec with Tendermint consensus which does internal sealing (not requiring /// work). /// Account keccak("0") and keccak("1") are a authorities. + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_tendermint() -> Self { load_bundled!("tendermint") } @@ -903,6 +913,7 @@ impl Spec { /// "0xbfc708a000000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1" and added /// back in using /// "0x4d238c8e00000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1". + #[cfg(any(test, feature="test-helpers"))] pub fn new_validator_safe_contract() -> Self { load_bundled!("validator_safe_contract") } @@ -910,6 +921,7 @@ impl Spec { /// The same as the `safeContract`, but allows reporting and uses AuthorityRound. /// Account is marked with `reportBenign` it can be checked as disliked with "0xd8f2e0bf". /// Validator can be removed with `reportMalicious`. + #[cfg(any(test, feature="test-helpers"))] pub fn new_validator_contract() -> Self { load_bundled!("validator_contract") } @@ -918,6 +930,7 @@ impl Spec { /// height. /// Account with secrets keccak("0") is the validator for block 1 and with keccak("1") /// onwards. + #[cfg(any(test, feature="test-helpers"))] pub fn new_validator_multi() -> Self { load_bundled!("validator_multi") } diff --git a/ethcore/sync/Cargo.toml b/ethcore/sync/Cargo.toml index cf163cc7bd..66ee566215 100644 --- a/ethcore/sync/Cargo.toml +++ b/ethcore/sync/Cargo.toml @@ -38,3 +38,4 @@ ethcore-io = { path = "../../util/io", features = ["mio"] } ethkey = { path = "../../ethkey" } kvdb-memorydb = { path = "../../util/kvdb-memorydb" } ethcore-private-tx = { path = "../private-tx" } +ethcore = { path = "..", features = ["test-helpers"] } -- GitLab From b3ea766bd5a77e1d3491db2b6f48c3ded2dd5fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 5 Jun 2018 08:58:09 +0100 Subject: [PATCH 006/191] rpc: fix address formatting in TransactionRequest Display (#8786) * rpc: fix address formatting in TransactionRequest Display * rpc: use unwrap_or_else when no to address provided --- rpc/src/v1/types/transaction_request.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rpc/src/v1/types/transaction_request.rs b/rpc/src/v1/types/transaction_request.rs index 7fed6f681a..4fa47b5acd 100644 --- a/rpc/src/v1/types/transaction_request.rs +++ b/rpc/src/v1/types/transaction_request.rs @@ -69,14 +69,20 @@ impl fmt::Display for TransactionRequest { f, "{} ETH from {} to 0x{:?}", Colour::White.bold().paint(format_ether(eth)), - Colour::White.bold().paint(format!("0x{:?}", self.from)), + Colour::White.bold().paint( + self.from.as_ref() + .map(|f| format!("0x{:?}", f)) + .unwrap_or_else(|| "?".to_string())), to ), None => write!( f, "{} ETH from {} for contract creation", Colour::White.bold().paint(format_ether(eth)), - Colour::White.bold().paint(format!("0x{:?}", self.from)), + Colour::White.bold().paint( + self.from.as_ref() + .map(|f| format!("0x{:?}", f)) + .unwrap_or_else(|| "?".to_string())), ), } } -- GitLab From 6ecc63002b5357ed16955b4f28f714cec62a9023 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Tue, 5 Jun 2018 17:28:35 +0800 Subject: [PATCH 007/191] Have space between feature cfg flag (#8791) --- dapps/js-glue/src/js.rs | 4 ++-- ethcore/evm/src/lib.rs | 2 +- ethcore/src/client/mod.rs | 8 ++++---- ethcore/src/lib.rs | 6 +++--- ethcore/src/spec/spec.rs | 26 +++++++++++++------------- parity/lib.rs | 2 +- parity/secretstore.rs | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dapps/js-glue/src/js.rs b/dapps/js-glue/src/js.rs index f89fcefc76..906b238ec7 100644 --- a/dapps/js-glue/src/js.rs +++ b/dapps/js-glue/src/js.rs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -#![cfg_attr(feature="use-precompiled-js", allow(dead_code))] -#![cfg_attr(feature="use-precompiled-js", allow(unused_imports))] +#![cfg_attr(feature = "use-precompiled-js", allow(dead_code))] +#![cfg_attr(feature = "use-precompiled-js", allow(unused_imports))] use std::fmt; use std::process::Command; diff --git a/ethcore/evm/src/lib.rs b/ethcore/evm/src/lib.rs index 1b5610cef5..6eca25f42f 100644 --- a/ethcore/evm/src/lib.rs +++ b/ethcore/evm/src/lib.rs @@ -43,7 +43,7 @@ mod instructions; #[cfg(test)] mod tests; -#[cfg(all(feature="benches", test))] +#[cfg(all(feature = "benches", test))] mod benches; pub use vm::{ diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 3691768dcf..8c5abf3f5d 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -20,20 +20,20 @@ mod ancient_import; mod client; mod config; mod error; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] mod evm_test_client; mod io_message; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] mod test_client; mod trace; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult}; pub use self::io_message::ClientIoMessage; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index e89b0dfff9..51e75d4b40 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -15,7 +15,7 @@ // along with Parity. If not, see . #![warn(missing_docs)] -#![cfg_attr(feature="benches", feature(test))] +#![cfg_attr(feature = "benches", feature(test))] //! Ethcore library //! @@ -173,9 +173,9 @@ mod tx_filter; #[cfg(test)] mod tests; #[cfg(test)] -#[cfg(feature="json-tests")] +#[cfg(feature = "json-tests")] mod json_tests; -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] pub mod test_helpers; #[cfg(test)] mod test_helpers_internal; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 784aa2a4e5..6f785fe7fb 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -515,7 +515,7 @@ macro_rules! load_bundled { }; } -#[cfg(any(test, feature="test-helpers"))] +#[cfg(any(test, feature = "test-helpers"))] macro_rules! load_machine_bundled { ($e:expr) => { Spec::load_machine( @@ -847,28 +847,28 @@ impl Spec { /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a /// NullEngine consensus. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test() -> Spec { load_bundled!("null_morden") } /// Create the EthereumMachine corresponding to Spec::new_test. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_machine() -> EthereumMachine { load_machine_bundled!("null_morden") } /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") } /// Create a new Spec which is a NullEngine consensus with a premine of address whose /// secret is keccak(''). - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_null() -> Spec { load_bundled!("null") } /// Create a new Spec which constructs a contract at address 5 with storage at 0 equal to 1. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_constructor() -> Spec { load_bundled!("constructor") } @@ -876,7 +876,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work). /// Accounts with secrets keccak("0") and keccak("1") are the validators. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_round() -> Self { load_bundled!("authority_round") } @@ -884,7 +884,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work) with empty step messages enabled. /// Accounts with secrets keccak("0") and keccak("1") are the validators. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_round_empty_steps() -> Self { load_bundled!("authority_round_empty_steps") } @@ -892,7 +892,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus (with empty steps) using a block reward /// contract. The contract source code can be found at: /// https://github.com/parity-contracts/block-reward/blob/daf7d44383b6cdb11cb6b953b018648e2b027cfb/contracts/ExampleBlockReward.sol - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_round_block_reward_contract() -> Self { load_bundled!("authority_round_block_reward_contract") } @@ -900,7 +900,7 @@ impl Spec { /// Create a new Spec with Tendermint consensus which does internal sealing (not requiring /// work). /// Account keccak("0") and keccak("1") are a authorities. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_test_tendermint() -> Self { load_bundled!("tendermint") } @@ -913,7 +913,7 @@ impl Spec { /// "0xbfc708a000000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1" and added /// back in using /// "0x4d238c8e00000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1". - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_validator_safe_contract() -> Self { load_bundled!("validator_safe_contract") } @@ -921,7 +921,7 @@ impl Spec { /// The same as the `safeContract`, but allows reporting and uses AuthorityRound. /// Account is marked with `reportBenign` it can be checked as disliked with "0xd8f2e0bf". /// Validator can be removed with `reportMalicious`. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_validator_contract() -> Self { load_bundled!("validator_contract") } @@ -930,7 +930,7 @@ impl Spec { /// height. /// Account with secrets keccak("0") is the validator for block 1 and with keccak("1") /// onwards. - #[cfg(any(test, feature="test-helpers"))] + #[cfg(any(test, feature = "test-helpers"))] pub fn new_validator_multi() -> Self { load_bundled!("validator_multi") } diff --git a/parity/lib.rs b/parity/lib.rs index 6ef332da65..c768722552 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -76,7 +76,7 @@ extern crate registrar; #[macro_use] extern crate log as rlog; -#[cfg(feature="secretstore")] +#[cfg(feature = "secretstore")] extern crate ethcore_secretstore; #[cfg(feature = "dapps")] diff --git a/parity/secretstore.rs b/parity/secretstore.rs index 3b4a4e468c..0723a1d078 100644 --- a/parity/secretstore.rs +++ b/parity/secretstore.rs @@ -111,7 +111,7 @@ mod server { } } -#[cfg(feature="secretstore")] +#[cfg(feature = "secretstore")] mod server { use std::sync::Arc; use ethcore_secretstore; -- GitLab From 5d6a0d4dae8b804ea9af07f6ade0320448c4d2e6 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Tue, 5 Jun 2018 20:40:50 +0800 Subject: [PATCH 008/191] Fix evmbin compilation (#8795) * Fix evmbin compilation * Move features declaration to dependencies --- evmbin/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/Cargo.toml b/evmbin/Cargo.toml index c3ef5847d4..51865091a9 100644 --- a/evmbin/Cargo.toml +++ b/evmbin/Cargo.toml @@ -10,7 +10,7 @@ path = "./src/main.rs" [dependencies] docopt = "0.8" -ethcore = { path = "../ethcore" } +ethcore = { path = "../ethcore", features = ["test-helpers"] } ethjson = { path = "../json" } ethcore-bytes = { path = "../util/bytes" } ethcore-transaction = { path = "../ethcore/transaction" } -- GitLab From 123b6ae62ef266131f24da9b184e68b16955fb06 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Wed, 6 Jun 2018 01:49:11 +0800 Subject: [PATCH 009/191] Disallow unsigned transactions in case EIP-86 is disabled (#8802) * Disallow unsigned transactions in case EIP-86 is disabled * Add tests for verification * Add disallow unsigned transactions test in machine --- ethcore/src/ethereum/mod.rs | 3 +++ ethcore/src/machine.rs | 19 +++++++++++++++++++ ethcore/src/verification/verification.rs | 19 +++++++++++++++++++ ethcore/transaction/src/transaction.rs | 4 ++++ 4 files changed, 45 insertions(+) diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs index 6456440759..db07cbbd49 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -101,6 +101,9 @@ pub fn new_morden<'a, T: Into>>(params: T) -> Spec { /// Create a new Foundation Frontier-era chain spec as though it never changes to Homestead. pub fn new_frontier_test() -> Spec { load(None, include_bytes!("../../res/ethereum/frontier_test.json")) } +/// Create a new Ropsten chain spec. +pub fn new_ropsten_test() -> Spec { load(None, include_bytes!("../../res/ethereum/ropsten.json")) } + /// Create a new Foundation Homestead-era chain spec as though it never changed from Frontier. pub fn new_homestead_test() -> Spec { load(None, include_bytes!("../../res/ethereum/homestead_test.json")) } diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index d54dd2e292..dbf66aa121 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -485,6 +485,25 @@ mod tests { } } + #[test] + fn should_disallow_unsigned_transactions() { + let rlp = "ea80843b9aca0083015f90948921ebb5f79e9e3920abe571004d0b1d5119c154865af3107a400080038080".into(); + let transaction: UnverifiedTransaction = ::rlp::decode(&::rustc_hex::FromHex::from_hex(rlp).unwrap()).unwrap(); + let spec = ::ethereum::new_ropsten_test(); + let ethparams = get_default_ethash_extensions(); + + let machine = EthereumMachine::with_ethash_extensions( + spec.params().clone(), + Default::default(), + ethparams, + ); + let mut header = ::header::Header::new(); + header.set_number(15); + + let res = machine.verify_transaction_basic(&transaction, &header); + assert_eq!(res, Err(transaction::Error::InvalidSignature("Crypto error (Invalid EC signature)".into()))); + } + #[test] fn ethash_gas_limit_is_multiple_of_determinant() { use ethereum_types::U256; diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 3b9104f0e1..1275b5c5c3 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -576,7 +576,17 @@ mod tests { nonce: U256::from(2) }.sign(keypair.secret(), None); + let tr3 = Transaction { + action: Action::Call(0x0.into()), + value: U256::from(0), + data: Bytes::new(), + gas: U256::from(30_000), + gas_price: U256::from(0), + nonce: U256::zero(), + }.null_sign(0); + let good_transactions = [ tr1.clone(), tr2.clone() ]; + let eip86_transactions = [ tr3.clone() ]; let diff_inc = U256::from(0x40); @@ -612,6 +622,7 @@ mod tests { uncles_rlp.append_list(&good_uncles); let good_uncles_hash = keccak(uncles_rlp.as_raw()); let good_transactions_root = ordered_trie_root(good_transactions.iter().map(|t| ::rlp::encode::(t))); + let eip86_transactions_root = ordered_trie_root(eip86_transactions.iter().map(|t| ::rlp::encode::(t))); let mut parent = good.clone(); parent.set_number(9); @@ -632,6 +643,14 @@ mod tests { check_ok(basic_test(&create_test_block(&good), engine)); + let mut bad_header = good.clone(); + bad_header.set_transactions_root(eip86_transactions_root.clone()); + bad_header.set_uncles_hash(good_uncles_hash.clone()); + match basic_test(&create_test_block_with_data(&bad_header, &eip86_transactions, &good_uncles), engine) { + Err(Error(ErrorKind::Transaction(ref e), _)) if e == &::ethkey::Error::InvalidSignature.into() => (), + e => panic!("Block verification failed.\nExpected: Transaction Error (Invalid Signature)\nGot: {:?}", e), + } + let mut header = good.clone(); header.set_transactions_root(good_transactions_root.clone()); header.set_uncles_hash(good_uncles_hash.clone()); diff --git a/ethcore/transaction/src/transaction.rs b/ethcore/transaction/src/transaction.rs index dd1e8ca2cc..27b8b346cf 100644 --- a/ethcore/transaction/src/transaction.rs +++ b/ethcore/transaction/src/transaction.rs @@ -409,6 +409,10 @@ impl UnverifiedTransaction { if check_low_s && !(allow_empty_signature && self.is_unsigned()) { self.check_low_s()?; } + // Disallow unsigned transactions in case EIP-86 is disabled. + if !allow_empty_signature && self.is_unsigned() { + return Err(ethkey::Error::InvalidSignature.into()); + } // EIP-86: Transactions of this form MUST have gasprice = 0, nonce = 0, value = 0, and do NOT increment the nonce of account 0. if allow_empty_signature && self.is_unsigned() && !(self.gas_price.is_zero() && self.value.is_zero() && self.nonce.is_zero()) { return Err(ethkey::Error::InvalidSignature.into()) -- GitLab From 6771539a90ccd5900e72728517fa1e904a6e2664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 5 Jun 2018 19:49:46 +0200 Subject: [PATCH 010/191] Fix ancient blocks queue deadlock (#8751) * Revert "Fix not downloading old blocks (#8642)" This reverts commit d1934363e7c2c953f17cd451bea8476f46f52b82. * Make sure only one thread actually imports old blocks. * Add some trace timers. * Bring back pending hashes set. * Separate locks so that queue can happen while we are importing. * Address grumbles. --- ethcore/src/client/client.rs | 115 +++++++++++++++++++++-------------- miner/src/pool/queue.rs | 2 +- 2 files changed, 71 insertions(+), 46 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 9e2cfeff40..f3a3dda103 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -17,7 +17,7 @@ use std::collections::{HashSet, BTreeMap, BTreeSet, VecDeque}; use std::fmt; use std::str::FromStr; -use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering}; +use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering as AtomicOrdering}; use std::sync::{Arc, Weak}; use std::time::{Instant, Duration}; @@ -90,6 +90,8 @@ use_contract!(registry, "Registry", "res/contracts/registrar.json"); const MAX_TX_QUEUE_SIZE: usize = 4096; const MAX_ANCIENT_BLOCKS_QUEUE_SIZE: usize = 4096; +// Max number of blocks imported at once. +const MAX_ANCIENT_BLOCKS_TO_IMPORT: usize = 4; const MAX_QUEUE_SIZE_TO_SLEEP_ON: usize = 2; const MIN_HISTORY_SIZE: u64 = 8; @@ -210,8 +212,12 @@ pub struct Client { queue_transactions: IoChannelQueue, /// Ancient blocks import queue queue_ancient_blocks: IoChannelQueue, - /// Hashes of pending ancient block wainting to be included - pending_ancient_blocks: RwLock>, + /// Queued ancient blocks, make sure they are imported in order. + queued_ancient_blocks: Arc, + VecDeque<(Header, Bytes, Bytes)> + )>>, + ancient_blocks_import_lock: Arc>, /// Consensus messages import queue queue_consensus_message: IoChannelQueue, @@ -434,7 +440,6 @@ impl Importer { let hash = header.hash(); let _import_lock = self.import_lock.lock(); - trace!(target: "client", "Trying to import old block #{}", header.number()); { trace_time!("import_old_block"); // verify the block, passing the chain for updating the epoch verifier. @@ -763,7 +768,8 @@ impl Client { notify: RwLock::new(Vec::new()), queue_transactions: IoChannelQueue::new(MAX_TX_QUEUE_SIZE), queue_ancient_blocks: IoChannelQueue::new(MAX_ANCIENT_BLOCKS_QUEUE_SIZE), - pending_ancient_blocks: RwLock::new(HashSet::new()), + queued_ancient_blocks: Default::default(), + ancient_blocks_import_lock: Default::default(), queue_consensus_message: IoChannelQueue::new(usize::max_value()), last_hashes: RwLock::new(VecDeque::new()), factories: factories, @@ -2008,8 +2014,9 @@ impl BlockChainClient for Client { impl IoClient for Client { fn queue_transactions(&self, transactions: Vec, peer_id: usize) { + trace_time!("queue_transactions"); let len = transactions.len(); - self.queue_transactions.queue(&mut self.io_channel.lock(), move |client| { + self.queue_transactions.queue(&mut self.io_channel.lock(), len, move |client| { trace_time!("import_queued_transactions"); let txs: Vec = transactions @@ -2028,6 +2035,7 @@ impl IoClient for Client { } fn queue_ancient_block(&self, block_bytes: Bytes, receipts_bytes: Bytes) -> Result { + trace_time!("queue_ancient_block"); let header: Header = ::rlp::Rlp::new(&block_bytes).val_at(0)?; let hash = header.hash(); @@ -2036,31 +2044,51 @@ impl IoClient for Client { if self.chain.read().is_known(&hash) { bail!(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain)); } - - let parent_hash = *header.parent_hash(); - let parent_pending = self.pending_ancient_blocks.read().contains(&parent_hash); - let status = self.block_status(BlockId::Hash(parent_hash)); - if !parent_pending && (status == BlockStatus::Unknown || status == BlockStatus::Pending) { - bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(parent_hash))); + let parent_hash = header.parent_hash(); + // NOTE To prevent race condition with import, make sure to check queued blocks first + // (and attempt to acquire lock) + let is_parent_pending = self.queued_ancient_blocks.read().0.contains(parent_hash); + if !is_parent_pending { + let status = self.block_status(BlockId::Hash(*parent_hash)); + if status == BlockStatus::Unknown || status == BlockStatus::Pending { + bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(*parent_hash))); + } } } - self.pending_ancient_blocks.write().insert(hash); - - trace!(target: "client", "Queuing old block #{}", header.number()); - match self.queue_ancient_blocks.queue(&mut self.io_channel.lock(), move |client| { - let result = client.importer.import_old_block( - &header, - &block_bytes, - &receipts_bytes, - &**client.db.read(), - &*client.chain.read() - ); - - client.pending_ancient_blocks.write().remove(&hash); - result.map(|_| ()).unwrap_or_else(|e| { - error!(target: "client", "Error importing ancient block: {}", e); - }); + // we queue blocks here and trigger an IO message. + { + let mut queued = self.queued_ancient_blocks.write(); + queued.0.insert(hash); + queued.1.push_back((header, block_bytes, receipts_bytes)); + } + + let queued = self.queued_ancient_blocks.clone(); + let lock = self.ancient_blocks_import_lock.clone(); + match self.queue_ancient_blocks.queue(&mut self.io_channel.lock(), 1, move |client| { + trace_time!("import_ancient_block"); + // Make sure to hold the lock here to prevent importing out of order. + // We use separate lock, cause we don't want to block queueing. + let _lock = lock.lock(); + for _i in 0..MAX_ANCIENT_BLOCKS_TO_IMPORT { + let first = queued.write().1.pop_front(); + if let Some((header, block_bytes, receipts_bytes)) = first { + let hash = header.hash(); + client.importer.import_old_block( + &header, + &block_bytes, + &receipts_bytes, + &**client.db.read(), + &*client.chain.read() + ).ok().map_or((), |e| { + error!(target: "client", "Error importing ancient block: {}", e); + }); + // remove from pending + queued.write().0.remove(&hash); + } else { + break; + } + } }) { Ok(_) => Ok(hash), Err(e) => bail!(BlockImportErrorKind::Other(format!("{}", e))), @@ -2068,7 +2096,7 @@ impl IoClient for Client { } fn queue_consensus_message(&self, message: Bytes) { - match self.queue_consensus_message.queue(&mut self.io_channel.lock(), move |client| { + match self.queue_consensus_message.queue(&mut self.io_channel.lock(), 1, move |client| { if let Err(e) = client.engine().handle_message(&message) { debug!(target: "poa", "Invalid message received: {}", e); } @@ -2480,38 +2508,35 @@ impl fmt::Display for QueueError { /// Queue some items to be processed by IO client. struct IoChannelQueue { - queue: Arc>>>, + currently_queued: Arc, limit: usize, } impl IoChannelQueue { pub fn new(limit: usize) -> Self { IoChannelQueue { - queue: Default::default(), + currently_queued: Default::default(), limit, } } - pub fn queue(&self, channel: &mut IoChannel, fun: F) -> Result<(), QueueError> - where F: Fn(&Client) + Send + Sync + 'static + pub fn queue(&self, channel: &mut IoChannel, count: usize, fun: F) -> Result<(), QueueError> where + F: Fn(&Client) + Send + Sync + 'static, { - { - let mut queue = self.queue.lock(); - let queue_size = queue.len(); - ensure!(queue_size < self.limit, QueueError::Full(self.limit)); + let queue_size = self.currently_queued.load(AtomicOrdering::Relaxed); + ensure!(queue_size < self.limit, QueueError::Full(self.limit)); - queue.push_back(Box::new(fun)); - } - - let queue = self.queue.clone(); + let currently_queued = self.currently_queued.clone(); let result = channel.send(ClientIoMessage::execute(move |client| { - while let Some(fun) = queue.lock().pop_front() { - fun(client); - } + currently_queued.fetch_sub(count, AtomicOrdering::SeqCst); + fun(client); })); match result { - Ok(_) => Ok(()), + Ok(_) => { + self.currently_queued.fetch_add(count, AtomicOrdering::SeqCst); + Ok(()) + }, Err(e) => Err(QueueError::Channel(e)), } } diff --git a/miner/src/pool/queue.rs b/miner/src/pool/queue.rs index bd5a98edc7..4ebdf9e3f1 100644 --- a/miner/src/pool/queue.rs +++ b/miner/src/pool/queue.rs @@ -174,7 +174,7 @@ impl TransactionQueue { transactions: Vec, ) -> Vec> { // Run verification - let _timer = ::trace_time::PerfTimer::new("queue::verifyAndImport"); + let _timer = ::trace_time::PerfTimer::new("pool::verify_and_import"); let options = self.options.read().clone(); let verifier = verifier::Verifier::new(client, options, self.insertion_id.clone()); -- GitLab From bd4498cffcf34cf8ef3b002dd6d268d9cae307a5 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Wed, 6 Jun 2018 10:01:15 +0200 Subject: [PATCH 011/191] docs: add changelogs for 1.10.6 and 1.11.3 (#8810) * docs: add changelog for 1.10.6 * docs: add changelog for 1.11.3 * docs: markdownify the changelogs --- CHANGELOG.md | 138 ++++++++++++++++++++++++++++++----------- docs/CHANGELOG-1.10.md | 104 +++++++++++++++++++++---------- 2 files changed, 174 insertions(+), 68 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee66149ed0..25e2a28a57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,71 @@ +## Parity [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3) (2018-06-06) + +Parity 1.11.3 is a security-relevant release. Please upgrade your nodes as soon as possible to [v1.10.6](https://github.com/paritytech/parity/releases/tag/v1.10.6) or [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3). + +The full list of included changes: + +- Parity-version: bump beta to 1.11.3 ([#8806](https://github.com/paritytech/parity/pull/8806)) + - Parity-version: bump beta to 1.11.3 + - Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802)) + - Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751)) +- Update shell32-sys to fix windows build ([#8792](https://github.com/paritytech/parity/pull/8792)) +- Backports ([#8785](https://github.com/paritytech/parity/pull/8785)) + - Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) + - Fix #8468 + - Use U256::max_value() instead + - Also change initial transaction gas + - Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544)) + - Start dividing sync chain : first supplier method + - WIP - updated chain sync supplier + - Finish refactoring the Chain Sync Supplier + - Create Chain Sync Requester + - Add Propagator for Chain Sync + - Add the Chain Sync Handler + - Move tests from mod -> handler + - Move tests to propagator + - Refactor SyncRequester arguments + - Refactoring peer fork header handler + - Fix wrong highest block number in snapshot sync + - Small refactor... + - Resume warp-sync downloaded chunks + - Refactoring the previous chunks import + - Address PR grumbles + - Fix not seeding current snapshot + - Update SnapshotService readiness check + - Early abort importing previous chunks + - Update Gitlab CI config + - SyncState back to Waiting when Manifest peers disconnect + - Revert GitLab CI changes + - Refactor resuming snapshots + - Revert "Refactor resuming snapshots" + - Update informant log + - Refactor resuming snapshots + - Update informant message : show chunks done + - Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641)) + - Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity/pull/8642)) + - Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity/pull/8656)) + - Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity/pull/8658)) + - Shutdown the Snapshot Service when shutting down the runner + - Rename `service` to `client_service` + - Fix tests + - Fix cli signer ([#8682](https://github.com/paritytech/parity/pull/8682)) + - Update ethereum-types so `{:#x}` applies 0x prefix + - Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683)) + - Set the request index to that of the current request + - Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686)) + - Fix local transactions policy. ([#8691](https://github.com/paritytech/parity/pull/8691)) + - CI: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity/pull/8745)) + - Ci: Remove check for shared libraries in gitlab script + - Ci: allow android arm build to fail + - Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity/pull/8744)) + - Custom Error Messages on ENFILE and EMFILE IO Errors + - Use assert-matches for more readable tests + - Fix Wording and consistency + - Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity/pull/8710)) +- Parity-version: bump beta to 1.11.2 ([#8750](https://github.com/paritytech/parity/pull/8750)) + - Parity-version: bump beta to 1.11.2 + - Parity-version: unset critical flag + ## Parity [v1.11.1](https://github.com/paritytech/parity/releases/tag/v1.11.1) (2018-05-15) This is the Parity 1.11.1-beta release! Hurray! @@ -156,47 +224,47 @@ The full list of included changes: - Backports ([#8558](https://github.com/paritytech/parity/pull/8558)) - Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463)) - - Fetch logs by hash in blockchain database - - Fix tests - - Add unit test for branch block logs fetching - - Add docs that blocks must already be sorted - - Handle branch block cases properly - - typo: empty -> is_empty - - Remove return_empty_if_none by using a closure - - Use BTreeSet to avoid sorting again - - Move is_canon to BlockChain - - typo: pass value by reference - - Use loop and wrap inside blocks to simplify the code - - typo: missed a comment + - Fetch logs by hash in blockchain database + - Fix tests + - Add unit test for branch block logs fetching + - Add docs that blocks must already be sorted + - Handle branch block cases properly + - typo: empty -> is_empty + - Remove return_empty_if_none by using a closure + - Use BTreeSet to avoid sorting again + - Move is_canon to BlockChain + - typo: pass value by reference + - Use loop and wrap inside blocks to simplify the code + - typo: missed a comment - Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491)) - - Pass on storage keys even if it is not modified - - typo: account and storage query - - Fix tests - - Use state query directly because of suicided accounts - - Fix a RefCell borrow issue - - Add tests for unmodified storage trace - - Address grumbles - - typo: remove unwanted empty line - - ensure_cached compiles with the original signature + - Pass on storage keys even if it is not modified + - typo: account and storage query + - Fix tests + - Use state query directly because of suicided accounts + - Fix a RefCell borrow issue + - Add tests for unmodified storage trace + - Address grumbles + - typo: remove unwanted empty line + - ensure_cached compiles with the original signature - Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493)) - - Update wasmi to 0.2 - - Update pwasm-utils to 0.1.5 + - Update wasmi to 0.2 + - Update pwasm-utils to 0.1.5 - Show imported messages for light client ([#8517](https://github.com/paritytech/parity/pull/8517)) - Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520)) - - Enable WebAssembly and Byzantium for Ellaism - - Fix indentation - - Remove empty lines + - Enable WebAssembly and Byzantium for Ellaism + - Fix indentation + - Remove empty lines - Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity/pull/8522)) - - Don't panic in import_block if invalid rlp - - Remove redundant type annotation - - Replace RLP header view usage with safe decoding + - Don't panic in import_block if invalid rlp + - Remove redundant type annotation + - Replace RLP header view usage with safe decoding - Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541)) - - network-devp2p: sort nodes in node table using last contact data - - network-devp2p: rename node contact types in node table json output - - network-devp2p: fix node table tests - - network-devp2p: note node failure when failed to establish connection - - network-devp2p: handle UselessPeer error - - network-devp2p: note failure when marking node as useless + - network-devp2p: sort nodes in node table using last contact data + - network-devp2p: rename node contact types in node table json output + - network-devp2p: fix node table tests + - network-devp2p: note node failure when failed to establish connection + - network-devp2p: handle UselessPeer error + - network-devp2p: note failure when marking node as useless - Betalize 1.11 :) ([#8475](https://github.com/paritytech/parity/pull/8475)) - Betalize 1.11 :) - Update Gitlab scripts diff --git a/docs/CHANGELOG-1.10.md b/docs/CHANGELOG-1.10.md index a8c7ad20a7..1c15e456ea 100644 --- a/docs/CHANGELOG-1.10.md +++ b/docs/CHANGELOG-1.10.md @@ -1,3 +1,41 @@ +## Parity [v1.10.6](https://github.com/paritytech/parity/releases/tag/v1.10.6) (2018-06-05) + +Parity 1.10.6 is a security-relevant release. Please upgrade your nodes as soon as possible. + +If you can not upgrade to 1.10+ yet, please use the following branches and build your own binaries from source: + +- git checkout [old-stable-1.9](https://github.com/paritytech/parity/tree/old-stable-1.9) # `v1.9.8` (EOL) +- git checkout [old-stable-1.8](https://github.com/paritytech/parity/tree/old-stable-1.8) # `v1.8.12` (EOL) +- git checkout [old-stable-1.7](https://github.com/paritytech/parity/tree/old-stable-1.7) # `v1.7.14` (EOL) + +The full list of included changes: + +- Parity-version: bump stable to 1.10.6 ([#8805](https://github.com/paritytech/parity/pull/8805)) + - Parity-version: bump stable to 1.10.6 + - Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802)) +- Update shell32-sys to fix windows build ([#8793](https://github.com/paritytech/parity/pull/8793)) +- Backports ([#8782](https://github.com/paritytech/parity/pull/8782)) + - Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) + - Fix #8468 + - Use U256::max_value() instead + - Fix again + - Also change initial transaction gas + - Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641)) + - Prefix uint fmt with `0x` with alternate flag + - Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683)) + - Set the request index to that of the current request + - Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541)) + - Network-devp2p: sort nodes in node table using last contact data + - Network-devp2p: rename node contact types in node table json output + - Network-devp2p: fix node table tests + - Network-devp2p: note node failure when failed to establish connection + - Network-devp2p: handle UselessPeer error + - Network-devp2p: note failure when marking node as useless + - Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686)) +- Parity: bump stable version to 1.10.5 ([#8749](https://github.com/paritytech/parity/pull/8749)) + - Parity: bump stable version to 1.10.5 + - Fix failing doc tests running on non-code + ## Parity [v1.10.4](https://github.com/paritytech/parity/releases/tag/v1.10.4) (2018-05-15) Parity 1.10.4 is a bug-fix release to improve performance and stability. @@ -187,61 +225,61 @@ The full list of included changes: - Beta Backports ([#8136](https://github.com/paritytech/parity/pull/8136)) - Support parity protocol. ([#8035](https://github.com/paritytech/parity/pull/8035)) - updater: apply exponential backoff after download failure ([#8059](https://github.com/paritytech/parity/pull/8059)) - - updater: apply exponential backoff after download failure - - updater: reset backoff on new release + - updater: apply exponential backoff after download failure + - updater: reset backoff on new release - Max code size on Kovan ([#8067](https://github.com/paritytech/parity/pull/8067)) - - Enable code size limit on kovan - - Fix formatting. + - Enable code size limit on kovan + - Fix formatting. - Limit incoming connections. ([#8060](https://github.com/paritytech/parity/pull/8060)) - - Limit ingress connections - - Optimized handshakes logging + - Limit ingress connections + - Optimized handshakes logging - WASM libraries bump ([#7970](https://github.com/paritytech/parity/pull/7970)) - - update wasmi, parity-wasm, wasm-utils to latest version - - Update to new wasmi & error handling - - also utilize new stack limiter - - fix typo - - replace dependency url - - Cargo.lock update + - update wasmi, parity-wasm, wasm-utils to latest version + - Update to new wasmi & error handling + - also utilize new stack limiter + - fix typo + - replace dependency url + - Cargo.lock update - add some dos protection ([#8084](https://github.com/paritytech/parity/pull/8084)) - revert removing blooms ([#8066](https://github.com/paritytech/parity/pull/8066)) - Revert "fix traces, removed bloomchain crate, closes [#7228](https://github.com/paritytech/parity/issues/7228), closes [#7167](https://github.com/paritytech/parity/issues/7167)" - Revert "fixed broken logs ([#7934](https://github.com/paritytech/parity/pull/7934))" - - fixed broken logs - - bring back old lock order - - remove migration v13 - - revert CURRENT_VERSION to 12 in migration.rs + - fixed broken logs + - bring back old lock order + - remove migration v13 + - revert CURRENT_VERSION to 12 in migration.rs - more dos protection ([#8104](https://github.com/paritytech/parity/pull/8104)) - Const time comparison ([#8113](https://github.com/paritytech/parity/pull/8113)) - - Use `subtle::slices_equal` for constant time comparison. - - Also update the existing version of subtle in `ethcrypto` from 0.1 to 0.5 - - Test specifically for InvalidPassword error. + - Use `subtle::slices_equal` for constant time comparison. + - Also update the existing version of subtle in `ethcrypto` from 0.1 to 0.5 + - Test specifically for InvalidPassword error. - fix trace filter returning returning unrelated reward calls, closes #8070 ([#8098](https://github.com/paritytech/parity/pull/8098)) - network: init discovery using healthy nodes ([#8061](https://github.com/paritytech/parity/pull/8061)) - - network: init discovery using healthy nodes - - network: fix style grumble - - network: fix typo + - network: init discovery using healthy nodes + - network: fix style grumble + - network: fix typo - Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137)) - - ethcore: postpone Kovan hard fork - - util: update version fork metadata + - ethcore: postpone Kovan hard fork + - util: update version fork metadata - Disable UI by default. ([#8105](https://github.com/paritytech/parity/pull/8105)) - dapps: update parity-ui dependencies ([#8160](https://github.com/paritytech/parity/pull/8160)) - Probe changes one step deeper ([#8134](https://github.com/paritytech/parity/pull/8134)) ([#8135](https://github.com/paritytech/parity/pull/8135)) - Beta backports ([#8053](https://github.com/paritytech/parity/pull/8053)) - CI: Fix cargo cache ([#7968](https://github.com/paritytech/parity/pull/7968)) - - Fix cache - - Only clean locked cargo cache on windows + - Fix cache + - Only clean locked cargo cache on windows - fixed ethstore sign ([#8026](https://github.com/paritytech/parity/pull/8026)) - fixed parsing ethash seals and verify_block_undordered ([#8031](https://github.com/paritytech/parity/pull/8031)) - fix for verify_block_basic crashing on invalid transaction rlp ([#8032](https://github.com/paritytech/parity/pull/8032)) - fix cache & snapcraft CI build ([#8052](https://github.com/paritytech/parity/pull/8052)) - Add MCIP-6 Byzyantium transition to Musicoin spec ([#7841](https://github.com/paritytech/parity/pull/7841)) - - Add test chain spec for musicoin byzantium testnet - - Add MCIP-6 Byzyantium transition to Musicoin spec - - Update mcip6_byz.json - - ethcore: update musicoin byzantium block number - - ethcore: update musicoin bootnodes - - Update musicoin.json - - More bootnodes. + - Add test chain spec for musicoin byzantium testnet + - Add MCIP-6 Byzyantium transition to Musicoin spec + - Update mcip6_byz.json + - ethcore: update musicoin byzantium block number + - ethcore: update musicoin bootnodes + - Update musicoin.json + - More bootnodes. - Make 1.10 beta ([#8022](https://github.com/paritytech/parity/pull/8022)) - Make 1.10 beta - Fix gitlab builds -- GitLab From 114d4433a93e30c92aa76452dc158e64596dd0e0 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 6 Jun 2018 09:02:25 +0100 Subject: [PATCH 012/191] Remove windows tray and installer (#8778) * Remove windows tray and installer * Remove make_exe (installer) target * Change windows $ARC to amd64 for consistency * Fix windows build - revert to winapi 0.2.8 * Remove publishing of windows installer bins --- .gitlab-ci.yml | 2 +- Cargo.lock | 8 +- nsis/installer.nsi | 191 ------------------- nsis/logo.ico | Bin 102596 -> 0 bytes scripts/gitlab-build.sh | 18 -- windows/ptray/ptray.cpp | 360 ------------------------------------ windows/ptray/ptray.ico | Bin 102596 -> 0 bytes windows/ptray/ptray.rc | Bin 4364 -> 0 bytes windows/ptray/ptray.vcxproj | 155 ---------------- windows/ptray/resource.h | Bin 1788 -> 0 bytes windows/ptray/targetver.h | 8 - 11 files changed, 5 insertions(+), 737 deletions(-) delete mode 100644 nsis/installer.nsi delete mode 100644 nsis/logo.ico delete mode 100644 windows/ptray/ptray.cpp delete mode 100644 windows/ptray/ptray.ico delete mode 100644 windows/ptray/ptray.rc delete mode 100644 windows/ptray/ptray.vcxproj delete mode 100644 windows/ptray/resource.h delete mode 100644 windows/ptray/targetver.h diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c615be99ce..6be6b45838 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -173,7 +173,7 @@ windows: - stable - triggers script: - - sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc installer "" "" windows + - sh scripts/gitlab-build.sh x86_64-pc-windows-msvc x86_64-pc-windows-msvc amd64 "" "" windows tags: - rust-windows artifacts: diff --git a/Cargo.lock b/Cargo.lock index 680b9606ec..a9d9ab7d10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,7 +22,7 @@ version = "1.2.1" source = "git+https://github.com/paritytech/app-dirs-rs#0b37f9481ce29e9d5174ad185bca695b206368eb" dependencies = [ "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2995,10 +2995,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "shell32-sys" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4032,7 +4032,7 @@ dependencies = [ "checksum serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142" "checksum serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9db7266c7d63a4c4b7fe8719656ccdd51acf1bed6124b174f933b009fb10bcb" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" -"checksum shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72f20b8f3c060374edb8046591ba28f62448c369ccbdc7b02075103fb3a9e38d" +"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum siphasher 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "833011ca526bd88f16778d32c699d325a9ad302fa06381cd66f7be63351d3f6d" "checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" "checksum skeptic 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24ebf8a06f5f8bae61ae5bbc7af7aac4ef6907ae975130faba1199e5fe82256a" diff --git a/nsis/installer.nsi b/nsis/installer.nsi deleted file mode 100644 index c1f4033312..0000000000 --- a/nsis/installer.nsi +++ /dev/null @@ -1,191 +0,0 @@ -!include WinMessages.nsh - -!define WND_CLASS "Parity" -!define WND_TITLE "Parity" -!define WAIT_MS 5000 -!define SYNC_TERM 0x00100001 - -!define APPNAME "Parity" -!define COMPANYNAME "Parity Technologies" -!define DESCRIPTION "Fast, light, robust Ethereum implementation" -!define VERSIONMAJOR 1 -!define VERSIONMINOR 12 -!define VERSIONBUILD 0 -!define ARGS "" -!define FIRST_START_ARGS "--mode=passive ui" - -!addplugindir .\ - -!define HELPURL "https://paritytech.github.io/wiki/" # "Support Information" link -!define UPDATEURL "https://github.com/paritytech/parity/releases" # "Product Updates" link -!define ABOUTURL "https://github.com/paritytech/parity" # "Publisher" link -!define INSTALLSIZE 26120 - -!define termMsg "Installer cannot stop running ${WND_TITLE}.$\nDo you want to terminate process?" -!define stopMsg "Stopping ${WND_TITLE} Application" - - -RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on) - -InstallDir "$PROGRAMFILES64\${COMPANYNAME}\${APPNAME}" - -LicenseData "..\LICENSE" -Name "${COMPANYNAME} ${APPNAME}" -Icon "logo.ico" -outFile "installer.exe" - -!include LogicLib.nsh - -page license -page directory -page instfiles - -!macro VerifyUserIsAdmin -UserInfo::GetAccountType -pop $0 -${If} $0 != "admin" ;Require admin rights on NT4+ - messageBox mb_iconstop "Administrator rights required!" - setErrorLevel 740 ;ERROR_ELEVATION_REQUIRED - quit -${EndIf} -!macroend - -!macro TerminateApp - Push $0 ; window handle - Push $1 - Push $2 ; process handle - DetailPrint "$(stopMsg)" - FindWindow $0 '${WND_CLASS}' '' - IntCmp $0 0 done - System::Call 'user32.dll::GetWindowThreadProcessId(i r0, *i .r1) i .r2' - System::Call 'kernel32.dll::OpenProcess(i ${SYNC_TERM}, i 0, i r1) i .r2' - SendMessage $0 ${WM_CLOSE} 0 0 /TIMEOUT=${TO_MS} - System::Call 'kernel32.dll::WaitForSingleObject(i r2, i ${WAIT_MS}) i .r1' - IntCmp $1 0 close - MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION "$(termMsg)" /SD IDYES IDYES terminate IDNO close - System::Call 'kernel32.dll::CloseHandle(i r2) i .r1' - Quit - terminate: - System::Call 'kernel32.dll::TerminateProcess(i r2, i 0) i .r1' - close: - System::Call 'kernel32.dll::CloseHandle(i r2) i .r1' - done: - Pop $2 - Pop $1 - Pop $0 -!macroend - -function .onInit - setShellVarContext all - !insertmacro VerifyUserIsAdmin -functionEnd - -section "install" - # Files for the install directory - to build the installer, these should be in the same directory as the install script (this file) - setOutPath $INSTDIR - - # Close parity if running - !insertmacro TerminateApp - - # Files added here should be removed by the uninstaller (see section "uninstall") - file /oname=parity.exe ..\target\x86_64-pc-windows-msvc\release\parity.exe - file /oname=parity-evm.exe ..\target\x86_64-pc-windows-msvc\release\parity-evm.exe - file /oname=ethstore.exe ..\target\x86_64-pc-windows-msvc\release\ethstore.exe - file /oname=ethkey.exe ..\target\x86_64-pc-windows-msvc\release\ethkey.exe - file /oname=ptray.exe ..\windows\ptray\x64\Release\ptray.exe - - file "logo.ico" - # Add any other files for the install directory (license files, app data, etc) here - - # Uninstaller - See function un.onInit and section "uninstall" for configuration - writeUninstaller "$INSTDIR\uninstall.exe" - - # Start Menu - createDirectory "$SMPROGRAMS\${COMPANYNAME}" - delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" - createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME} Ethereum.lnk" "$INSTDIR\ptray.exe" "ui" "$INSTDIR\logo.ico" - createShortCut "$DESKTOP\${APPNAME} Ethereum.lnk" "$INSTDIR\ptray.exe" "ui" "$INSTDIR\logo.ico" - - # Firewall remove rules if exists - SimpleFC::AdvRemoveRule "Parity incoming peers (TCP:30303)" - SimpleFC::AdvRemoveRule "Parity outgoing peers (TCP:30303)" - SimpleFC::AdvRemoveRule "Parity web queries (TCP:80)" - SimpleFC::AdvRemoveRule "Parity UDP discovery (UDP:30303)" - - # Firewall exception rules - SimpleFC::AdvAddRule "Parity incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\parity.exe" "" "" "Parity" 30303 "" "" "" - SimpleFC::AdvAddRule "Parity outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\parity.exe" "" "" "Parity" "" 30303 "" "" - SimpleFC::AdvAddRule "Parity UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\parity.exe" "" "" "Parity" "" 30303 "" "" - - # Registry information for add/remove programs - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayName" "${APPNAME} - ${DESCRIPTION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "InstallLocation" "$\"$INSTDIR$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayIcon" "$\"$INSTDIR\logo.ico$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "Publisher" "${COMPANYNAME}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "HelpLink" "$\"${HELPURL}$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "URLUpdateInfo" "$\"${UPDATEURL}$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "URLInfoAbout" "$\"${ABOUTURL}$\"" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayVersion" "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMajor" ${VERSIONMAJOR} - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "VersionMinor" ${VERSIONMINOR} - # There is no option for modifying or repairing the install - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoRepair" 1 - # Set the INSTALLSIZE constant (!defined at the top of this script) so Add/Remove Programs can accurately report the size - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "EstimatedSize" ${INSTALLSIZE} - - WriteRegStr HKEY_CURRENT_USER "Software\Microsoft\Windows\CurrentVersion\Run" ${APPNAME} "$INSTDIR\ptray.exe ${ARGS}" - DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "${APPNAME}" - ExecShell "" "$INSTDIR\ptray.exe" "${FIRST_START_ARGS}" -sectionEnd - -# Uninstaller - -function un.onInit - SetShellVarContext all - - #Verify the uninstaller - last chance to back out - MessageBox MB_OKCANCEL "Permanently remove ${APPNAME}?" IDOK next - Abort - - next: - !insertmacro VerifyUserIsAdmin -functionEnd - -section "uninstall" - !insertmacro TerminateApp - # Remove Start Menu launcher - delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" - delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME} Ethereum.lnk" - delete "$DESKTOP\${APPNAME} Ethereum.lnk" - - # Try to remove the Start Menu folder - this will only happen if it is empty - rmDir "$SMPROGRAMS\${COMPANYNAME}" - - # Remove files - delete $INSTDIR\parity.exe - delete $INSTDIR\parity-evm.exe - delete $INSTDIR\ethstore.exe - delete $INSTDIR\ethkey.exe - delete $INSTDIR\ptray.exe - delete $INSTDIR\logo.ico - - # Always delete uninstaller as the last action - delete $INSTDIR\uninstall.exe - - # Try to remove the install directory - this will only happen if it is empty - rmDir $INSTDIR - - # Firewall exception rules - SimpleFC::AdvRemoveRule "Parity incoming peers (TCP:30303)" - SimpleFC::AdvRemoveRule "Parity outgoing peers (TCP:30303)" - SimpleFC::AdvRemoveRule "Parity web queries (TCP:80)" - SimpleFC::AdvRemoveRule "Parity UDP discovery (UDP:30303)" - - # Remove uninstaller information from the registry - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" - DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "${APPNAME}" - DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${APPNAME}" -sectionEnd diff --git a/nsis/logo.ico b/nsis/logo.ico deleted file mode 100644 index cda99eef8b3668827befd6a13ff8268c096ceae4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102596 zcmeFYbz79}*ET#ff~0gSARrQgbV?{gh_rNwfOK~ZDj*>sAdQ5iluGviB1lW8lyrA9 z&vANr{qCpk=L5XktAEJmIdh!rSh=r#EnqM-@E7`n24jMiM5Dndz|Wyi9zP<$qrn3| z62KMY)L}48@FOM+7aRN&K+pLK20jdzd!Xr=x-sn$r?q%mwQIvq#&HMFteJFUI{!-w zRcJDmjb;|M&)uy7Me2Zf#*nzz5#Sd4E5zG;ow!_sK zzRB~e!Kvex%~}H+%-p^7o6QNx5F{Hiug6&Gc3B|sQU8~a6Z3ha+hDB6yx3^6*=w>n z)4`2bRx-mzQDgfG(VY+{Uau$eCBK`*0xy0IKCPZygkJP0_lI%bX@&j%dO&)Lj%gCy zf{K^gv-DJe+LQ7G+zlS17Xf`X^Mz{eml?7#;<2LB^;+psM9q+Q4=X>eC%$LJ>AH=1 zFy>n{7Z6<gNW+kQ|PNkKXvu4|hU z&d2K2MFmnO8^ug!3^-pJt(4x*2+f{4yY5NhS$isQE%CbsWaE(WeDhr72DJ zI7P(w-wlcOFoC<$c-Eh;Pi2I%z_ETnpVEoPa=$&evyE;myOiw@AJ@ec#}R*M!L)<9 zW7jVill>CPBXL7v7kT3-fh3Ky@Rzq^@HB2D>0>jn@soL?Co%xZ3RIkd^m^*k9rw?h zZ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YFhM~RNKE1tV_8vJ?j}=q#wWRPh214Q zoT!rW(}J6cl?aK;IR;*S^oQ7pt=G84juUsJptU))xwTQN8@HH4#Gv?G=9xlGu}|?V z@WLIE(U^5kZ38d+^wxP}q7jTi7F^^aE#jrh(Tx}r8JyUM(5i&AZl?T9UdAOXfxQ~k zxL|I>Vw<2Xm#>)rGgCLw;*20lg`D<@*`3)c#AX74*$`-@WPRM;eV@YJeP@{TR{s1> zT-Kjt)|H267H0Wp?Ar{;lnZZRsH7JHgciPTktKmPjQmy+Lj__CEtRGlx|{HDC|!Ji zJeKMYL}N#cc9Zo<$4R?MTp5;a2E_S;QhwpX57wR%1Xn-Yl!L5=m^QJ}2lYz2MTfUw0(~9H{I|f>sBJmiu9f5G z3h`CBf(H}e9A1nAyMygiSKbYv>C!$#45Jx}^-8R%C^41gz##4Or_MHEz%K7ImFO|} zbW=_d$d9sMn^@J;FG3w?f77mG$F}D1t^RRQV(;C^I&FFoJ)PDY6&!?F3Z<}tJgkwM z1;EEOu}-vQY>nPDKID@QNm(G*8XL7di=CdTDje_P^L(U2P}qeKaL`)dOhEhbJctp@ z0Y%QJUJLp;GJb7QN=j*YX%|VEKu(DUUI@2yS4;TE30^ZKQxcG7yN&-96&o=V#ChV( z0)uV6ynB%m2w)WvPLYo$nV%(lzS@f&{U+ z>Dv`DAlZZ?qnCY*VJ4#wuaC{UVYRjjGS4WVXd+e0_?HCF#@)t7t<(rD4~FRMJ8=R~ zY8>*w**i1U`lRrh;O}fjvbe3ute+F63@(<8xAw-1yLO9?=XZCxqW3Um2D3k8PM4G( zBQ3|R_FtmCs|nUk9JW}srrD8r_ofa%SnR=atxOB9F?{H@ msbuild.cmd echo "@ signtool sign /f "\%"1 /p "\%"2 /tr http://timestamp.comodoca.com /du https://parity.io "\%"3" > sign.cmd } build () { @@ -166,19 +165,6 @@ make_pkg () { sign_exe () { ./sign.cmd $keyfile $certpass "target/$PLATFORM/release/parity.exe" } -make_exe () { - ./msbuild.cmd - ./sign.cmd $keyfile $certpass windows/ptray/x64/release/ptray.exe - cd nsis - curl -sL --url "https://github.com/paritytech/win-build/raw/master/vc_redist.x64.exe" -o vc_redist.x64.exe - echo "makensis.exe installer.nsi" > nsis.cmd - ./nsis.cmd - cd .. - cp nsis/installer.exe "parity_"$VER"_"$IDENT"_"$ARC"."$EXT - ./sign.cmd $keyfile $certpass "parity_"$VER"_"$IDENT"_"$ARC"."$EXT - $MD5_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" - $SHA256_BIN "parity_"$VER"_"$IDENT"_"$ARC"."$EXT -p %h > "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" -} push_binaries () { echo "Push binaries to AWS S3" aws configure set aws_access_key_id $s3_key @@ -205,9 +191,6 @@ push_binaries () { aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN --body target/$PLATFORM/release/whisper$S3WIN aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN.md5 --body whisper$S3WIN.md5 aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/whisper$S3WIN.sha256 --body whisper$S3WIN.sha256 - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".md5" - aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/$BUILD_PLATFORM/"parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" --body "parity_"$VER"_"$IDENT"_"$ARC"."$EXT".sha256" } make_archive () { echo "add artifacts to archive" @@ -356,7 +339,6 @@ case $BUILD_PLATFORM in build sign_exe calculate_checksums - make_exe make_archive push_binaries updater_push_release diff --git a/windows/ptray/ptray.cpp b/windows/ptray/ptray.cpp deleted file mode 100644 index 8701daecb5..0000000000 --- a/windows/ptray/ptray.cpp +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright 2015-2018 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 . - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "resource.h" - -#pragma comment(lib, "shlwapi.lib") - -#define MAX_LOADSTRING 100 -#define IDM_EXIT 100 -#define IDM_OPEN 101 -#define IDM_AUTOSTART 102 -#define WM_USER_SHELLICON WM_USER + 1 - -HANDLE parityHandle = INVALID_HANDLE_VALUE; -DWORD parityProcId = 0; -NOTIFYICONDATA nidApp; -WCHAR szTitle[MAX_LOADSTRING]; -WCHAR szWindowClass[MAX_LOADSTRING]; -LPCWCHAR commandLineFiltered = L""; - -LPCWSTR cParityExe = _T("parity.exe"); - -ATOM MyRegisterClass(HINSTANCE hInstance); -bool InitInstance(HINSTANCE, int, LPWSTR cmdLine); -LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); -void KillParity(); -void OpenUI(); -bool ParityIsRunning(); -bool AutostartEnabled(); -void EnableAutostart(bool enable); - -bool GetParityExePath(TCHAR* dest, size_t destSize) -{ - if (!dest || MAX_PATH > destSize) - return false; - GetModuleFileName(NULL, dest, (DWORD)destSize); - if (!PathRemoveFileSpec(dest)) - return false; - return PathAppend(dest, _T("parity.exe")) == TRUE; -} - -bool GetTrayExePath(TCHAR* dest, size_t destSize) -{ - if (!dest || MAX_PATH > destSize) - return false; - GetModuleFileName(NULL, dest, (DWORD)destSize); - return true; -} - -int APIENTRY wWinMain(_In_ HINSTANCE hInstance, - _In_opt_ HINSTANCE hPrevInstance, - _In_ LPWSTR lpCmdLine, - _In_ int nCmdShow) -{ - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - - CreateMutex(0, FALSE, _T("Local\\ParityTray")); - if (GetLastError() == ERROR_ALREADY_EXISTS) { - // open the UI - OpenUI(); - return 0; - } - - LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); - LoadStringW(hInstance, IDC_PTRAY, szWindowClass, MAX_LOADSTRING); - MyRegisterClass(hInstance); - - if (!InitInstance(hInstance, nCmdShow, lpCmdLine)) - return FALSE; - - HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_PTRAY)); - MSG msg; - // Main message loop: - while (GetMessage(&msg, nullptr, 0, 0)) - { - if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - return (int)msg.wParam; -} - -ATOM MyRegisterClass(HINSTANCE hInstance) -{ - WNDCLASSEXW wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = hInstance; - wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_PTRAY)); - wcex.hCursor = LoadCursor(nullptr, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_PTRAY); - wcex.lpszClassName = szWindowClass; - wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); - - return RegisterClassExW(&wcex); -} - - -bool InitInstance(HINSTANCE hInstance, int nCmdShow, LPWSTR cmdLine) -{ - if (lstrlen(cmdLine) > 0) - { - int commandLineArgs = 0; - LPWSTR* commandLine = CommandLineToArgvW(cmdLine, &commandLineArgs); - LPWSTR filteredArgs = new WCHAR[lstrlen(cmdLine) + 2]; - filteredArgs[0] = '\0'; - for (int i = 0; i < commandLineArgs; i++) - { - // Remove "ui" from command line - if (lstrcmp(commandLine[i], L"ui") != 0) - { - lstrcat(filteredArgs, commandLine[i]); - lstrcat(filteredArgs, L" "); - } - } - commandLineFiltered = filteredArgs; - } - - // Check if already running - PROCESSENTRY32 entry; - entry.dwSize = sizeof(PROCESSENTRY32); - - HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); - if (Process32First(snapshot, &entry) == TRUE) - { - while (Process32Next(snapshot, &entry) == TRUE) - { - if (lstrcmp(entry.szExeFile, cParityExe) == 0) - { - parityHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID); - parityProcId = entry.th32ProcessID; - break; - } - } - } - - CloseHandle(snapshot); - - if (parityHandle == INVALID_HANDLE_VALUE) - { - // Launch parity - TCHAR path[MAX_PATH] = { 0 }; - if (!GetParityExePath(path, MAX_PATH)) - return false; - - PROCESS_INFORMATION procInfo = { 0 }; - STARTUPINFO startupInfo = { sizeof(STARTUPINFO) }; - - LPWSTR cmd = new WCHAR[lstrlen(cmdLine) + lstrlen(path) + 2]; - lstrcpy(cmd, path); - lstrcat(cmd, _T(" ")); - lstrcat(cmd, cmdLine); - if (!CreateProcess(nullptr, cmd, nullptr, nullptr, false, CREATE_NO_WINDOW, nullptr, nullptr, &startupInfo, &procInfo)) - return false; - delete[] cmd; - parityHandle = procInfo.hProcess; - parityProcId = procInfo.dwProcessId; - } - - HWND hWnd = CreateWindowW(szWindowClass, szTitle, 0, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr); - - if (!hWnd) - return false; - - HICON hMainIcon = LoadIcon(hInstance, (LPCTSTR)MAKEINTRESOURCE(IDI_PTRAY)); - - nidApp.cbSize = sizeof(NOTIFYICONDATA); // sizeof the struct in bytes - nidApp.hWnd = (HWND)hWnd; //handle of the window which will process this app. messages - nidApp.uID = IDI_PTRAY; //ID of the icon that willl appear in the system tray - nidApp.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; //ORing of all the flags - nidApp.hIcon = hMainIcon; // handle of the Icon to be displayed, obtained from LoadIcon - nidApp.uCallbackMessage = WM_USER_SHELLICON; - LoadString(hInstance, IDS_CONTROL_PARITY, nidApp.szTip, MAX_LOADSTRING); - Shell_NotifyIcon(NIM_ADD, &nidApp); - - SetTimer(hWnd, 0, 1000, nullptr); - return true; - -} - -LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) - { - case WM_USER_SHELLICON: - // systray msg callback - POINT lpClickPoint; - switch (LOWORD(lParam)) - { - case WM_LBUTTONDOWN: - OpenUI(); - break; - case WM_RBUTTONDOWN: - UINT uFlag = MF_BYPOSITION | MF_STRING; - GetCursorPos(&lpClickPoint); - HMENU hPopMenu = CreatePopupMenu(); - InsertMenu(hPopMenu, 0xFFFFFFFF, MF_BYPOSITION | MF_STRING, IDM_OPEN, _T("Open")); - InsertMenu(hPopMenu, 0xFFFFFFFF, MF_SEPARATOR | MF_BYPOSITION, 0, nullptr); - InsertMenu(hPopMenu, 0xFFFFFFFF, MF_BYPOSITION | MF_STRING, IDM_AUTOSTART, _T("Start at Login")); - InsertMenu(hPopMenu, 0xFFFFFFFF, MF_SEPARATOR | MF_BYPOSITION, 0, nullptr); - InsertMenu(hPopMenu, 0xFFFFFFFF, MF_BYPOSITION | MF_STRING, IDM_EXIT, _T("Exit")); - bool autoStart = AutostartEnabled(); - CheckMenuItem(hPopMenu, IDM_AUTOSTART, autoStart ? MF_CHECKED : autoStart); - - SetForegroundWindow(hWnd); - TrackPopupMenu(hPopMenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_BOTTOMALIGN, lpClickPoint.x, lpClickPoint.y, 0, hWnd, NULL); - return TRUE; - - } - break; - case WM_COMMAND: - { - int wmId = LOWORD(wParam); - // Parse the menu selections: - switch (wmId) - { - case IDM_EXIT: - DestroyWindow(hWnd); - break; - case IDM_OPEN: - OpenUI(); - break; - case IDM_AUTOSTART: - { - bool autoStart = AutostartEnabled(); - EnableAutostart(!autoStart); - } - break; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - } - break; - case WM_DESTROY: - Shell_NotifyIcon(NIM_DELETE, &nidApp); - KillParity(); - PostQuitMessage(0); - break; - case WM_TIMER: - if (!ParityIsRunning()) - DestroyWindow(hWnd); - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - return 0; -} - -void KillParity() -{ - DWORD procId = parityProcId; - //This does not require the console window to be visible. - if (AttachConsole(procId)) - { - // Disable Ctrl-C handling for our program - SetConsoleCtrlHandler(nullptr, true); - GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0); - FreeConsole(); - - //Re-enable Ctrl-C handling or any subsequently started - //programs will inherit the disabled state. - SetConsoleCtrlHandler(nullptr, false); - } - WaitForSingleObject(parityHandle, INFINITE); -} - -bool ParityIsRunning() -{ - return WaitForSingleObject(parityHandle, 0) == WAIT_TIMEOUT; -} - -void OpenUI() -{ - // Launch parity - TCHAR path[MAX_PATH] = { 0 }; - if (!GetParityExePath(path, MAX_PATH)) - return; - - PROCESS_INFORMATION procInfo = { 0 }; - STARTUPINFO startupInfo = { sizeof(STARTUPINFO) }; - - LPWSTR args = new WCHAR[lstrlen(commandLineFiltered) + MAX_PATH + 2]; - lstrcpy(args, L"parity.exe "); - lstrcat(args, commandLineFiltered); - lstrcat(args, L" ui"); - CreateProcess(path, args, nullptr, nullptr, false, CREATE_NO_WINDOW, nullptr, nullptr, &startupInfo, &procInfo); -} - -bool AutostartEnabled() { - HKEY hKey; - LONG lRes = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_READ, &hKey); - if (lRes != ERROR_SUCCESS) - return false; - - WCHAR szBuffer[512]; - DWORD dwBufferSize = sizeof(szBuffer); - ULONG nError; - nError = RegQueryValueExW(hKey, L"Parity", 0, nullptr, (LPBYTE)szBuffer, &dwBufferSize); - if (ERROR_SUCCESS != nError) - return false; - return true; -} - -void EnableAutostart(bool enable) { - HKEY hKey; - LONG lRes = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_WRITE, &hKey); - if (lRes != ERROR_SUCCESS) - return; - - if (enable) - { - LPWSTR args = new WCHAR[lstrlen(commandLineFiltered) + MAX_PATH + 2]; - if (GetTrayExePath(args, MAX_PATH)) - { - lstrcat(args, L" "); - lstrcat(args, commandLineFiltered); - RegSetValueEx(hKey, L"Parity", 0, REG_SZ, (LPBYTE)args, MAX_PATH); - } - delete[] args; - } - else - { - RegDeleteValue(hKey, L"Parity"); - } -} diff --git a/windows/ptray/ptray.ico b/windows/ptray/ptray.ico deleted file mode 100644 index cda99eef8b3668827befd6a13ff8268c096ceae4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102596 zcmeFYbz79}*ET#ff~0gSARrQgbV?{gh_rNwfOK~ZDj*>sAdQ5iluGviB1lW8lyrA9 z&vANr{qCpk=L5XktAEJmIdh!rSh=r#EnqM-@E7`n24jMiM5Dndz|Wyi9zP<$qrn3| z62KMY)L}48@FOM+7aRN&K+pLK20jdzd!Xr=x-sn$r?q%mwQIvq#&HMFteJFUI{!-w zRcJDmjb;|M&)uy7Me2Zf#*nzz5#Sd4E5zG;ow!_sK zzRB~e!Kvex%~}H+%-p^7o6QNx5F{Hiug6&Gc3B|sQU8~a6Z3ha+hDB6yx3^6*=w>n z)4`2bRx-mzQDgfG(VY+{Uau$eCBK`*0xy0IKCPZygkJP0_lI%bX@&j%d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e0_?HCF#@)t7t<(rD4~FRMJ8=R~ zY8>*w**i1U`lRrh;O}fjvbe3ute+F63@(<8xAw-1yLO9?=XZCxqW3Um2D3k8PM4G( zBQ3|R_FtmCs|nUk9JW}srrD8r_ofa%SnR=atxOB9F?{H@;&nNmrYjIZ`uz_ytG!GgVFE+5Q?K0ZnxnpfRW~9gezU?s5<~i;!8>-i$b+LEW#4mS!JjP3x zcES1Qct?KdbLy}Bw>Wj3bIKpPjDO&FHzKPs7_)=?KSp}hqtbbV_dcVsQ5d&57?^oP z%`X)Dn@wb7nsZLz9>E4eS5`N zR1Yn(NY>TJpRx!(BqyqWN}bk$!6_)45bG3tIeQJ(r@Y1b)8i>rqtrHX(4Tsb1+NK@ z&R*TBDI+v)+b6Oq)RG>^KcuSE*?9mW+cfF@O>>1S`{?MBy8~8rSij+SZ8O?o^pL*E zj6+u#335%|ThypMd&^u8xt&6Z0kff+J&(vmD;*~slA}}ak%-{cSw|Kts*3T%=d^f5 zT%^k2s4?QAg|8o1Je_*B5d(=GW=q*QE1j=CVlP!fhvXGa2pW2%oO^4Wf6v+#D(3|< zs#7T|gWW0bvP5-R_Gpc?PH1Ag>*eePeWm{PCbd;D3%lbYWlBb&sj^eBFJrcc>U|Wx>O4Y%vF(Q&x+~_1z%8S5}?cH!AGe z3UBEC-}QOhmLi|4NL$ UthP^z@jit)bXR-G*R9U_4@oN!P5=M^ diff --git a/windows/ptray/ptray.vcxproj b/windows/ptray/ptray.vcxproj deleted file mode 100644 index e015d55c1e..0000000000 --- a/windows/ptray/ptray.vcxproj +++ /dev/null @@ -1,155 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {37C89E90-8C9E-4FFC-AAE7-B3695D5EB6F4} - Win32Proj - ptray - 8.1 - - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - - - - - NotUsing - Level3 - Disabled - _DEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/windows/ptray/resource.h b/windows/ptray/resource.h deleted file mode 100644 index 1f4b023431b96fb9c6edaf617bd5e9ac940c75c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1788 zcmb7_QEw7K6ot>TiT_~}AB|Gbr24o58X`*xONo6VmV&`F#XwOT<6pOaXQreS*ab3K zX6EjlbI;zn=W_qAqKf`7Iy%!(4K>x}>4a5Bb+y>#`pbB(XZTi>DAQCU%{9}4XQEqd z18fT|^;OsG>UzmY^i5;k@XWE_GGAevVj1DJWH)9%!E(*&^;(2;u%h>+?(q4+X=B{s zHRtq-i{}>s$0&}Jz_>yDAuKOg*ZHmv*270FpzlI$fZA1GJ*8kfTP;>?B7EA5U)70< zk#o>eu)EBCQ2U@Z_hQCxGV+^3&RIbI0LODs56^-l`oslybJ3A?B^S>yK zRgT;WNUJ;_&-t{FvypQu!?)HhWw;&HoZl59yW$>eWBYWO#mMgqk$WJUaf>?s7-}y& zqBd%KIOp6|%44OJaol|Oit4cXR!U4@H`eda3#{u2YF(mh_lBRWt@kmiw%%uGI0s)CAqto;U@Hxnob#q^WN+P#jImrIicqFWqOs9ct5`3a@MZVYUo-K+5bIP M{4Y!%B0b&z2Q6jVQ2+n{ diff --git a/windows/ptray/targetver.h b/windows/ptray/targetver.h deleted file mode 100644 index 87c0086de7..0000000000 --- a/windows/ptray/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include -- GitLab From a5190449da29790b1d69b31154c1c7e3f1f2bfed Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Wed, 6 Jun 2018 16:05:52 +0800 Subject: [PATCH 013/191] Remove UI related settings from CLI (#8783) * Remove all ui reference in dapps interface * Pass primary cli build * Add back parity wallet dapp as builtin * Clean up ui settings * Fix all tests in cli * Missed ui files to commit * Add parity-utils endpoint back * Fix non-dapp feature compiling * Inline styles * Remove parity-utils endpoint * Remove ui precompiled crate * Remove parity-ui alltogether * Remove ui feature flags * Move errors to static methods * Fix tests * Remove all reference to utils endpoint and remove server side injection According to https://github.com/paritytech/parity/pull/8539, inject.js is already handled by Parity UI. --- Cargo.lock | 56 ------- Cargo.toml | 11 +- dapps/Cargo.toml | 6 - dapps/src/apps/fetcher/installers.rs | 8 +- dapps/src/apps/fetcher/mod.rs | 33 ++--- dapps/src/apps/fs.rs | 9 +- dapps/src/apps/mod.rs | 51 +------ dapps/src/apps/ui.rs | 57 ------- dapps/src/error_tpl.html | 83 ++++++++++- dapps/src/handlers/content.rs | 19 +-- dapps/src/handlers/echo.rs | 2 +- dapps/src/handlers/errors.rs | 66 +++++++++ dapps/src/handlers/fetch.rs | 83 +---------- dapps/src/handlers/mod.rs | 46 +----- dapps/src/handlers/streaming.rs | 7 +- dapps/src/lib.rs | 125 +--------------- dapps/src/page/builtin.rs | 21 +-- dapps/src/page/handler.rs | 6 +- dapps/src/page/local.rs | 8 +- dapps/src/proxypac.rs | 11 +- dapps/src/router.rs | 43 +----- dapps/src/tests/fetch.rs | 30 ++-- dapps/src/tests/helpers/mod.rs | 43 +----- dapps/src/tests/home.rs | 62 -------- dapps/src/tests/mod.rs | 2 - dapps/src/tests/redirection.rs | 206 -------------------------- dapps/src/tests/validation.rs | 43 +----- dapps/src/web.rs | 19 +-- dapps/ui-deprecation/Cargo.toml | 18 --- dapps/ui-deprecation/build.rs | 21 --- dapps/ui-deprecation/build/index.html | 119 --------------- dapps/ui-deprecation/src/lib.rs | 21 --- dapps/ui-deprecation/src/lib.rs.in | 55 ------- dapps/ui/Cargo.toml | 20 --- dapps/ui/src/lib.rs | 45 ------ parity/cli/mod.rs | 88 ++++++----- parity/configuration.rs | 196 +----------------------- parity/dapps.rs | 48 ------ parity/lib.rs | 37 +---- parity/rpc.rs | 64 +------- parity/run.rs | 19 +-- parity/signer.rs | 36 +---- 42 files changed, 305 insertions(+), 1638 deletions(-) delete mode 100644 dapps/src/apps/ui.rs create mode 100644 dapps/src/handlers/errors.rs delete mode 100644 dapps/src/tests/home.rs delete mode 100644 dapps/src/tests/redirection.rs delete mode 100644 dapps/ui-deprecation/Cargo.toml delete mode 100644 dapps/ui-deprecation/build.rs delete mode 100644 dapps/ui-deprecation/build/index.html delete mode 100644 dapps/ui-deprecation/src/lib.rs delete mode 100644 dapps/ui-deprecation/src/lib.rs.in delete mode 100644 dapps/ui/Cargo.toml delete mode 100644 dapps/ui/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index a9d9ab7d10..a22012300b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2071,8 +2071,6 @@ dependencies = [ "parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-hash-fetch 1.12.0", "parity-reactor 0.1.0", - "parity-ui 1.12.0", - "parity-ui-deprecation 1.10.0", "parity-version 1.12.0", "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2283,56 +2281,6 @@ dependencies = [ "tokio-uds 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parity-ui" -version = "1.12.0" -dependencies = [ - "parity-ui-dev 1.9.0 (git+https://github.com/parity-js/shell.git?rev=eecaadcb9e421bce31e91680d14a20bbd38f92a2)", - "parity-ui-old-dev 1.9.0 (git+https://github.com/parity-js/dapp-wallet.git?rev=65deb02e7c007a0fd8aab0c089c93e3fd1de6f87)", - "parity-ui-old-precompiled 1.9.0 (git+https://github.com/js-dist-paritytech/parity-master-1-10-wallet.git?rev=4b6f112412716cd05123d32eeb7fda448288a6c6)", - "parity-ui-precompiled 1.9.0 (git+https://github.com/js-dist-paritytech/parity-master-1-10-shell.git?rev=bd25b41cd642c6b822d820dded3aa601a29aa079)", - "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-ui-deprecation" -version = "1.10.0" -dependencies = [ - "parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-ui-dev" -version = "1.9.0" -source = "git+https://github.com/parity-js/shell.git?rev=eecaadcb9e421bce31e91680d14a20bbd38f92a2#eecaadcb9e421bce31e91680d14a20bbd38f92a2" -dependencies = [ - "parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-ui-old-dev" -version = "1.9.0" -source = "git+https://github.com/parity-js/dapp-wallet.git?rev=65deb02e7c007a0fd8aab0c089c93e3fd1de6f87#65deb02e7c007a0fd8aab0c089c93e3fd1de6f87" -dependencies = [ - "parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-ui-old-precompiled" -version = "1.9.0" -source = "git+https://github.com/js-dist-paritytech/parity-master-1-10-wallet.git?rev=4b6f112412716cd05123d32eeb7fda448288a6c6#4b6f112412716cd05123d32eeb7fda448288a6c6" -dependencies = [ - "parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parity-ui-precompiled" -version = "1.9.0" -source = "git+https://github.com/js-dist-paritytech/parity-master-1-10-shell.git?rev=bd25b41cd642c6b822d820dded3aa601a29aa079#bd25b41cd642c6b822d820dded3aa601a29aa079" -dependencies = [ - "parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parity-updater" version = "1.12.0" @@ -3970,10 +3918,6 @@ dependencies = [ "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" "checksum parity-dapps-glue 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "261c025c67ba416e9fe63aa9b3236520ce3c74cfbe43590c9cdcec4ccc8180e4" "checksum parity-tokio-ipc 0.1.5 (git+https://github.com/nikvolf/parity-tokio-ipc)" = "" -"checksum parity-ui-dev 1.9.0 (git+https://github.com/parity-js/shell.git?rev=eecaadcb9e421bce31e91680d14a20bbd38f92a2)" = "" -"checksum parity-ui-old-dev 1.9.0 (git+https://github.com/parity-js/dapp-wallet.git?rev=65deb02e7c007a0fd8aab0c089c93e3fd1de6f87)" = "" -"checksum parity-ui-old-precompiled 1.9.0 (git+https://github.com/js-dist-paritytech/parity-master-1-10-wallet.git?rev=4b6f112412716cd05123d32eeb7fda448288a6c6)" = "" -"checksum parity-ui-precompiled 1.9.0 (git+https://github.com/js-dist-paritytech/parity-master-1-10-shell.git?rev=bd25b41cd642c6b822d820dded3aa601a29aa079)" = "" "checksum parity-wasm 0.27.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a93ad771f67ce8a6af64c6444a99c07b15f4674203657496fc31244ffb1de2c3" "checksum parity-wordlist 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0dec124478845b142f68b446cbee953d14d4b41f1bc0425024417720dce693" "checksum parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd9d732f2de194336fb02fe11f9eed13d9e76f13f4315b4d88a14ca411750cd" diff --git a/Cargo.toml b/Cargo.toml index 24649eff45..7795fb3b3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,16 +88,7 @@ winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] } daemonize = { git = "https://github.com/paritytech/daemonize" } [features] -default = ["ui-precompiled"] -ui = [ - "ui-enabled", - "parity-dapps/ui", -] -ui-precompiled = [ - "ui-enabled", - "parity-dapps/ui-precompiled", -] -ui-enabled = ["dapps"] +default = ["dapps"] dapps = ["parity-dapps"] json-tests = ["ethcore/json-tests"] test-heavy = ["ethcore/test-heavy"] diff --git a/dapps/Cargo.toml b/dapps/Cargo.toml index a7ce5a5489..c3fd75ddc1 100644 --- a/dapps/Cargo.toml +++ b/dapps/Cargo.toml @@ -34,8 +34,6 @@ fetch = { path = "../util/fetch" } node-health = { path = "./node-health" } parity-hash-fetch = { path = "../hash-fetch" } parity-reactor = { path = "../util/reactor" } -parity-ui = { path = "./ui" } -parity-ui-deprecation = { path = "./ui-deprecation" } keccak-hash = { path = "../util/hash" } parity-version = { path = "../util/version" } registrar = { path = "../registrar" } @@ -43,7 +41,3 @@ registrar = { path = "../registrar" } [dev-dependencies] env_logger = "0.4" ethcore-devtools = { path = "../devtools" } - -[features] -ui = ["parity-ui/no-precompiled-js"] -ui-precompiled = ["parity-ui/use-precompiled-js"] diff --git a/dapps/src/apps/fetcher/installers.rs b/dapps/src/apps/fetcher/installers.rs index 99b6be218b..9fba80aabe 100644 --- a/dapps/src/apps/fetcher/installers.rs +++ b/dapps/src/apps/fetcher/installers.rs @@ -27,7 +27,6 @@ use mime_guess::Mime; use apps::manifest::{MANIFEST_FILENAME, deserialize_manifest, serialize_manifest, Manifest}; use handlers::{ContentValidator, ValidatorResponse}; use page::{local, PageCache}; -use Embeddable; type OnDone = Box) + Send>; @@ -124,17 +123,15 @@ pub struct Dapp { id: String, dapps_path: PathBuf, on_done: OnDone, - embeddable_on: Embeddable, pool: CpuPool, } impl Dapp { - pub fn new(id: String, dapps_path: PathBuf, on_done: OnDone, embeddable_on: Embeddable, pool: CpuPool) -> Self { + pub fn new(id: String, dapps_path: PathBuf, on_done: OnDone, pool: CpuPool) -> Self { Dapp { id, dapps_path, on_done, - embeddable_on, pool, } } @@ -170,7 +167,6 @@ impl ContentValidator for Dapp { fn validate_and_install(self, response: fetch::Response) -> Result { let id = self.id.clone(); let pool = self.pool; - let embeddable_on = self.embeddable_on; let validate = move |dapp_path: PathBuf| { let (file, zip_path) = write_response_and_check_hash(&id, dapp_path.clone(), &format!("{}.zip", id), response)?; trace!(target: "dapps", "Opening dapp bundle at {:?}", zip_path); @@ -210,7 +206,7 @@ impl ContentValidator for Dapp { let mut manifest_file = fs::File::create(manifest_path)?; manifest_file.write_all(manifest_str.as_bytes())?; // Create endpoint - let endpoint = local::Dapp::new(pool, dapp_path, manifest.into(), PageCache::Enabled, embeddable_on); + let endpoint = local::Dapp::new(pool, dapp_path, manifest.into(), PageCache::Enabled); Ok(endpoint) }; diff --git a/dapps/src/apps/fetcher/mod.rs b/dapps/src/apps/fetcher/mod.rs index 78be4f4cb3..a7afd91eed 100644 --- a/dapps/src/apps/fetcher/mod.rs +++ b/dapps/src/apps/fetcher/mod.rs @@ -31,7 +31,7 @@ use hash_fetch::urlhint::{URLHintContract, URLHint, URLHintResult}; use hyper::StatusCode; use ethereum_types::H256; -use {Embeddable, SyncStatus, random_filename}; +use {SyncStatus, random_filename}; use parking_lot::Mutex; use page::local; use handlers::{ContentHandler, ContentFetcherHandler}; @@ -50,7 +50,6 @@ pub struct ContentFetcher>, sync: Arc, - embeddable_on: Embeddable, fetch: F, pool: CpuPool, only_content: bool, @@ -78,7 +77,6 @@ impl ContentFetcher { resolver, sync, cache: Arc::new(Mutex::new(ContentCache::default())), - embeddable_on: None, fetch, pool, only_content: true, @@ -90,38 +88,30 @@ impl ContentFetcher { self } - pub fn embeddable_on(mut self, embeddable_on: Embeddable) -> Self { - self.embeddable_on = embeddable_on; - self - } - - fn not_found(embeddable: Embeddable) -> endpoint::Response { + fn not_found() -> endpoint::Response { Box::new(future::ok(ContentHandler::error( StatusCode::NotFound, "Resource Not Found", "Requested resource was not found.", None, - embeddable, ).into())) } - fn still_syncing(embeddable: Embeddable) -> endpoint::Response { + fn still_syncing() -> endpoint::Response { Box::new(future::ok(ContentHandler::error( StatusCode::ServiceUnavailable, "Sync In Progress", "Your node is still syncing. We cannot resolve any content before it's fully synced.", Some("Refresh"), - embeddable, ).into())) } - fn dapps_disabled(address: Embeddable) -> endpoint::Response { + fn dapps_disabled() -> endpoint::Response { Box::new(future::ok(ContentHandler::error( StatusCode::ServiceUnavailable, "Network Dapps Not Available", "This interface doesn't support network dapps for security reasons.", None, - address, ).into())) } @@ -195,10 +185,10 @@ impl Endpoint for ContentFetcher { match content { // Don't serve dapps if we are still syncing (but serve content) Some(URLHintResult::Dapp(_)) if self.sync.is_major_importing() => { - (None, Self::still_syncing(self.embeddable_on.clone())) + (None, Self::still_syncing()) }, Some(URLHintResult::Dapp(_)) if self.only_content => { - (None, Self::dapps_disabled(self.embeddable_on.clone())) + (None, Self::dapps_disabled()) }, Some(content) => { let handler = match content { @@ -211,10 +201,8 @@ impl Endpoint for ContentFetcher { content_id.clone(), self.cache_path.clone(), Box::new(on_done), - self.embeddable_on.clone(), self.pool.clone(), ), - self.embeddable_on.clone(), self.fetch.clone(), self.pool.clone(), ) @@ -228,10 +216,8 @@ impl Endpoint for ContentFetcher { content_id.clone(), self.cache_path.clone(), Box::new(on_done), - self.embeddable_on.clone(), self.pool.clone(), ), - self.embeddable_on.clone(), self.fetch.clone(), self.pool.clone(), ) @@ -248,7 +234,6 @@ impl Endpoint for ContentFetcher { Box::new(on_done), self.pool.clone(), ), - self.embeddable_on.clone(), self.fetch.clone(), self.pool.clone(), ) @@ -258,12 +243,12 @@ impl Endpoint for ContentFetcher { (Some(ContentStatus::Fetching(handler.fetch_control())), Box::new(handler) as endpoint::Response) }, None if self.sync.is_major_importing() => { - (None, Self::still_syncing(self.embeddable_on.clone())) + (None, Self::still_syncing()) }, None => { // This may happen when sync status changes in between // `contains` and `to_handler` - (None, Self::not_found(self.embeddable_on.clone())) + (None, Self::not_found()) }, } }, @@ -330,7 +315,7 @@ mod tests { icon_url: "".into(), local_url: Some("".into()), allow_js_eval: None, - }, Default::default(), None); + }, Default::default()); // when fetcher.set_status("test", ContentStatus::Ready(handler)); diff --git a/dapps/src/apps/fs.rs b/dapps/src/apps/fs.rs index 0139e0ec52..975f3067ee 100644 --- a/dapps/src/apps/fs.rs +++ b/dapps/src/apps/fs.rs @@ -24,7 +24,6 @@ use futures_cpupool::CpuPool; use apps::manifest::{MANIFEST_FILENAME, deserialize_manifest}; use endpoint::{Endpoint, EndpointInfo}; use page::{local, PageCache}; -use Embeddable; struct LocalDapp { id: String, @@ -65,14 +64,14 @@ fn read_manifest(name: &str, mut path: PathBuf) -> EndpointInfo { /// Returns Dapp Id and Local Dapp Endpoint for given filesystem path. /// Parses the path to extract last component (for name). /// `None` is returned when path is invalid or non-existent. -pub fn local_endpoint>(path: P, embeddable: Embeddable, pool: CpuPool) -> Option<(String, Box)> { +pub fn local_endpoint>(path: P, pool: CpuPool) -> Option<(String, Box)> { let path = path.as_ref().to_owned(); path.canonicalize().ok().and_then(|path| { let name = path.file_name().and_then(|name| name.to_str()); name.map(|name| { let dapp = local_dapp(name.into(), path.clone()); (dapp.id, Box::new(local::Dapp::new( - pool.clone(), dapp.path, dapp.info, PageCache::Disabled, embeddable.clone()) + pool.clone(), dapp.path, dapp.info, PageCache::Disabled) )) }) }) @@ -90,12 +89,12 @@ fn local_dapp(name: String, path: PathBuf) -> LocalDapp { /// Returns endpoints for Local Dapps found for given filesystem path. /// Scans the directory and collects `local::Dapp`. -pub fn local_endpoints>(dapps_path: P, embeddable: Embeddable, pool: CpuPool) -> BTreeMap> { +pub fn local_endpoints>(dapps_path: P, pool: CpuPool) -> BTreeMap> { let mut pages = BTreeMap::>::new(); for dapp in local_dapps(dapps_path.as_ref()) { pages.insert( dapp.id, - Box::new(local::Dapp::new(pool.clone(), dapp.path, dapp.info, PageCache::Disabled, embeddable.clone())) + Box::new(local::Dapp::new(pool.clone(), dapp.path, dapp.info, PageCache::Disabled)) ); } pages diff --git a/dapps/src/apps/mod.rs b/dapps/src/apps/mod.rs index 32bd7ee0fd..3fe394b6de 100644 --- a/dapps/src/apps/mod.rs +++ b/dapps/src/apps/mod.rs @@ -17,17 +17,15 @@ use std::path::PathBuf; use std::sync::Arc; -use endpoint::{Endpoints, Endpoint}; +use endpoint::Endpoints; use futures_cpupool::CpuPool; -use page; use proxypac::ProxyPac; use web::Web; use fetch::Fetch; -use {WebProxyTokens, ParentFrameSettings}; +use WebProxyTokens; mod app; mod cache; -mod ui; pub mod fs; pub mod fetcher; pub mod manifest; @@ -35,70 +33,37 @@ pub mod manifest; pub use self::app::App; pub const HOME_PAGE: &'static str = "home"; -pub const RPC_PATH: &'static str = "rpc"; -pub const API_PATH: &'static str = "api"; -pub const UTILS_PATH: &'static str = "parity-utils"; +pub const RPC_PATH: &'static str = "rpc"; +pub const API_PATH: &'static str = "api"; pub const WEB_PATH: &'static str = "web"; pub const URL_REFERER: &'static str = "__referer="; -pub fn utils(pool: CpuPool) -> Box { - Box::new(page::builtin::Dapp::new(pool, ::parity_ui::App::default())) -} - -pub fn ui(pool: CpuPool) -> Box { - Box::new(page::builtin::Dapp::with_fallback_to_index(pool, ::parity_ui::App::default())) -} - -pub fn ui_deprecation(pool: CpuPool) -> Box { - Box::new(page::builtin::Dapp::with_fallback_to_index(pool, ::parity_ui_deprecation::App::default())) -} - -pub fn ui_redirection(embeddable: Option) -> Box { - Box::new(ui::Redirection::new(embeddable)) -} - pub fn all_endpoints( dapps_path: PathBuf, extra_dapps: Vec, dapps_domain: &str, - embeddable: Option, web_proxy_tokens: Arc, fetch: F, pool: CpuPool, ) -> (Vec, Endpoints) { // fetch fs dapps at first to avoid overwriting builtins - let mut pages = fs::local_endpoints(dapps_path.clone(), embeddable.clone(), pool.clone()); + let mut pages = fs::local_endpoints(dapps_path.clone(), pool.clone()); let local_endpoints: Vec = pages.keys().cloned().collect(); for path in extra_dapps { - if let Some((id, endpoint)) = fs::local_endpoint(path.clone(), embeddable.clone(), pool.clone()) { + if let Some((id, endpoint)) = fs::local_endpoint(path.clone(), pool.clone()) { pages.insert(id, endpoint); } else { warn!(target: "dapps", "Ignoring invalid dapp at {}", path.display()); } } - // NOTE [ToDr] Dapps will be currently embeded on 8180 - pages.insert( - "ui".into(), - Box::new(page::builtin::Dapp::new_safe_to_embed(pool.clone(), ::parity_ui::App::default(), embeddable.clone())) - ); - // old version - pages.insert( - "v1".into(), - Box::new({ - let mut page = page::builtin::Dapp::new_safe_to_embed(pool.clone(), ::parity_ui::old::App::default(), embeddable.clone()); - // allow JS eval on old Wallet - page.allow_js_eval(); - page - }) - ); pages.insert( "proxy".into(), - ProxyPac::boxed(embeddable.clone(), dapps_domain.to_owned()) + ProxyPac::boxed(dapps_domain.to_owned()) ); pages.insert( WEB_PATH.into(), - Web::boxed(embeddable.clone(), web_proxy_tokens.clone(), fetch.clone(), pool.clone()) + Web::boxed(web_proxy_tokens.clone(), fetch.clone(), pool.clone()) ); (local_endpoints, pages) diff --git a/dapps/src/apps/ui.rs b/dapps/src/apps/ui.rs deleted file mode 100644 index 696ed2523d..0000000000 --- a/dapps/src/apps/ui.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015-2018 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 . - -//! UI redirections - -use hyper::StatusCode; -use futures::future; - -use endpoint::{Endpoint, Request, Response, EndpointPath}; -use {handlers, Embeddable}; - -/// Redirection to UI server. -pub struct Redirection { - embeddable_on: Embeddable, -} - -impl Redirection { - pub fn new( - embeddable_on: Embeddable, - ) -> Self { - Redirection { - embeddable_on, - } - } -} - -impl Endpoint for Redirection { - fn respond(&self, _path: EndpointPath, req: Request) -> Response { - Box::new(future::ok(if let Some(ref frame) = self.embeddable_on { - trace!(target: "dapps", "Redirecting to signer interface."); - let protocol = req.uri().scheme().unwrap_or("http"); - handlers::Redirection::new(format!("{}://{}:{}", protocol, &frame.host, frame.port)).into() - } else { - trace!(target: "dapps", "Signer disabled, returning 404."); - handlers::ContentHandler::error( - StatusCode::NotFound, - "404 Not Found", - "Your homepage is not available when Trusted Signer is disabled.", - Some("You can still access dapps by writing a correct address, though. Re-enable Signer to get your homepage back."), - None, - ).into() - })) - } -} diff --git a/dapps/src/error_tpl.html b/dapps/src/error_tpl.html index c6b4db0e7f..4b155cf35d 100644 --- a/dapps/src/error_tpl.html +++ b/dapps/src/error_tpl.html @@ -4,7 +4,88 @@ {title} - +
diff --git a/dapps/src/handlers/content.rs b/dapps/src/handlers/content.rs index ec4d4f2eff..9449f0f796 100644 --- a/dapps/src/handlers/content.rs +++ b/dapps/src/handlers/content.rs @@ -22,14 +22,12 @@ use hyper::StatusCode; use parity_version::version; use handlers::add_security_headers; -use Embeddable; #[derive(Debug, Clone)] pub struct ContentHandler { code: StatusCode, content: String, mimetype: mime::Mime, - safe_to_embed_on: Embeddable, } impl ContentHandler { @@ -37,8 +35,8 @@ impl ContentHandler { Self::new(StatusCode::Ok, content, mimetype) } - pub fn html(code: StatusCode, content: String, embeddable_on: Embeddable) -> Self { - Self::new_embeddable(code, content, mime::TEXT_HTML, embeddable_on) + pub fn html(code: StatusCode, content: String) -> Self { + Self::new(code, content, mime::TEXT_HTML) } pub fn error( @@ -46,7 +44,6 @@ impl ContentHandler { title: &str, message: &str, details: Option<&str>, - embeddable_on: Embeddable, ) -> Self { Self::html(code, format!( include_str!("../error_tpl.html"), @@ -54,24 +51,18 @@ impl ContentHandler { message=message, details=details.unwrap_or_else(|| ""), version=version(), - ), embeddable_on) + )) } - pub fn new(code: StatusCode, content: String, mimetype: mime::Mime) -> Self { - Self::new_embeddable(code, content, mimetype, None) - } - - pub fn new_embeddable( + pub fn new( code: StatusCode, content: String, mimetype: mime::Mime, - safe_to_embed_on: Embeddable, ) -> Self { ContentHandler { code, content, mimetype, - safe_to_embed_on, } } } @@ -82,7 +73,7 @@ impl Into for ContentHandler { .with_status(self.code) .with_header(header::ContentType(self.mimetype)) .with_body(self.content); - add_security_headers(&mut res.headers_mut(), self.safe_to_embed_on, false); + add_security_headers(&mut res.headers_mut(), false); res } } diff --git a/dapps/src/handlers/echo.rs b/dapps/src/handlers/echo.rs index d7484b6d15..03dfd1c974 100644 --- a/dapps/src/handlers/echo.rs +++ b/dapps/src/handlers/echo.rs @@ -40,7 +40,7 @@ impl Into for EchoHandler { .with_header(content_type.unwrap_or(header::ContentType::json())) .with_body(self.request.body()); - add_security_headers(res.headers_mut(), None, false); + add_security_headers(res.headers_mut(), false); res } } diff --git a/dapps/src/handlers/errors.rs b/dapps/src/handlers/errors.rs new file mode 100644 index 0000000000..5261dc3c15 --- /dev/null +++ b/dapps/src/handlers/errors.rs @@ -0,0 +1,66 @@ +// Copyright 2015-2018 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 . + +//! Handler errors. + +use handlers::{ContentHandler, FETCH_TIMEOUT}; +use hyper::StatusCode; +use std::fmt; + +pub fn streaming() -> ContentHandler { + ContentHandler::error( + StatusCode::BadGateway, + "Streaming Error", + "This content is being streamed in other place.", + None, + ) +} + +pub fn download_error(e: E) -> ContentHandler { + ContentHandler::error( + StatusCode::BadGateway, + "Download Error", + "There was an error when fetching the content.", + Some(&format!("{:?}", e)), + ) +} + +pub fn invalid_content(e: E) -> ContentHandler { + ContentHandler::error( + StatusCode::BadGateway, + "Invalid Dapp", + "Downloaded bundle does not contain a valid content.", + Some(&format!("{:?}", e)), + ) +} + +pub fn timeout_error() -> ContentHandler { + ContentHandler::error( + StatusCode::GatewayTimeout, + "Download Timeout", + &format!("Could not fetch content within {} seconds.", FETCH_TIMEOUT.as_secs()), + None, + ) +} + +pub fn method_not_allowed() -> ContentHandler { + ContentHandler::error( + StatusCode::MethodNotAllowed, + "Method Not Allowed", + "Only GET requests are allowed.", + None, + ) +} diff --git a/dapps/src/handlers/fetch.rs b/dapps/src/handlers/fetch.rs index 860fe998c4..3fee3b1fec 100644 --- a/dapps/src/handlers/fetch.rs +++ b/dapps/src/handlers/fetch.rs @@ -19,20 +19,17 @@ use std::{fmt, mem}; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; -use std::time::{Instant, Duration}; +use std::time::Instant; use fetch::{self, Fetch}; use futures::sync::oneshot; use futures::{self, Future}; use futures_cpupool::CpuPool; -use hyper::{self, StatusCode}; +use hyper; use parking_lot::Mutex; use endpoint::{self, EndpointPath}; -use handlers::{ContentHandler, StreamingHandler}; +use handlers::{ContentHandler, StreamingHandler, FETCH_TIMEOUT, errors}; use page::local; -use {Embeddable}; - -const FETCH_TIMEOUT: Duration = Duration::from_secs(300); pub enum ValidatorResponse { Local(local::Dapp), @@ -134,8 +131,7 @@ impl Future for WaitingHandler { return Ok(futures::Async::Ready(handler.into())); }, WaitResult::NonAwaitable => { - let errors = Errors { embeddable_on: None }; - return Ok(futures::Async::Ready(errors.streaming().into())); + return Ok(futures::Async::Ready(errors::streaming().into())); }, WaitResult::Done(endpoint) => { WaitState::Done(endpoint.to_response(&self.path).into()) @@ -152,63 +148,6 @@ impl Future for WaitingHandler { } } -#[derive(Debug, Clone)] -struct Errors { - embeddable_on: Embeddable, -} - -impl Errors { - fn streaming(&self) -> ContentHandler { - ContentHandler::error( - StatusCode::BadGateway, - "Streaming Error", - "This content is being streamed in other place.", - None, - self.embeddable_on.clone(), - ) - } - - fn download_error(&self, e: E) -> ContentHandler { - ContentHandler::error( - StatusCode::BadGateway, - "Download Error", - "There was an error when fetching the content.", - Some(&format!("{:?}", e)), - self.embeddable_on.clone(), - ) - } - - fn invalid_content(&self, e: E) -> ContentHandler { - ContentHandler::error( - StatusCode::BadGateway, - "Invalid Dapp", - "Downloaded bundle does not contain a valid content.", - Some(&format!("{:?}", e)), - self.embeddable_on.clone(), - ) - } - - fn timeout_error(&self) -> ContentHandler { - ContentHandler::error( - StatusCode::GatewayTimeout, - "Download Timeout", - &format!("Could not fetch content within {} seconds.", FETCH_TIMEOUT.as_secs()), - None, - self.embeddable_on.clone(), - ) - } - - fn method_not_allowed(&self) -> ContentHandler { - ContentHandler::error( - StatusCode::MethodNotAllowed, - "Method Not Allowed", - "Only GET requests are allowed.", - None, - self.embeddable_on.clone(), - ) - } -} - enum FetchState { Error(ContentHandler), InProgress(Box + Send>), @@ -237,7 +176,6 @@ impl fmt::Debug for FetchState { pub struct ContentFetcherHandler { fetch_control: FetchControl, status: FetchState, - errors: Errors, } impl ContentFetcherHandler { @@ -250,12 +188,10 @@ impl ContentFetcherHandler { url: &str, path: EndpointPath, installer: H, - embeddable_on: Embeddable, fetch: F, pool: CpuPool, ) -> Self { let fetch_control = FetchControl::default(); - let errors = Errors { embeddable_on }; // Validation of method let status = match *method { @@ -268,18 +204,16 @@ impl ContentFetcherHandler { url, fetch_control.abort.clone(), path, - errors.clone(), installer, )) }, // or return error - _ => FetchState::Error(errors.method_not_allowed()), + _ => FetchState::Error(errors::method_not_allowed()), }; ContentFetcherHandler { fetch_control, status, - errors, } } @@ -289,7 +223,6 @@ impl ContentFetcherHandler { url: &str, abort: Arc, path: EndpointPath, - errors: Errors, installer: H, ) -> Box + Send> { // Start fetching the content @@ -311,12 +244,12 @@ impl ContentFetcherHandler { }, Err(e) => { trace!(target: "dapps", "Error while validating content: {:?}", e); - FetchState::Error(errors.invalid_content(e)) + FetchState::Error(errors::invalid_content(e)) }, }, Err(e) => { warn!(target: "dapps", "Unable to fetch content: {:?}", e); - FetchState::Error(errors.download_error(e)) + FetchState::Error(errors::download_error(e)) }, }) }); @@ -347,7 +280,7 @@ impl Future for ContentFetcherHandler { // Request may time out FetchState::InProgress(_) if self.fetch_control.is_deadline_reached() => { trace!(target: "dapps", "Fetching dapp failed because of timeout."); - FetchState::Error(self.errors.timeout_error()) + FetchState::Error(errors::timeout_error()) }, FetchState::InProgress(ref mut receiver) => { // Check if there is a response diff --git a/dapps/src/handlers/mod.rs b/dapps/src/handlers/mod.rs index fad9c40416..cb0eba0429 100644 --- a/dapps/src/handlers/mod.rs +++ b/dapps/src/handlers/mod.rs @@ -22,6 +22,7 @@ mod fetch; mod reader; mod redirect; mod streaming; +mod errors; pub use self::content::ContentHandler; pub use self::echo::EchoHandler; @@ -30,20 +31,16 @@ pub use self::reader::Reader; pub use self::redirect::Redirection; pub use self::streaming::StreamingHandler; -use std::iter; -use itertools::Itertools; use hyper::header; -use {apps, address, Embeddable}; +use std::time::Duration; + +const FETCH_TIMEOUT: Duration = Duration::from_secs(300); /// Adds security-related headers to the Response. -pub fn add_security_headers(headers: &mut header::Headers, embeddable_on: Embeddable, allow_js_eval: bool) { +pub fn add_security_headers(headers: &mut header::Headers, allow_js_eval: bool) { headers.set_raw("X-XSS-Protection", "1; mode=block"); headers.set_raw("X-Content-Type-Options", "nosniff"); - - // Embedding header: - if let None = embeddable_on { - headers.set_raw("X-Frame-Options", "SAMEORIGIN"); - } + headers.set_raw("X-Frame-Options", "SAMEORIGIN"); // Content Security Policy headers headers.set_raw("Content-Security-Policy", String::new() @@ -70,11 +67,7 @@ pub fn add_security_headers(headers: &mut header::Headers, embeddable_on: Embedd + "object-src 'none';" // Allow scripts + { - let script_src = embeddable_on.as_ref() - .map(|e| e.extra_script_src.iter() - .map(|&(ref host, port)| address(host, port)) - .join(" ") - ).unwrap_or_default(); + let script_src = ""; let eval = if allow_js_eval { " 'unsafe-eval'" } else { "" }; &format!( @@ -93,29 +86,6 @@ pub fn add_security_headers(headers: &mut header::Headers, embeddable_on: Embedd // Never allow mixed content + "block-all-mixed-content;" // Specify if the site can be embedded. - + &match embeddable_on { - Some(ref embed) => { - let std = address(&embed.host, embed.port); - let proxy = format!("{}.{}", apps::HOME_PAGE, embed.dapps_domain); - let domain = format!("*.{}:{}", embed.dapps_domain, embed.port); - - let mut ancestors = vec![std, domain, proxy] - .into_iter() - .chain(embed.extra_embed_on - .iter() - .map(|&(ref host, port)| address(host, port)) - ); - - let ancestors = if embed.host == "127.0.0.1" { - let localhost = address("localhost", embed.port); - ancestors.chain(iter::once(localhost)).join(" ") - } else { - ancestors.join(" ") - }; - - format!("frame-ancestors {};", ancestors) - }, - None => format!("frame-ancestors 'self';"), - } + + "frame-ancestors 'self';" ); } diff --git a/dapps/src/handlers/streaming.rs b/dapps/src/handlers/streaming.rs index 4dfd2c4afa..b6feaa6382 100644 --- a/dapps/src/handlers/streaming.rs +++ b/dapps/src/handlers/streaming.rs @@ -20,24 +20,21 @@ use std::io; use hyper::{self, header, mime, StatusCode}; use handlers::{add_security_headers, Reader}; -use Embeddable; pub struct StreamingHandler { initial: Vec, content: R, status: StatusCode, mimetype: mime::Mime, - safe_to_embed_on: Embeddable, } impl StreamingHandler { - pub fn new(content: R, status: StatusCode, mimetype: mime::Mime, safe_to_embed_on: Embeddable) -> Self { + pub fn new(content: R, status: StatusCode, mimetype: mime::Mime) -> Self { StreamingHandler { initial: Vec::new(), content, status, mimetype, - safe_to_embed_on, } } @@ -51,7 +48,7 @@ impl StreamingHandler { .with_status(self.status) .with_header(header::ContentType(self.mimetype)) .with_body(body); - add_security_headers(&mut res.headers_mut(), self.safe_to_embed_on, false); + add_security_headers(&mut res.headers_mut(), false); (reader, res) } diff --git a/dapps/src/lib.rs b/dapps/src/lib.rs index 255560e422..12a6a80508 100644 --- a/dapps/src/lib.rs +++ b/dapps/src/lib.rs @@ -38,8 +38,6 @@ extern crate fetch; extern crate node_health; extern crate parity_dapps_glue as parity_dapps; extern crate parity_hash_fetch as hash_fetch; -extern crate parity_ui; -extern crate parity_ui_deprecation; extern crate keccak_hash as hash; extern crate parity_version; extern crate registrar; @@ -84,6 +82,7 @@ use node_health::NodeHealth; pub use registrar::{RegistrarClient, Asynchronous}; pub use node_health::SyncStatus; +pub use page::builtin::Dapp; /// Validates Web Proxy tokens pub trait WebProxyTokens: Send + Sync { @@ -101,7 +100,6 @@ pub struct Endpoints { local_endpoints: Arc>>, endpoints: Arc>, dapps_path: PathBuf, - embeddable: Option, pool: Option, } @@ -119,7 +117,7 @@ impl Endpoints { None => return, Some(pool) => pool, }; - let new_local = apps::fs::local_endpoints(&self.dapps_path, self.embeddable.clone(), pool.clone()); + let new_local = apps::fs::local_endpoints(&self.dapps_path, pool.clone()); let old_local = mem::replace(&mut *self.local_endpoints.write(), new_local.keys().cloned().collect()); let (_, to_remove): (_, Vec<_>) = old_local .into_iter() @@ -151,69 +149,10 @@ impl Middleware { &self.endpoints } - /// Creates new middleware for UI server. - pub fn ui( - pool: CpuPool, - health: NodeHealth, - dapps_domain: &str, - registrar: Arc>, - sync_status: Arc, - fetch: F, - info_page_only: bool, - ) -> Self { - let content_fetcher = Arc::new(apps::fetcher::ContentFetcher::new( - hash_fetch::urlhint::URLHintContract::new(registrar), - sync_status.clone(), - fetch.clone(), - pool.clone(), - ).embeddable_on(None).allow_dapps(false)); - - if info_page_only { - let mut special = HashMap::default(); - special.insert(router::SpecialEndpoint::Home, Some(apps::ui_deprecation(pool.clone()))); - - return Middleware { - endpoints: Default::default(), - router: router::Router::new( - content_fetcher, - None, - special, - None, - dapps_domain.to_owned(), - ), - } - } - - let special = { - let mut special = special_endpoints( - pool.clone(), - health, - content_fetcher.clone(), - ); - special.insert(router::SpecialEndpoint::Home, Some(apps::ui(pool.clone()))); - special - }; - let router = router::Router::new( - content_fetcher, - None, - special, - None, - dapps_domain.to_owned(), - ); - - Middleware { - endpoints: Default::default(), - router: router, - } - } - /// Creates new Dapps server middleware. pub fn dapps( pool: CpuPool, health: NodeHealth, - ui_address: Option<(String, u16)>, - extra_embed_on: Vec<(String, u16)>, - extra_script_src: Vec<(String, u16)>, dapps_path: PathBuf, extra_dapps: Vec, dapps_domain: &str, @@ -222,18 +161,16 @@ impl Middleware { web_proxy_tokens: Arc, fetch: F, ) -> Self { - let embeddable = as_embeddable(ui_address, extra_embed_on, extra_script_src, dapps_domain); let content_fetcher = Arc::new(apps::fetcher::ContentFetcher::new( hash_fetch::urlhint::URLHintContract::new(registrar), sync_status.clone(), fetch.clone(), pool.clone(), - ).embeddable_on(embeddable.clone()).allow_dapps(true)); + ).allow_dapps(true)); let (local_endpoints, endpoints) = apps::all_endpoints( dapps_path.clone(), extra_dapps, dapps_domain, - embeddable.clone(), web_proxy_tokens, fetch.clone(), pool.clone(), @@ -242,28 +179,18 @@ impl Middleware { endpoints: Arc::new(RwLock::new(endpoints)), dapps_path, local_endpoints: Arc::new(RwLock::new(local_endpoints)), - embeddable: embeddable.clone(), pool: Some(pool.clone()), }; - let special = { - let mut special = special_endpoints( - pool.clone(), - health, - content_fetcher.clone(), - ); - special.insert( - router::SpecialEndpoint::Home, - Some(apps::ui_redirection(embeddable.clone())), - ); - special - }; + let special = special_endpoints( + health, + content_fetcher.clone(), + ); let router = router::Router::new( content_fetcher, Some(endpoints.clone()), special, - embeddable, dapps_domain.to_owned(), ); @@ -281,13 +208,11 @@ impl http::RequestMiddleware for Middleware { } fn special_endpoints( - pool: CpuPool, health: NodeHealth, content_fetcher: Arc, ) -> HashMap>> { let mut special = HashMap::new(); special.insert(router::SpecialEndpoint::Rpc, None); - special.insert(router::SpecialEndpoint::Utils, Some(apps::utils(pool))); special.insert(router::SpecialEndpoint::Api, Some(api::RestApi::new( content_fetcher, health, @@ -295,45 +220,9 @@ fn special_endpoints( special } -fn address(host: &str, port: u16) -> String { - format!("{}:{}", host, port) -} - -fn as_embeddable( - ui_address: Option<(String, u16)>, - extra_embed_on: Vec<(String, u16)>, - extra_script_src: Vec<(String, u16)>, - dapps_domain: &str, -) -> Option { - ui_address.map(|(host, port)| ParentFrameSettings { - host, - port, - extra_embed_on, - extra_script_src, - dapps_domain: dapps_domain.to_owned(), - }) -} - /// Random filename fn random_filename() -> String { use ::rand::Rng; let mut rng = ::rand::OsRng::new().unwrap(); rng.gen_ascii_chars().take(12).collect() } - -type Embeddable = Option; - -/// Parent frame host and port allowed to embed the content. -#[derive(Debug, Clone)] -pub struct ParentFrameSettings { - /// Hostname - pub host: String, - /// Port - pub port: u16, - /// Additional URLs the dapps can be embedded on. - pub extra_embed_on: Vec<(String, u16)>, - /// Additional URLs the dapp scripts can be loaded from. - pub extra_script_src: Vec<(String, u16)>, - /// Dapps Domain (web3.site) - pub dapps_domain: String, -} diff --git a/dapps/src/page/builtin.rs b/dapps/src/page/builtin.rs index b9f2fcdac5..685b1401d1 100644 --- a/dapps/src/page/builtin.rs +++ b/dapps/src/page/builtin.rs @@ -23,15 +23,13 @@ use parity_dapps::{WebApp, Info}; use endpoint::{Endpoint, EndpointInfo, EndpointPath, Request, Response}; use page::{handler, PageCache}; -use Embeddable; +/// Represents a builtin Dapp. pub struct Dapp { /// futures cpu pool pool: CpuPool, /// Content of the files app: T, - /// Safe to be loaded in frame by other origin. (use wisely!) - safe_to_embed_on: Embeddable, info: EndpointInfo, fallback_to_index_html: bool, } @@ -43,7 +41,6 @@ impl Dapp { Dapp { pool, app, - safe_to_embed_on: None, info: EndpointInfo::from(info), fallback_to_index_html: false, } @@ -56,26 +53,11 @@ impl Dapp { Dapp { pool, app, - safe_to_embed_on: None, info: EndpointInfo::from(info), fallback_to_index_html: true, } } - /// Creates new `Dapp` which can be safely used in iframe - /// even from different origin. It might be dangerous (clickjacking). - /// Use wisely! - pub fn new_safe_to_embed(pool: CpuPool, app: T, address: Embeddable) -> Self { - let info = app.info(); - Dapp { - pool, - app, - safe_to_embed_on: address, - info: EndpointInfo::from(info), - fallback_to_index_html: false, - } - } - /// Allow the dapp to use `unsafe-eval` to run JS. pub fn allow_js_eval(&mut self) { self.info.allow_js_eval = Some(true); @@ -121,7 +103,6 @@ impl Endpoint for Dapp { let (reader, response) = handler::PageHandler { file, cache: PageCache::Disabled, - safe_to_embed_on: self.safe_to_embed_on.clone(), allow_js_eval: self.info.allow_js_eval.clone().unwrap_or(false), }.into_response(); diff --git a/dapps/src/page/handler.rs b/dapps/src/page/handler.rs index 15e2b10c50..d7fcefa7f0 100644 --- a/dapps/src/page/handler.rs +++ b/dapps/src/page/handler.rs @@ -20,7 +20,6 @@ use hyper::{self, header, StatusCode}; use hyper::mime::{Mime}; use handlers::{Reader, ContentHandler, add_security_headers}; -use {Embeddable}; /// Represents a file that can be sent to client. /// Implementation should keep track of bytes already sent internally. @@ -54,8 +53,6 @@ impl Default for PageCache { pub struct PageHandler { /// File currently being served pub file: Option, - /// Flag indicating if the file can be safely embeded (put in iframe). - pub safe_to_embed_on: Embeddable, /// Cache settings for this page. pub cache: PageCache, /// Allow JS unsafe-eval. @@ -70,7 +67,6 @@ impl PageHandler { "File not found", "Requested file has not been found.", None, - self.safe_to_embed_on, ).into()), Some(file) => file, }; @@ -94,7 +90,7 @@ impl PageHandler { headers.set(header::ContentType(file.content_type().to_owned())); - add_security_headers(&mut headers, self.safe_to_embed_on, self.allow_js_eval); + add_security_headers(&mut headers, self.allow_js_eval); } let (reader, body) = Reader::pair(file.into_reader(), Vec::new()); diff --git a/dapps/src/page/local.rs b/dapps/src/page/local.rs index f30af45237..a43735d768 100644 --- a/dapps/src/page/local.rs +++ b/dapps/src/page/local.rs @@ -22,7 +22,6 @@ use futures_cpupool::CpuPool; use page::handler::{self, PageCache}; use endpoint::{Endpoint, EndpointInfo, EndpointPath, Request, Response}; use hyper::mime::Mime; -use Embeddable; #[derive(Clone)] pub struct Dapp { @@ -31,7 +30,6 @@ pub struct Dapp { mime: Option, info: Option, cache: PageCache, - embeddable_on: Embeddable, } impl fmt::Debug for Dapp { @@ -41,20 +39,18 @@ impl fmt::Debug for Dapp { .field("mime", &self.mime) .field("info", &self.info) .field("cache", &self.cache) - .field("embeddable_on", &self.embeddable_on) .finish() } } impl Dapp { - pub fn new(pool: CpuPool, path: PathBuf, info: EndpointInfo, cache: PageCache, embeddable_on: Embeddable) -> Self { + pub fn new(pool: CpuPool, path: PathBuf, info: EndpointInfo, cache: PageCache) -> Self { Dapp { pool, path, mime: None, info: Some(info), cache, - embeddable_on, } } @@ -65,7 +61,6 @@ impl Dapp { mime: Some(mime), info: None, cache, - embeddable_on: None, } } @@ -96,7 +91,6 @@ impl Dapp { let (reader, response) = handler::PageHandler { file: self.get_file(path), cache: self.cache, - safe_to_embed_on: self.embeddable_on.clone(), allow_js_eval: self.info.as_ref().and_then(|x| x.allow_js_eval).unwrap_or(false), }.into_response(); diff --git a/dapps/src/proxypac.rs b/dapps/src/proxypac.rs index 4e11f3ea6b..1acd7b1b9e 100644 --- a/dapps/src/proxypac.rs +++ b/dapps/src/proxypac.rs @@ -21,25 +21,20 @@ use endpoint::{Endpoint, Request, Response, EndpointPath}; use futures::future; use handlers::ContentHandler; use hyper::mime; -use {address, Embeddable}; pub struct ProxyPac { - embeddable: Embeddable, dapps_domain: String, } impl ProxyPac { - pub fn boxed(embeddable: Embeddable, dapps_domain: String) -> Box { - Box::new(ProxyPac { embeddable, dapps_domain }) + pub fn boxed(dapps_domain: String) -> Box { + Box::new(ProxyPac { dapps_domain }) } } impl Endpoint for ProxyPac { fn respond(&self, path: EndpointPath, _req: Request) -> Response { - let ui = self.embeddable - .as_ref() - .map(|ref parent| address(&parent.host, parent.port)) - .unwrap_or_else(|| format!("{}:{}", path.host, path.port)); + let ui = format!("{}:{}", path.host, path.port); let content = format!( r#" diff --git a/dapps/src/router.rs b/dapps/src/router.rs index 565874f6a8..28a3e24c3f 100644 --- a/dapps/src/router.rs +++ b/dapps/src/router.rs @@ -29,14 +29,12 @@ use apps::fetcher::Fetcher; use endpoint::{self, Endpoint, EndpointPath}; use Endpoints; use handlers; -use Embeddable; /// Special endpoints are accessible on every domain (every dapp) #[derive(Debug, PartialEq, Hash, Eq)] pub enum SpecialEndpoint { Rpc, Api, - Utils, Home, None, } @@ -52,16 +50,14 @@ pub struct Router { endpoints: Option, fetch: Arc, special: HashMap>>, - embeddable_on: Embeddable, dapps_domain: String, } impl Router { - fn resolve_request(&self, req: hyper::Request, refresh_dapps: bool) -> (bool, Response) { + fn resolve_request(&self, req: hyper::Request, refresh_dapps: bool) -> Response { // Choose proper handler depending on path / domain let endpoint = extract_endpoint(req.uri(), req.headers().get(), &self.dapps_domain); let referer = extract_referer_endpoint(&req, &self.dapps_domain); - let is_utils = endpoint.1 == SpecialEndpoint::Utils; let is_get_request = *req.method() == hyper::Method::Get; let is_head_request = *req.method() == hyper::Method::Head; let has_dapp = |dapp: &str| self.endpoints @@ -71,7 +67,7 @@ impl Router { trace!(target: "dapps", "Routing request to {:?}. Details: {:?}", req.uri(), req); debug!(target: "dapps", "Handling endpoint request: {:?}, referer: {:?}", endpoint, referer); - (is_utils, match (endpoint.0, endpoint.1, referer) { + match (endpoint.0, endpoint.1, referer) { // Handle invalid web requests that we can recover from (ref path, SpecialEndpoint::None, Some(ref referer)) if referer.app_id == apps::WEB_PATH @@ -132,7 +128,6 @@ impl Router { "404 Not Found", "Requested content was not found.", None, - self.embeddable_on.clone(), ).into()))) } }, @@ -161,20 +156,19 @@ impl Router { "404 Not Found", "Requested content was not found.", None, - self.embeddable_on.clone(), ).into()))) }, - }) + } } } impl http::RequestMiddleware for Router { fn on_request(&self, req: hyper::Request) -> http::RequestMiddlewareAction { let is_origin_set = req.headers().get::().is_some(); - let (is_utils, response) = self.resolve_request(req, self.endpoints.is_some()); + let response = self.resolve_request(req, self.endpoints.is_some()); match response { Response::Some(response) => http::RequestMiddlewareAction::Respond { - should_validate_hosts: !is_utils, + should_validate_hosts: true, response, }, Response::None(request) => http::RequestMiddlewareAction::Proceed { @@ -190,14 +184,12 @@ impl Router { content_fetcher: Arc, endpoints: Option, special: HashMap>>, - embeddable_on: Embeddable, dapps_domain: String, ) -> Self { Router { endpoints: endpoints, fetch: content_fetcher, special: special, - embeddable_on: embeddable_on, dapps_domain: format!(".{}", dapps_domain), } } @@ -250,7 +242,6 @@ fn extract_endpoint(url: &Uri, extra_host: Option<&header::Host>, dapps_domain: match path[0].as_ref() { apps::RPC_PATH => SpecialEndpoint::Rpc, apps::API_PATH => SpecialEndpoint::Api, - apps::UTILS_PATH => SpecialEndpoint::Utils, apps::HOME_PAGE => SpecialEndpoint::Home, _ => SpecialEndpoint::None, } @@ -351,30 +342,6 @@ mod tests { }), SpecialEndpoint::Rpc) ); - assert_eq!( - extract_endpoint(&"http://my.status.web3.site/parity-utils/inject.js".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "status".to_owned(), - app_params: vec!["my".into(), "inject.js".into()], - query: None, - host: "my.status.web3.site".to_owned(), - port: 80, - using_dapps_domains: true, - }), SpecialEndpoint::Utils) - ); - - assert_eq!( - extract_endpoint(&"http://my.status.web3.site/inject.js".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "status".to_owned(), - app_params: vec!["my".into(), "inject.js".into()], - query: None, - host: "my.status.web3.site".to_owned(), - port: 80, - using_dapps_domains: true, - }), SpecialEndpoint::None) - ); - // By Subdomain assert_eq!( extract_endpoint(&"http://status.web3.site/test.html".parse().unwrap(), None, dapps_domain), diff --git a/dapps/src/tests/fetch.rs b/dapps/src/tests/fetch.rs index bbd766a552..444d5b656a 100644 --- a/dapps/src/tests/fetch.rs +++ b/dapps/src/tests/fetch.rs @@ -19,7 +19,7 @@ use rustc_hex::FromHex; use tests::helpers::{ serve_with_registrar, serve_with_registrar_and_sync, serve_with_fetch, serve_with_registrar_and_fetch, - request, assert_security_headers_for_embed, + request, assert_security_headers }; #[test] @@ -40,7 +40,7 @@ fn should_resolve_dapp() { // then response.assert_status("HTTP/1.1 404 Not Found"); assert_eq!(registrar.calls.lock().len(), 4); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); } #[test] @@ -61,7 +61,7 @@ fn should_return_503_when_syncing_but_should_make_the_calls() { // then response.assert_status("HTTP/1.1 503 Service Unavailable"); assert_eq!(registrar.calls.lock().len(), 2); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); } const GAVCOIN_DAPP: &'static str = "00000000000000000000000000000000000000000000000000000000000000609faf32e1e3845e237cc6efd27187cee13b3b99db000000000000000000000000000000000000000000000000d8bd350823e28ff75e74a34215faefdc8a52fd8e00000000000000000000000000000000000000000000000000000000000000116761766f66796f726b2f676176636f696e000000000000000000000000000000"; @@ -95,7 +95,7 @@ fn should_return_502_on_hash_mismatch() { response.assert_status("HTTP/1.1 502 Bad Gateway"); assert!(response.body.contains("HashMismatch"), "Expected hash mismatch response, got: {:?}", response.body); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); } #[test] @@ -126,7 +126,7 @@ fn should_return_error_for_invalid_dapp_zip() { response.assert_status("HTTP/1.1 502 Bad Gateway"); assert!(response.body.contains("InvalidArchive"), "Expected invalid zip response, got: {:?}", response.body); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); } #[test] @@ -165,7 +165,7 @@ fn should_return_fetched_dapp_content() { fetch.assert_no_more_requests(); response1.assert_status("HTTP/1.1 200 OK"); - assert_security_headers_for_embed(&response1.headers); + assert_security_headers(&response1.headers); assert!( response1.body.contains(r#"18

Hello Gavcoin!

@@ -178,7 +178,7 @@ fn should_return_fetched_dapp_content() { ); response2.assert_status("HTTP/1.1 200 OK"); - assert_security_headers_for_embed(&response2.headers); + assert_security_headers(&response2.headers); assert_eq!( response2.body, r#"EA @@ -331,7 +331,7 @@ fn should_stream_web_content() { // then response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_requested("https://parity.io/"); fetch.assert_no_more_requests(); @@ -354,7 +354,7 @@ fn should_support_base32_encoded_web_urls() { // then response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_requested("https://parity.io/styles.css?test=123"); fetch.assert_no_more_requests(); @@ -377,7 +377,7 @@ fn should_correctly_handle_long_label_when_splitted() { // then response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_requested("https://contribution.melonport.com/styles.css?test=123"); fetch.assert_no_more_requests(); @@ -400,7 +400,7 @@ fn should_support_base32_encoded_web_urls_as_path() { // then response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_requested("https://parity.io/styles.css?test=123"); fetch.assert_no_more_requests(); @@ -423,7 +423,7 @@ fn should_return_error_on_non_whitelisted_domain() { // then response.assert_status("HTTP/1.1 400 Bad Request"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_no_more_requests(); } @@ -445,7 +445,7 @@ fn should_return_error_on_invalid_token() { // then response.assert_status("HTTP/1.1 400 Bad Request"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_no_more_requests(); } @@ -467,7 +467,7 @@ fn should_return_error_on_invalid_protocol() { // then response.assert_status("HTTP/1.1 400 Bad Request"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_no_more_requests(); } @@ -492,7 +492,7 @@ fn should_disallow_non_get_requests() { // then response.assert_status("HTTP/1.1 405 Method Not Allowed"); - assert_security_headers_for_embed(&response.headers); + assert_security_headers(&response.headers); fetch.assert_no_more_requests(); } diff --git a/dapps/src/tests/helpers/mod.rs b/dapps/src/tests/helpers/mod.rs index aa76089794..58ec71d733 100644 --- a/dapps/src/tests/helpers/mod.rs +++ b/dapps/src/tests/helpers/mod.rs @@ -36,8 +36,6 @@ mod fetch; use self::registrar::FakeRegistrar; use self::fetch::FakeFetch; -const SIGNER_PORT: u16 = 18180; - #[derive(Debug)] struct FakeSync(bool); impl SyncStatus for FakeSync { @@ -63,8 +61,7 @@ pub fn init_server(process: F, io: IoHandler) -> (Server, Arc Server { init_server(|builder| builder, Default::default()).0 } -pub fn serve_ui() -> Server { - init_server(|mut builder| { - builder.serve_ui = true; - builder - }, Default::default()).0 -} - pub fn request(server: Server, request: &str) -> http_client::Response { http_client::request(server.addr(), request) } @@ -136,9 +126,6 @@ pub fn request(server: Server, request: &str) -> http_client::Response { pub fn assert_security_headers(headers: &[String]) { http_client::assert_security_headers_present(headers, None) } -pub fn assert_security_headers_for_embed(headers: &[String]) { - http_client::assert_security_headers_present(headers, Some(SIGNER_PORT)) -} /// Webapps HTTP+RPC server build. pub struct ServerBuilder { @@ -146,10 +133,8 @@ pub struct ServerBuilder { registrar: Arc>, sync_status: Arc, web_proxy_tokens: Arc, - signer_address: Option<(String, u16)>, allowed_hosts: DomainsValidation, fetch: T, - serve_ui: bool, } impl ServerBuilder { @@ -160,10 +145,8 @@ impl ServerBuilder { registrar: registrar, sync_status: Arc::new(FakeSync(false)), web_proxy_tokens: Arc::new(|_| None), - signer_address: None, allowed_hosts: DomainsValidation::Disabled, fetch: fetch, - serve_ui: false, } } } @@ -176,10 +159,8 @@ impl ServerBuilder { registrar: self.registrar, sync_status: self.sync_status, web_proxy_tokens: self.web_proxy_tokens, - signer_address: self.signer_address, allowed_hosts: self.allowed_hosts, fetch: fetch, - serve_ui: self.serve_ui, } } @@ -190,7 +171,6 @@ impl ServerBuilder { addr, io, self.allowed_hosts, - self.signer_address, self.dapps_path, vec![], self.registrar, @@ -198,7 +178,6 @@ impl ServerBuilder { self.web_proxy_tokens, Remote::new_sync(), self.fetch, - self.serve_ui, ) } } @@ -215,7 +194,6 @@ impl Server { addr: &SocketAddr, io: IoHandler, allowed_hosts: DomainsValidation, - signer_address: Option<(String, u16)>, dapps_path: PathBuf, extra_dapps: Vec, registrar: Arc>, @@ -223,7 +201,6 @@ impl Server { web_proxy_tokens: Arc, remote: Remote, fetch: F, - serve_ui: bool, ) -> io::Result { let health = NodeHealth::new( sync_status.clone(), @@ -231,23 +208,10 @@ impl Server { remote.clone(), ); let pool = ::futures_cpupool::CpuPool::new(1); - let middleware = if serve_ui { - Middleware::ui( - pool, - health, - DAPPS_DOMAIN.into(), - registrar, - sync_status, - fetch, - false, - ) - } else { + let middleware = Middleware::dapps( pool, health, - signer_address, - vec![], - vec![], dapps_path, extra_dapps, DAPPS_DOMAIN.into(), @@ -255,8 +219,7 @@ impl Server { sync_status, web_proxy_tokens, fetch, - ) - }; + ); let mut allowed_hosts: Option> = allowed_hosts.into(); allowed_hosts.as_mut().map(|hosts| { diff --git a/dapps/src/tests/home.rs b/dapps/src/tests/home.rs deleted file mode 100644 index 024261d5df..0000000000 --- a/dapps/src/tests/home.rs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2015-2018 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 tests::helpers::{serve_ui, request, assert_security_headers}; - -#[test] -fn should_serve_home_js() { - // given - let server = serve_ui(); - - // when - let response = request(server, - "\ - GET /inject.js HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - response.assert_header("Content-Type", "application/javascript"); - assert_eq!(response.body.contains("function(){"), true, "Expected function in: {}", response.body); - assert_security_headers(&response.headers); -} - -#[test] -fn should_serve_home() { - // given - let server = serve_ui(); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - response.assert_header("Content-Type", "text/html"); - assert_security_headers(&response.headers); -} diff --git a/dapps/src/tests/mod.rs b/dapps/src/tests/mod.rs index 38a1d6f17a..c4d88cf9f1 100644 --- a/dapps/src/tests/mod.rs +++ b/dapps/src/tests/mod.rs @@ -20,7 +20,5 @@ mod helpers; mod api; mod fetch; -mod home; -mod redirection; mod rpc; mod validation; diff --git a/dapps/src/tests/redirection.rs b/dapps/src/tests/redirection.rs deleted file mode 100644 index 722ade25b9..0000000000 --- a/dapps/src/tests/redirection.rs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2015-2018 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 tests::helpers::{serve, request, assert_security_headers, assert_security_headers_for_embed}; - -#[test] -fn should_redirect_to_home() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 302 Found"); - assert_eq!(response.headers.get(0).unwrap(), "Location: http://127.0.0.1:18180"); -} - -#[test] -fn should_redirect_to_home_with_domain() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: home.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 302 Found"); - assert_eq!(response.headers.get(0).unwrap(), "Location: http://127.0.0.1:18180"); -} - -#[test] -fn should_redirect_to_home_when_trailing_slash_is_missing() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET /app HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 302 Found"); - assert_eq!(response.headers.get(0).unwrap(), "Location: http://127.0.0.1:18180"); -} - -#[test] -fn should_display_404_on_invalid_dapp() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET /invaliddapp/ HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 404 Not Found"); - assert_security_headers_for_embed(&response.headers); -} - -#[test] -fn should_display_404_on_invalid_dapp_with_domain() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: invaliddapp.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 404 Not Found"); - assert_security_headers_for_embed(&response.headers); -} - -#[test] -fn should_serve_rpc() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - POST / HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - Content-Type: application/json\r\n - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_eq!(response.body, format!("4C\n{}\n\n0\n\n", r#"{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}"#)); -} - -#[test] -fn should_serve_rpc_at_slash_rpc() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - POST /rpc HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - Content-Type: application/json\r\n - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_eq!(response.body, format!("4C\n{}\n\n0\n\n", r#"{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}"#)); -} - -#[test] -fn should_serve_proxy_pac() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET /proxy/proxy.pac HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_eq!(response.body, "DB\n\nfunction FindProxyForURL(url, host) {\n\tif (shExpMatch(host, \"home.web3.site\"))\n\t{\n\t\treturn \"PROXY 127.0.0.1:18180\";\n\t}\n\n\tif (shExpMatch(host, \"*.web3.site\"))\n\t{\n\t\treturn \"PROXY 127.0.0.1:8080\";\n\t}\n\n\treturn \"DIRECT\";\n}\n\n0\n\n".to_owned()); - assert_security_headers(&response.headers); -} - -#[test] -fn should_serve_utils() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET /parity-utils/inject.js HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - response.assert_header("Content-Type", "application/javascript"); - assert_eq!(response.body.contains("function(){"), true, "Expected function in: {}", response.body); - assert_security_headers(&response.headers); -} diff --git a/dapps/src/tests/validation.rs b/dapps/src/tests/validation.rs index ed4a3dc2f0..f9d22f802d 100644 --- a/dapps/src/tests/validation.rs +++ b/dapps/src/tests/validation.rs @@ -37,26 +37,6 @@ fn should_reject_invalid_host() { assert!(response.body.contains("Provided Host header is not whitelisted."), response.body); } -#[test] -fn should_allow_valid_host() { - // given - let server = serve_hosts(Some(vec!["localhost:8080".into()])); - - // when - let response = request(server, - "\ - GET /ui/ HTTP/1.1\r\n\ - Host: localhost:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); -} - #[test] fn should_serve_dapps_domains() { // given @@ -66,28 +46,7 @@ fn should_serve_dapps_domains() { let response = request(server, "\ GET / HTTP/1.1\r\n\ - Host: ui.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); -} - -#[test] -// NOTE [todr] This is required for error pages to be styled properly. -fn should_allow_parity_utils_even_on_invalid_domain() { - // given - let server = serve_hosts(Some(vec!["localhost:8080".into()])); - - // when - let response = request(server, - "\ - GET /parity-utils/styles.css HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ + Host: proxy.web3.site\r\n\ Connection: close\r\n\ \r\n\ {} diff --git a/dapps/src/web.rs b/dapps/src/web.rs index 14f215ca45..fac0dca1af 100644 --- a/dapps/src/web.rs +++ b/dapps/src/web.rs @@ -30,10 +30,9 @@ use handlers::{ ContentFetcherHandler, ContentHandler, ContentValidator, ValidatorResponse, StreamingHandler, }; -use {Embeddable, WebProxyTokens}; +use WebProxyTokens; pub struct Web { - embeddable_on: Embeddable, web_proxy_tokens: Arc, fetch: F, pool: CpuPool, @@ -41,13 +40,11 @@ pub struct Web { impl Web { pub fn boxed( - embeddable_on: Embeddable, web_proxy_tokens: Arc, fetch: F, pool: CpuPool, ) -> Box { Box::new(Web { - embeddable_on, web_proxy_tokens, fetch, pool, @@ -64,7 +61,6 @@ impl Web { "Invalid parameter", "Couldn't parse given parameter:", path.app_params.get(0).map(String::as_str), - self.embeddable_on.clone() ))?; let mut token_it = token_and_url.split('+'); @@ -76,7 +72,7 @@ impl Web { Some(domain) => domain, _ => { return Err(ContentHandler::error( - StatusCode::BadRequest, "Invalid Access Token", "Invalid or old web proxy access token supplied.", Some("Try refreshing the page."), self.embeddable_on.clone() + StatusCode::BadRequest, "Invalid Access Token", "Invalid or old web proxy access token supplied.", Some("Try refreshing the page."), )); } }; @@ -86,14 +82,14 @@ impl Web { Some(url) if url.starts_with("http://") || url.starts_with("https://") => url.to_owned(), _ => { return Err(ContentHandler::error( - StatusCode::BadRequest, "Invalid Protocol", "Invalid protocol used.", None, self.embeddable_on.clone() + StatusCode::BadRequest, "Invalid Protocol", "Invalid protocol used.", None, )); } }; if !target_url.starts_with(&*domain) { return Err(ContentHandler::error( - StatusCode::BadRequest, "Invalid Domain", "Dapp attempted to access invalid domain.", Some(&target_url), self.embeddable_on.clone(), + StatusCode::BadRequest, "Invalid Domain", "Dapp attempted to access invalid domain.", Some(&target_url), )); } @@ -128,10 +124,8 @@ impl Endpoint for Web { &target_url, path, WebInstaller { - embeddable_on: self.embeddable_on.clone(), token, }, - self.embeddable_on.clone(), self.fetch.clone(), self.pool.clone(), )) @@ -139,7 +133,6 @@ impl Endpoint for Web { } struct WebInstaller { - embeddable_on: Embeddable, token: String, } @@ -154,12 +147,10 @@ impl ContentValidator for WebInstaller { fetch::BodyReader::new(response), status, mime, - self.embeddable_on, ); if is_html { handler.set_initial_content(&format!( - r#""#, - apps::UTILS_PATH, + r#""#, apps::URL_REFERER, apps::WEB_PATH, &self.token, diff --git a/dapps/ui-deprecation/Cargo.toml b/dapps/ui-deprecation/Cargo.toml deleted file mode 100644 index f4479c2367..0000000000 --- a/dapps/ui-deprecation/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -description = "Parity UI deprecation notice." -name = "parity-ui-deprecation" -version = "1.10.0" -license = "GPL-3.0" -authors = ["Parity Technologies "] -build = "build.rs" - -[features] -default = ["with-syntex", "use-precompiled-js"] -use-precompiled-js = ["parity-dapps-glue/use-precompiled-js"] -with-syntex = ["parity-dapps-glue/with-syntex"] - -[build-dependencies] -parity-dapps-glue = "1.9" - -[dependencies] -parity-dapps-glue = "1.9" diff --git a/dapps/ui-deprecation/build.rs b/dapps/ui-deprecation/build.rs deleted file mode 100644 index c427f3d54d..0000000000 --- a/dapps/ui-deprecation/build.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015-2018 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 parity_dapps_glue; - -fn main() { - parity_dapps_glue::generate(); -} diff --git a/dapps/ui-deprecation/build/index.html b/dapps/ui-deprecation/build/index.html deleted file mode 100644 index 07059743c6..0000000000 --- a/dapps/ui-deprecation/build/index.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - Parity - - - -
-
-
-

The Parity UI has been split off into a standalone project.

-

Get the standalone Parity UI from here

-

- -

-
-
-
- - diff --git a/dapps/ui-deprecation/src/lib.rs b/dapps/ui-deprecation/src/lib.rs deleted file mode 100644 index 79a4a42497..0000000000 --- a/dapps/ui-deprecation/src/lib.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015-2018 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 . - -#[cfg(feature = "with-syntex")] -include!(concat!(env!("OUT_DIR"), "/lib.rs")); - -#[cfg(not(feature = "with-syntex"))] -include!("lib.rs.in"); diff --git a/dapps/ui-deprecation/src/lib.rs.in b/dapps/ui-deprecation/src/lib.rs.in deleted file mode 100644 index 892ebbded2..0000000000 --- a/dapps/ui-deprecation/src/lib.rs.in +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2015-2018 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 parity_dapps_glue; - -use std::collections::HashMap; -use parity_dapps_glue::{WebApp, File, Info}; - -#[derive(WebAppFiles)] -#[webapp(path = "../build")] -pub struct App { - pub files: HashMap<&'static str, File>, -} - -impl Default for App { - fn default() -> App { - App { - files: Self::files(), - } - } -} - -impl WebApp for App { - fn file(&self, path: &str) -> Option<&File> { - self.files.get(path) - } - - fn info(&self) -> Info { - Info { - name: "Parity Wallet info page", - version: env!("CARGO_PKG_VERSION"), - author: "Parity ", - description: "Deprecation notice for Parity Wallet", - icon_url: "icon.png", - } - } -} - -#[test] -fn test_js() { - parity_dapps_glue::js::build(env!("CARGO_MANIFEST_DIR"), "build"); -} diff --git a/dapps/ui/Cargo.toml b/dapps/ui/Cargo.toml deleted file mode 100644 index acb7a91735..0000000000 --- a/dapps/ui/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -description = "Ethcore Parity UI" -homepage = "http://parity.io" -license = "GPL-3.0" -name = "parity-ui" -version = "1.12.0" -authors = ["Parity Technologies "] - -[build-dependencies] -rustc_version = "0.2" - -[dependencies] -parity-ui-dev = { git = "https://github.com/parity-js/shell.git", rev = "eecaadcb9e421bce31e91680d14a20bbd38f92a2", optional = true } -parity-ui-old-dev = { git = "https://github.com/parity-js/dapp-wallet.git", rev = "65deb02e7c007a0fd8aab0c089c93e3fd1de6f87", optional = true } -parity-ui-precompiled = { git = "https://github.com/js-dist-paritytech/parity-master-1-10-shell.git", rev="bd25b41cd642c6b822d820dded3aa601a29aa079", optional = true } -parity-ui-old-precompiled = { git = "https://github.com/js-dist-paritytech/parity-master-1-10-wallet.git", rev="4b6f112412716cd05123d32eeb7fda448288a6c6", optional = true } - -[features] -no-precompiled-js = ["parity-ui-dev", "parity-ui-old-dev"] -use-precompiled-js = ["parity-ui-precompiled", "parity-ui-old-precompiled"] diff --git a/dapps/ui/src/lib.rs b/dapps/ui/src/lib.rs deleted file mode 100644 index f04f755a99..0000000000 --- a/dapps/ui/src/lib.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2015-2018 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 . - -#[cfg(feature = "parity-ui-dev")] -mod inner { - extern crate parity_ui_dev; - - pub use self::parity_ui_dev::*; -} - -#[cfg(feature = "parity-ui-precompiled")] -mod inner { - extern crate parity_ui_precompiled; - - pub use self::parity_ui_precompiled::*; -} - -#[cfg(feature = "parity-ui-old-dev")] -pub mod old { - extern crate parity_ui_old_dev; - - pub use self::parity_ui_old_dev::*; -} - -#[cfg(feature = "parity-ui-old-precompiled")] -pub mod old { - extern crate parity_ui_old_precompiled; - - pub use self::parity_ui_old_precompiled::*; -} - -pub use self::inner::*; diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index facd01dbfb..a3f3d4887f 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -26,10 +26,6 @@ usage! { // Arguments must start with arg_ // Flags must start with flag_ - CMD cmd_ui { - "Manage ui", - } - CMD cmd_dapp { "Manage dapps", @@ -376,35 +372,10 @@ usage! { "Provide a file containing passwords for unlocking accounts (signer, private account, validators).", ["UI options"] - FLAG flag_force_ui: (bool) = false, or |c: &Config| c.ui.as_ref()?.force.clone(), - "--force-ui", - "Enable Trusted UI WebSocket endpoint, even when --unlock is in use.", - - FLAG flag_no_ui: (bool) = false, or |c: &Config| c.ui.as_ref()?.disable.clone(), - "--no-ui", - "Disable Trusted UI WebSocket endpoint.", - - // NOTE [todr] For security reasons don't put this to config files - FLAG flag_ui_no_validation: (bool) = false, or |_| None, - "--ui-no-validation", - "Disable Origin and Host headers validation for Trusted UI. WARNING: INSECURE. Used only for development.", - - ARG arg_ui_interface: (String) = "local", or |c: &Config| c.ui.as_ref()?.interface.clone(), - "--ui-interface=[IP]", - "Specify the hostname portion of the Trusted UI server, IP should be an interface's IP address, or local.", - - ARG arg_ui_hosts: (String) = "none", or |c: &Config| c.ui.as_ref()?.hosts.as_ref().map(|vec| vec.join(",")), - "--ui-hosts=[HOSTS]", - "List of allowed Host header values. This option will validate the Host header sent by the browser, it is additional security against some attack vectors. Special options: \"all\", \"none\",.", - ARG arg_ui_path: (String) = "$BASE/signer", or |c: &Config| c.ui.as_ref()?.path.clone(), "--ui-path=[PATH]", "Specify directory where Trusted UIs tokens should be stored.", - ARG arg_ui_port: (u16) = 8180u16, or |c: &Config| c.ui.as_ref()?.port.clone(), - "--ui-port=[PORT]", - "Specify the port of Trusted UI server.", - ["Networking options"] FLAG flag_no_warp: (bool) = false, or |c: &Config| c.network.as_ref()?.warp.clone().map(|w| !w), "--no-warp", @@ -948,6 +919,30 @@ usage! { "--public-node", "Does nothing; Public node is removed from Parity.", + FLAG flag_force_ui: (bool) = false, or |_| None, + "--force-ui", + "Does nothing; UI is now a separate project.", + + FLAG flag_no_ui: (bool) = false, or |_| None, + "--no-ui", + "Does nothing; UI is now a separate project.", + + FLAG flag_ui_no_validation: (bool) = false, or |_| None, + "--ui-no-validation", + "Does nothing; UI is now a separate project.", + + ARG arg_ui_interface: (String) = "local", or |_| None, + "--ui-interface=[IP]", + "Does nothing; UI is now a separate project.", + + ARG arg_ui_hosts: (String) = "none", or |_| None, + "--ui-hosts=[HOSTS]", + "Does nothing; UI is now a separate project.", + + ARG arg_ui_port: (u16) = 8180u16, or |_| None, + "--ui-port=[PORT]", + "Does nothing; UI is now a separate project.", + ARG arg_dapps_port: (Option) = None, or |c: &Config| c.dapps.as_ref()?.port.clone(), "--dapps-port=[PORT]", "Dapps server is merged with RPC server. Use --jsonrpc-port.", @@ -1111,12 +1106,18 @@ struct PrivateTransactions { #[derive(Default, Debug, PartialEq, Deserialize)] #[serde(deny_unknown_fields)] struct Ui { - force: Option, - disable: Option, - port: Option, - interface: Option, - hosts: Option>, path: Option, + + #[serde(rename="force")] + _legacy_force: Option, + #[serde(rename="disable")] + _legacy_disable: Option, + #[serde(rename="port")] + _legacy_port: Option, + #[serde(rename="interface")] + _legacy_interface: Option, + #[serde(rename="hosts")] + _legacy_hosts: Option>, } #[derive(Default, Debug, PartialEq, Deserialize)] @@ -1404,15 +1405,13 @@ mod tests { let args = Args::parse(&["parity", "--secretstore-nodes", "abc@127.0.0.1:3333,cde@10.10.10.10:4444"]).unwrap(); assert_eq!(args.arg_secretstore_nodes, "abc@127.0.0.1:3333,cde@10.10.10.10:4444"); - let args = Args::parse(&["parity", "--password", "~/.safe/1", "--password", "~/.safe/2", "--ui-port", "8123", "ui"]).unwrap(); + let args = Args::parse(&["parity", "--password", "~/.safe/1", "--password", "~/.safe/2", "--ui-port", "8123"]).unwrap(); assert_eq!(args.arg_password, vec!["~/.safe/1".to_owned(), "~/.safe/2".to_owned()]); assert_eq!(args.arg_ui_port, 8123); - assert_eq!(args.cmd_ui, true); - let args = Args::parse(&["parity", "--password", "~/.safe/1,~/.safe/2", "--ui-port", "8123", "ui"]).unwrap(); + let args = Args::parse(&["parity", "--password", "~/.safe/1,~/.safe/2", "--ui-port", "8123"]).unwrap(); assert_eq!(args.arg_password, vec!["~/.safe/1".to_owned(), "~/.safe/2".to_owned()]); assert_eq!(args.arg_ui_port, 8123); - assert_eq!(args.cmd_ui, true); } #[test] @@ -1476,7 +1475,6 @@ mod tests { // then assert_eq!(args, Args { // Commands - cmd_ui: false, cmd_dapp: false, cmd_daemon: false, cmd_account: false, @@ -1566,7 +1564,7 @@ mod tests { flag_force_ui: false, flag_no_ui: false, arg_ui_port: 8180u16, - arg_ui_interface: "127.0.0.1".into(), + arg_ui_interface: "local".into(), arg_ui_hosts: "none".into(), arg_ui_path: "$HOME/.parity/signer".into(), flag_ui_no_validation: false, @@ -1820,12 +1818,12 @@ mod tests { fast_unlock: None, }), ui: Some(Ui { - force: None, - disable: Some(true), - port: None, - interface: None, - hosts: None, path: None, + _legacy_force: None, + _legacy_disable: Some(true), + _legacy_port: None, + _legacy_interface: None, + _legacy_hosts: None, }), network: Some(Network { warp: Some(false), diff --git a/parity/configuration.rs b/parity/configuration.rs index 6f475aa83c..ec73046a49 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -20,7 +20,6 @@ use std::net::SocketAddr; use std::path::{Path, PathBuf}; use std::collections::BTreeMap; use std::cmp; -use std::str::FromStr; use cli::{Args, ArgsError}; use hash::keccak; use ethereum_types::{U256, H256, Address}; @@ -34,7 +33,7 @@ use ethcore::miner::{stratum, MinerOptions}; use ethcore::verification::queue::VerifierSettings; use miner::pool; -use rpc::{IpcConfiguration, HttpConfiguration, WsConfiguration, UiConfiguration}; +use rpc::{IpcConfiguration, HttpConfiguration, WsConfiguration}; use parity_rpc::NetworkSettings; use cache::CacheConfig; use helpers::{to_duration, to_mode, to_block_id, to_u256, to_pending_set, to_price, geth_ipc_path, parity_ipc_path, to_bootnodes, to_addresses, to_address, to_queue_strategy, to_queue_penalization, passwords_from_files}; @@ -65,7 +64,7 @@ pub enum Cmd { Account(AccountCmd), ImportPresaleWallet(ImportWallet), Blockchain(BlockchainCmd), - SignerToken(WsConfiguration, UiConfiguration, LogConfig), + SignerToken(WsConfiguration, LogConfig), SignerSign { id: Option, pwfile: Option, @@ -130,7 +129,6 @@ impl Configuration { let http_conf = self.http_config()?; let ipc_conf = self.ipc_config()?; let net_conf = self.net_config()?; - let ui_conf = self.ui_config(); let network_id = self.network_id(); let cache_config = self.cache_config(); let tracing = self.args.arg_tracing.parse()?; @@ -150,7 +148,7 @@ impl Configuration { let authfile = ::signer::codes_path(&ws_conf.signer_path); if self.args.cmd_signer_new_token { - Cmd::SignerToken(ws_conf, ui_conf, logger_config.clone()) + Cmd::SignerToken(ws_conf, logger_config.clone()) } else if self.args.cmd_signer_sign { let pwfile = self.accounts_config()?.password_files.first().map(|pwfile| { PathBuf::from(pwfile) @@ -381,13 +379,11 @@ impl Configuration { net_settings: self.network_settings()?, dapps_conf: dapps_conf, ipfs_conf: ipfs_conf, - ui_conf: ui_conf, secretstore_conf: secretstore_conf, private_provider_conf: private_provider_conf, private_encryptor_conf: private_enc_conf, private_tx_enabled, dapp: self.dapp_to_open()?, - ui: self.args.cmd_ui, name: self.args.arg_identity, custom_bootnodes: self.args.arg_bootnodes.is_some(), no_periodic_snapshot: self.args.flag_no_periodic_snapshot, @@ -588,29 +584,11 @@ impl Configuration { }) } - fn ui_port(&self) -> u16 { - self.args.arg_ports_shift + self.args.arg_ui_port - } - fn ntp_servers(&self) -> Vec { self.args.arg_ntp_servers.split(",").map(str::to_owned).collect() } - fn ui_config(&self) -> UiConfiguration { - let ui = self.ui_enabled(); - UiConfiguration { - enabled: ui.enabled, - interface: self.ui_interface(), - port: self.ui_port(), - hosts: self.ui_hosts(), - info_page_only: ui.info_page_only, - } - } - fn dapps_config(&self) -> DappsConfiguration { - let dev_ui = if self.args.flag_ui_no_validation { vec![("127.0.0.1".to_owned(), 3000)] } else { vec![] }; - let ui_port = self.ui_port(); - DappsConfiguration { enabled: self.dapps_enabled(), dapps_path: PathBuf::from(self.directories().dapps), @@ -619,31 +597,6 @@ impl Configuration { } else { vec![] }, - extra_embed_on: { - let mut extra_embed = dev_ui.clone(); - match self.ui_hosts() { - // In case host validation is disabled allow all frame ancestors - None => { - // NOTE Chrome does not seem to support "*:" - // we use `http(s)://*:` instead. - extra_embed.push(("http://*".to_owned(), ui_port)); - extra_embed.push(("https://*".to_owned(), ui_port)); - }, - Some(hosts) => extra_embed.extend(hosts.into_iter().filter_map(|host| { - let mut it = host.split(":"); - let host = it.next(); - let port = it.next().and_then(|v| u16::from_str(v).ok()); - - match (host, port) { - (Some(host), Some(port)) => Some((host.into(), port)), - (Some(host), None) => Some((host.into(), ui_port)), - _ => None, - } - })), - } - extra_embed - }, - extra_script_src: dev_ui, } } @@ -863,10 +816,6 @@ impl Configuration { Some(hosts) } - fn ui_hosts(&self) -> Option> { - self.hosts(&self.args.arg_ui_hosts, &self.ui_interface()) - } - fn rpc_hosts(&self) -> Option> { self.hosts(&self.args.arg_jsonrpc_hosts, &self.rpc_interface()) } @@ -876,7 +825,7 @@ impl Configuration { } fn ws_origins(&self) -> Option> { - if self.args.flag_unsafe_expose || self.args.flag_ui_no_validation { + if self.args.flag_unsafe_expose { return None; } @@ -925,7 +874,6 @@ impl Configuration { } fn ws_config(&self) -> Result { - let ui = self.ui_config(); let http = self.http_config()?; let support_token_api = @@ -941,7 +889,6 @@ impl Configuration { origins: self.ws_origins(), signer_path: self.directories().signer.into(), support_token_api, - ui_address: ui.address(), dapps_address: http.address(), max_connections: self.args.arg_ws_max_connections, }; @@ -1065,10 +1012,6 @@ impl Configuration { }.into() } - fn ui_interface(&self) -> String { - self.interface(&self.args.arg_ui_interface) - } - fn rpc_interface(&self) -> String { let rpc_interface = self.args.arg_rpcaddr.clone().unwrap_or(self.args.arg_jsonrpc_interface.clone()); self.interface(&rpc_interface) @@ -1184,24 +1127,6 @@ impl Configuration { into_secretstore_service_contract_address(self.args.arg_secretstore_doc_sretr_contract.as_ref()) } - fn ui_enabled(&self) -> UiEnabled { - if self.args.flag_force_ui { - return UiEnabled { - enabled: true, - info_page_only: false, - }; - } - - let ui_disabled = self.args.arg_unlock.is_some() || - self.args.flag_geth || - self.args.flag_no_ui; - - return UiEnabled { - enabled: (self.args.cmd_ui || !ui_disabled) && cfg!(feature = "ui-enabled"), - info_page_only: !self.args.cmd_ui, - } - } - fn verifier_settings(&self) -> VerifierSettings { let mut settings = VerifierSettings::default(); settings.scale_verifiers = self.args.flag_scale_verifiers; @@ -1220,12 +1145,6 @@ impl Configuration { } } -#[derive(Debug, PartialEq, Eq, Clone, Copy)] -struct UiEnabled { - pub enabled: bool, - pub info_page_only: bool, -} - fn into_secretstore_service_contract_address(s: &str) -> Result, String> { match s { "none" => Ok(None), @@ -1254,7 +1173,7 @@ mod tests { use helpers::{default_network_config}; use params::SpecType; use presale::ImportWallet; - use rpc::{WsConfiguration, UiConfiguration}; + use rpc::WsConfiguration; use rpc_apis::ApiSet; use run::RunCmd; @@ -1438,16 +1357,9 @@ mod tests { origins: Some(vec!["parity://*".into(),"chrome-extension://*".into(), "moz-extension://*".into()]), hosts: Some(vec![]), signer_path: expected.into(), - ui_address: Some("127.0.0.1:8180".into()), dapps_address: Some("127.0.0.1:8545".into()), support_token_api: true, max_connections: 100, - }, UiConfiguration { - enabled: true, - interface: "127.0.0.1".into(), - port: 8180, - hosts: Some(vec![]), - info_page_only: true, }, LogConfig { color: true, mode: None, @@ -1516,12 +1428,10 @@ mod tests { net_settings: Default::default(), dapps_conf: Default::default(), ipfs_conf: Default::default(), - ui_conf: Default::default(), secretstore_conf: Default::default(), private_provider_conf: Default::default(), private_encryptor_conf: Default::default(), private_tx_enabled: false, - ui: false, dapp: None, name: "".into(), custom_bootnodes: false, @@ -1704,49 +1614,6 @@ mod tests { assert_eq!(conf2.ipfs_cors(), Some(vec!["http://parity.io".into(),"http://something.io".into()])); } - #[test] - fn should_disable_signer_in_geth_compat() { - // given - - // when - let conf0 = parse(&["parity", "--geth"]); - let conf1 = parse(&["parity", "--geth", "--force-ui"]); - let conf2 = parse(&["parity", "--geth", "ui"]); - let conf3 = parse(&["parity"]); - - // then - assert_eq!(conf0.ui_enabled(), UiEnabled { - enabled: false, - info_page_only: true, - }); - assert_eq!(conf1.ui_enabled(), UiEnabled { - enabled: true, - info_page_only: false, - }); - assert_eq!(conf2.ui_enabled(), UiEnabled { - enabled: true, - info_page_only: false, - }); - assert_eq!(conf3.ui_enabled(), UiEnabled { - enabled: true, - info_page_only: true, - }); - } - - #[test] - fn should_disable_signer_when_account_is_unlocked() { - // given - - // when - let conf0 = parse(&["parity", "--unlock", "0x0"]); - - // then - assert_eq!(conf0.ui_enabled(), UiEnabled { - enabled: false, - info_page_only: true, - }); - } - #[test] fn should_parse_ui_configuration() { // given @@ -1757,69 +1624,22 @@ mod tests { let conf2 = parse(&["parity", "--ui-path=signer", "--ui-port", "3123"]); let conf3 = parse(&["parity", "--ui-path=signer", "--ui-interface", "test"]); let conf4 = parse(&["parity", "--ui-path=signer", "--force-ui"]); - let conf5 = parse(&["parity", "--ui-path=signer", "ui"]); // then assert_eq!(conf0.directories().signer, "signer".to_owned()); - assert_eq!(conf0.ui_config(), UiConfiguration { - enabled: true, - interface: "127.0.0.1".into(), - port: 8180, - hosts: Some(vec![]), - info_page_only: true, - }); assert!(conf1.ws_config().unwrap().hosts.is_some()); - assert_eq!(conf1.ws_config().unwrap().origins, None); + assert_eq!(conf1.ws_config().unwrap().origins, Some(vec!["parity://*".into(), "chrome-extension://*".into(), "moz-extension://*".into()])); assert_eq!(conf1.directories().signer, "signer".to_owned()); - assert_eq!(conf1.ui_config(), UiConfiguration { - enabled: true, - interface: "127.0.0.1".into(), - port: 8180, - hosts: Some(vec![]), - info_page_only: true, - }); - assert_eq!(conf1.dapps_config().extra_embed_on, vec![("127.0.0.1".to_owned(), 3000)]); assert!(conf2.ws_config().unwrap().hosts.is_some()); assert_eq!(conf2.directories().signer, "signer".to_owned()); - assert_eq!(conf2.ui_config(), UiConfiguration { - enabled: true, - interface: "127.0.0.1".into(), - port: 3123, - hosts: Some(vec![]), - info_page_only: true, - }); assert!(conf3.ws_config().unwrap().hosts.is_some()); assert_eq!(conf3.directories().signer, "signer".to_owned()); - assert_eq!(conf3.ui_config(), UiConfiguration { - enabled: true, - interface: "test".into(), - port: 8180, - hosts: Some(vec![]), - info_page_only: true, - }); assert!(conf4.ws_config().unwrap().hosts.is_some()); assert_eq!(conf4.directories().signer, "signer".to_owned()); - assert_eq!(conf4.ui_config(), UiConfiguration { - enabled: true, - interface: "127.0.0.1".into(), - port: 8180, - hosts: Some(vec![]), - info_page_only: false, - }); - - assert!(conf5.ws_config().unwrap().hosts.is_some()); - assert_eq!(conf5.directories().signer, "signer".to_owned()); - assert_eq!(conf5.ui_config(), UiConfiguration { - enabled: true, - interface: "127.0.0.1".into(), - port: 8180, - hosts: Some(vec![]), - info_page_only: false, - }); } #[test] @@ -1976,7 +1796,6 @@ mod tests { assert_eq!(conf0.network_settings().unwrap().rpc_port, 8546); assert_eq!(conf0.http_config().unwrap().port, 8546); assert_eq!(conf0.ws_config().unwrap().port, 8547); - assert_eq!(conf0.ui_config().port, 8181); assert_eq!(conf0.secretstore_config().unwrap().port, 8084); assert_eq!(conf0.secretstore_config().unwrap().http_port, 8083); assert_eq!(conf0.ipfs_config().port, 5002); @@ -1987,7 +1806,6 @@ mod tests { assert_eq!(conf1.network_settings().unwrap().rpc_port, 8545); assert_eq!(conf1.http_config().unwrap().port, 8545); assert_eq!(conf1.ws_config().unwrap().port, 8547); - assert_eq!(conf1.ui_config().port, 8181); assert_eq!(conf1.secretstore_config().unwrap().port, 8084); assert_eq!(conf1.secretstore_config().unwrap().http_port, 8083); assert_eq!(conf1.ipfs_config().port, 5002); @@ -2007,8 +1825,6 @@ mod tests { assert_eq!(&conf0.ws_config().unwrap().interface, "0.0.0.0"); assert_eq!(conf0.ws_config().unwrap().hosts, None); assert_eq!(conf0.ws_config().unwrap().origins, None); - assert_eq!(&conf0.ui_config().interface, "0.0.0.0"); - assert_eq!(conf0.ui_config().hosts, None); assert_eq!(&conf0.secretstore_config().unwrap().interface, "0.0.0.0"); assert_eq!(&conf0.secretstore_config().unwrap().http_interface, "0.0.0.0"); assert_eq!(&conf0.ipfs_config().interface, "0.0.0.0"); diff --git a/parity/dapps.rs b/parity/dapps.rs index 427bfa53b3..ce5b3a8daa 100644 --- a/parity/dapps.rs +++ b/parity/dapps.rs @@ -39,8 +39,6 @@ pub struct Configuration { pub enabled: bool, pub dapps_path: PathBuf, pub extra_dapps: Vec, - pub extra_embed_on: Vec<(String, u16)>, - pub extra_script_src: Vec<(String, u16)>, } impl Default for Configuration { @@ -50,8 +48,6 @@ impl Default for Configuration { enabled: true, dapps_path: replace_home(&data_dir, "$BASE/dapps").into(), extra_dapps: vec![], - extra_embed_on: vec![], - extra_script_src: vec![], } } } @@ -163,8 +159,6 @@ pub struct Dependencies { pub fetch: FetchClient, pub pool: CpuPool, pub signer: Arc, - pub ui_address: Option<(String, u16)>, - pub info_page_only: bool, } pub fn new(configuration: Configuration, deps: Dependencies) -> Result, String> { @@ -177,19 +171,6 @@ pub fn new(configuration: Configuration, deps: Dependencies) -> Result Result, String> { - if !enabled { - return Ok(None); - } - - server::ui_middleware( - deps, - rpc::DAPPS_DOMAIN, ).map(Some) } @@ -215,19 +196,10 @@ mod server { _dapps_path: PathBuf, _extra_dapps: Vec, _dapps_domain: &str, - _extra_embed_on: Vec<(String, u16)>, - _extra_script_src: Vec<(String, u16)>, ) -> Result { Err("Your Parity version has been compiled without WebApps support.".into()) } - pub fn ui_middleware( - _deps: Dependencies, - _dapps_domain: &str, - ) -> Result { - Err("Your Parity version has been compiled without UI support.".into()) - } - pub fn service(_: &Option) -> Option> { None } @@ -249,8 +221,6 @@ mod server { dapps_path: PathBuf, extra_dapps: Vec, dapps_domain: &str, - extra_embed_on: Vec<(String, u16)>, - extra_script_src: Vec<(String, u16)>, ) -> Result { let signer = deps.signer; let web_proxy_tokens = Arc::new(move |token| signer.web_proxy_access_token_domain(&token)); @@ -258,9 +228,6 @@ mod server { Ok(parity_dapps::Middleware::dapps( deps.pool, deps.node_health, - deps.ui_address, - extra_embed_on, - extra_script_src, dapps_path, extra_dapps, dapps_domain, @@ -271,21 +238,6 @@ mod server { )) } - pub fn ui_middleware( - deps: Dependencies, - dapps_domain: &str, - ) -> Result { - Ok(parity_dapps::Middleware::ui( - deps.pool, - deps.node_health, - dapps_domain, - deps.contract_client, - deps.sync_status, - deps.fetch, - deps.info_page_only, - )) - } - pub fn service(middleware: &Option) -> Option> { middleware.as_ref().map(|m| Arc::new(DappsServiceWrapper { endpoints: m.endpoints().clone(), diff --git a/parity/lib.rs b/parity/lib.rs index c768722552..8c3242afb4 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -118,15 +118,13 @@ mod user_defaults; mod whisper; mod db; -use std::net::{TcpListener}; use std::io::BufReader; use std::fs::File; -use ansi_term::Style; use hash::keccak_buffer; use cli::Args; use configuration::{Cmd, Execute}; use deprecated::find_deprecated; -use ethcore_logger::{Config as LogConfig, setup_log}; +use ethcore_logger::setup_log; pub use self::configuration::Configuration; pub use self::run::RunningClient; @@ -195,24 +193,6 @@ fn execute(command: Execute, on_client_rq: Cr, on_updater_rq: Rr) -> Res match command.cmd { Cmd::Run(run_cmd) => { - if run_cmd.ui_conf.enabled && !run_cmd.ui_conf.info_page_only { - warn!("{}", Style::new().bold().paint("Parity browser interface is deprecated. It's going to be removed in the next version, use standalone Parity UI instead.")); - warn!("{}", Style::new().bold().paint("Standalone Parity UI: https://github.com/Parity-JS/shell/releases")); - } - - if run_cmd.ui && run_cmd.dapps_conf.enabled { - // Check if Parity is already running - let addr = format!("{}:{}", run_cmd.ui_conf.interface, run_cmd.ui_conf.port); - if !TcpListener::bind(&addr as &str).is_ok() { - return open_ui(&run_cmd.ws_conf, &run_cmd.ui_conf, &run_cmd.logger_config).map(|_| ExecutionAction::Instant(None)); - } - } - - // start ui - if run_cmd.ui { - open_ui(&run_cmd.ws_conf, &run_cmd.ui_conf, &run_cmd.logger_config)?; - } - if let Some(ref dapp) = run_cmd.dapp { open_dapp(&run_cmd.dapps_conf, &run_cmd.http_conf, dapp)?; } @@ -225,7 +205,7 @@ fn execute(command: Execute, on_client_rq: Cr, on_updater_rq: Rr) -> Res Cmd::Account(account_cmd) => account::execute(account_cmd).map(|s| ExecutionAction::Instant(Some(s))), Cmd::ImportPresaleWallet(presale_cmd) => presale::execute(presale_cmd).map(|s| ExecutionAction::Instant(Some(s))), Cmd::Blockchain(blockchain_cmd) => blockchain::execute(blockchain_cmd).map(|_| ExecutionAction::Instant(None)), - Cmd::SignerToken(ws_conf, ui_conf, logger_config) => signer::execute(ws_conf, ui_conf, logger_config).map(|s| ExecutionAction::Instant(Some(s))), + Cmd::SignerToken(ws_conf, logger_config) => signer::execute(ws_conf, logger_config).map(|s| ExecutionAction::Instant(Some(s))), Cmd::SignerSign { id, pwfile, port, authfile } => rpc_cli::signer_sign(id, pwfile, port, authfile).map(|s| ExecutionAction::Instant(Some(s))), Cmd::SignerList { port, authfile } => rpc_cli::signer_list(port, authfile).map(|s| ExecutionAction::Instant(Some(s))), Cmd::SignerReject { id, port, authfile } => rpc_cli::signer_reject(id, port, authfile).map(|s| ExecutionAction::Instant(Some(s))), @@ -257,19 +237,6 @@ pub fn start(conf: Configuration, on_client_rq: Cr, on_updater_rq: Rr) - execute(conf.into_command()?, on_client_rq, on_updater_rq) } -fn open_ui(ws_conf: &rpc::WsConfiguration, ui_conf: &rpc::UiConfiguration, logger_config: &LogConfig) -> Result<(), String> { - if !ui_conf.enabled { - return Err("Cannot use UI command with UI turned off.".into()) - } - - let token = signer::generate_token_and_url(ws_conf, ui_conf, logger_config)?; - // Open a browser - url::open(&token.url).map_err(|e| format!("{}", e))?; - // Print a message - println!("{}", token.message); - Ok(()) -} - fn open_dapp(dapps_conf: &dapps::Configuration, rpc_conf: &rpc::HttpConfiguration, dapp: &str) -> Result<(), String> { if !dapps_conf.enabled { return Err("Cannot use DAPP command with Dapps turned off.".into()) diff --git a/parity/rpc.rs b/parity/rpc.rs index cdc8e7ca5b..3e71cc6295 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -68,58 +68,6 @@ impl Default for HttpConfiguration { } } -#[derive(Debug, PartialEq, Clone)] -pub struct UiConfiguration { - pub enabled: bool, - pub interface: String, - pub port: u16, - pub hosts: Option>, - pub info_page_only: bool, -} - -impl UiConfiguration { - pub fn address(&self) -> Option { - address(self.enabled, &self.interface, self.port, &self.hosts) - } - - pub fn redirection_address(&self) -> Option<(String, u16)> { - self.address().map(|host| { - let mut it = host.split(':'); - let hostname: Option = it.next().map(|s| s.to_owned()); - let port: Option = it.next().and_then(|s| s.parse().ok()); - - (hostname.unwrap_or_else(|| "localhost".into()), port.unwrap_or(8180)) - }) - } -} - -impl From for HttpConfiguration { - fn from(conf: UiConfiguration) -> Self { - HttpConfiguration { - enabled: conf.enabled, - interface: conf.interface, - port: conf.port, - apis: rpc_apis::ApiSet::UnsafeContext, - cors: Some(vec![]), - hosts: conf.hosts, - server_threads: 1, - processing_threads: 0, - } - } -} - -impl Default for UiConfiguration { - fn default() -> Self { - UiConfiguration { - enabled: cfg!(feature = "ui-enabled"), - port: 8180, - interface: "127.0.0.1".into(), - hosts: Some(vec![]), - info_page_only: true, - } - } -} - #[derive(Debug, PartialEq)] pub struct IpcConfiguration { pub enabled: bool, @@ -153,7 +101,6 @@ pub struct WsConfiguration { pub hosts: Option>, pub signer_path: PathBuf, pub support_token_api: bool, - pub ui_address: Option, pub dapps_address: Option, } @@ -170,7 +117,6 @@ impl Default for WsConfiguration { hosts: Some(Vec::new()), signer_path: replace_home(&data_dir, "$BASE/signer").into(), support_token_api: true, - ui_address: Some("127.0.0.1:8180".into()), dapps_address: Some("127.0.0.1:8545".into()), } } @@ -225,9 +171,8 @@ pub fn new_ws( }; let remote = deps.remote.clone(); - let ui_address = conf.ui_address.clone(); - let allowed_origins = into_domains(with_domain(conf.origins, domain, &ui_address, &conf.dapps_address)); - let allowed_hosts = into_domains(with_domain(conf.hosts, domain, &Some(url.clone().into()), &None)); + let allowed_origins = into_domains(with_domain(conf.origins, domain, &conf.dapps_address)); + let allowed_hosts = into_domains(with_domain(conf.hosts, domain, &Some(url.clone().into()))); let signer_path; let path = match conf.support_token_api { @@ -276,7 +221,7 @@ pub fn new_http( let remote = deps.remote.clone(); let cors_domains = into_domains(conf.cors); - let allowed_hosts = into_domains(with_domain(conf.hosts, domain, &Some(url.clone().into()), &None)); + let allowed_hosts = into_domains(with_domain(conf.hosts, domain, &Some(url.clone().into()))); let start_result = rpc::start_http( &addr, @@ -328,7 +273,7 @@ fn into_domains>(items: Option>) -> DomainsValidatio items.map(|vals| vals.into_iter().map(T::from).collect()).into() } -fn with_domain(items: Option>, domain: &str, ui_address: &Option, dapps_address: &Option) -> Option> { +fn with_domain(items: Option>, domain: &str, dapps_address: &Option) -> Option> { fn extract_port(s: &str) -> Option { s.split(':').nth(1).and_then(|s| s.parse().ok()) } @@ -347,7 +292,6 @@ fn with_domain(items: Option>, domain: &str, ui_address: &Option, - pub ui: bool, pub name: String, pub custom_bootnodes: bool, pub stratum: Option, @@ -185,7 +183,7 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc) -> Result) -> Result) -> Result) -> Result(cmd: RunCmd, logger: Arc, on_client_rq: execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, &cmd.compaction)?; // create dirs used by parity - cmd.dirs.create_dirs(cmd.dapps_conf.enabled, cmd.ui_conf.enabled, cmd.secretstore_conf.enabled)?; + cmd.dirs.create_dirs(cmd.dapps_conf.enabled, cmd.acc_conf.unlocked_accounts.len() == 0, cmd.secretstore_conf.enabled)?; // run in daemon mode if let Some(pid_file) = cmd.daemon { @@ -756,12 +750,9 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: fetch: fetch.clone(), pool: cpu_pool.clone(), signer: signer_service.clone(), - ui_address: cmd.ui_conf.redirection_address(), - info_page_only: cmd.ui_conf.info_page_only, }) }; let dapps_middleware = dapps::new(cmd.dapps_conf.clone(), dapps_deps.clone())?; - let ui_middleware = dapps::new_ui(cmd.ui_conf.enabled, dapps_deps)?; let dapps_service = dapps::service(&dapps_middleware); let deps_for_rpc_apis = Arc::new(rpc_apis::FullDependencies { @@ -807,8 +798,6 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: let ws_server = rpc::new_ws(cmd.ws_conf.clone(), &dependencies)?; let ipc_server = rpc::new_ipc(cmd.ipc_conf, &dependencies)?; let http_server = rpc::new_http("HTTP JSON-RPC", "jsonrpc", cmd.http_conf.clone(), &dependencies, dapps_middleware)?; - // the ui server - let ui_server = rpc::new_http("UI WALLET", "ui", cmd.ui_conf.clone().into(), &dependencies, ui_middleware)?; // secret store key server let secretstore_deps = secretstore::Dependencies { @@ -881,7 +870,7 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: informant, client, client_service: Arc::new(service), - keep_alive: Box::new((watcher, updater, ws_server, http_server, ipc_server, ui_server, secretstore_key_server, ipfs_server, event_loop)), + keep_alive: Box::new((watcher, updater, ws_server, http_server, ipc_server, secretstore_key_server, ipfs_server, event_loop)), } }) } diff --git a/parity/signer.rs b/parity/signer.rs index 4388e11aa8..e9a636bf8b 100644 --- a/parity/signer.rs +++ b/parity/signer.rs @@ -28,7 +28,6 @@ pub const CODES_FILENAME: &'static str = "authcodes"; pub struct NewToken { pub token: String, - pub url: String, pub message: String, } @@ -49,45 +48,26 @@ pub fn codes_path(path: &Path) -> PathBuf { p } -pub fn execute(ws_conf: rpc::WsConfiguration, ui_conf: rpc::UiConfiguration, logger_config: LogConfig) -> Result { - Ok(generate_token_and_url(&ws_conf, &ui_conf, &logger_config)?.message) +pub fn execute(ws_conf: rpc::WsConfiguration, logger_config: LogConfig) -> Result { + Ok(generate_token_and_url(&ws_conf, &logger_config)?.message) } -pub fn generate_token_and_url(ws_conf: &rpc::WsConfiguration, ui_conf: &rpc::UiConfiguration, logger_config: &LogConfig) -> Result { +pub fn generate_token_and_url(ws_conf: &rpc::WsConfiguration, logger_config: &LogConfig) -> Result { let code = generate_new_token(&ws_conf.signer_path, logger_config.color).map_err(|err| format!("Error generating token: {:?}", err))?; - let auth_url = format!("http://{}:{}/#/auth?token={}", ui_conf.interface, ui_conf.port, code); let colored = |s: String| match logger_config.color { true => format!("{}", White.bold().paint(s)), false => s, }; - if !ui_conf.enabled { - return Ok(NewToken { - token: code.clone(), - url: auth_url.clone(), - message: format!( - r#" -Generated token: -{} -"#, - colored(code) - ), - }) - } - - // And print in to the console Ok(NewToken { token: code.clone(), - url: auth_url.clone(), message: format!( r#" -Open: {} -to authorize your browser. -Or use the generated token: -{}"#, - colored(auth_url), - code - ) +Generated token: +{} +"#, + colored(code) + ), }) } -- GitLab From 107f0fa4c6738e857e0d14fbe26648bb44d82555 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Wed, 6 Jun 2018 14:14:45 +0200 Subject: [PATCH 014/191] Removed obsolete IpcMode enum (#8819) --- ethcore/src/client/client.rs | 11 +++++------ ethcore/src/client/config.rs | 23 ---------------------- ethcore/src/client/test_client.rs | 3 +-- ethcore/src/client/traits.rs | 2 +- ethcore/types/src/lib.rs | 1 - ethcore/types/src/mode.rs | 32 ------------------------------- rpc/src/v1/impls/parity.rs | 8 +------- rpc/src/v1/impls/parity_set.rs | 8 ++++---- 8 files changed, 12 insertions(+), 76 deletions(-) delete mode 100644 ethcore/types/src/mode.rs diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index f3a3dda103..3f19f491ba 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -72,7 +72,6 @@ use trace; use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase}; use transaction::{self, LocalizedTransaction, UnverifiedTransaction, SignedTransaction, Transaction, Action}; use types::filter::Filter; -use types::mode::Mode as IpcMode; use types::ancestry_action::AncestryAction; use verification; use verification::{PreverifiedBlock, Verifier}; @@ -1570,19 +1569,19 @@ impl BlockChainClient for Client { }))) } - fn mode(&self) -> IpcMode { + fn mode(&self) -> Mode { let r = self.mode.lock().clone().into(); trace!(target: "mode", "Asked for mode = {:?}. returning {:?}", &*self.mode.lock(), r); r } fn disable(&self) { - self.set_mode(IpcMode::Off); + self.set_mode(Mode::Off); self.enabled.store(false, AtomicOrdering::Relaxed); self.clear_queue(); } - fn set_mode(&self, new_mode: IpcMode) { + fn set_mode(&self, new_mode: Mode) { trace!(target: "mode", "Client::set_mode({:?})", new_mode); if !self.enabled.load(AtomicOrdering::Relaxed) { return; @@ -1597,8 +1596,8 @@ impl BlockChainClient for Client { } } match new_mode { - IpcMode::Active => self.wake_up(), - IpcMode::Off => self.sleep(), + Mode::Active => self.wake_up(), + Mode::Off => self.sleep(), _ => {(*self.sleep_state.lock()).last_activity = Some(Instant::now()); } } } diff --git a/ethcore/src/client/config.rs b/ethcore/src/client/config.rs index 288de25e4b..dbba4f4a96 100644 --- a/ethcore/src/client/config.rs +++ b/ethcore/src/client/config.rs @@ -17,7 +17,6 @@ use std::str::FromStr; use std::fmt::{Display, Formatter, Error as FmtError}; -use mode::Mode as IpcMode; use verification::{VerifierType, QueueConfig}; use journaldb; @@ -88,28 +87,6 @@ impl Display for Mode { } } -impl Into for Mode { - fn into(self) -> IpcMode { - match self { - Mode::Off => IpcMode::Off, - Mode::Dark(timeout) => IpcMode::Dark(timeout.as_secs()), - Mode::Passive(timeout, alarm) => IpcMode::Passive(timeout.as_secs(), alarm.as_secs()), - Mode::Active => IpcMode::Active, - } - } -} - -impl From for Mode { - fn from(mode: IpcMode) -> Self { - match mode { - IpcMode::Off => Mode::Off, - IpcMode::Dark(timeout) => Mode::Dark(Duration::from_secs(timeout)), - IpcMode::Passive(timeout, alarm) => Mode::Passive(Duration::from_secs(timeout), Duration::from_secs(alarm)), - IpcMode::Active => Mode::Active, - } - } -} - /// Client configuration. Includes configs for all sub-systems. #[derive(Debug, PartialEq, Default)] pub struct ClientConfig { diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 8acbde4f97..4bd76b4495 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -36,7 +36,7 @@ use transaction::{self, Transaction, LocalizedTransaction, SignedTransaction, Ac use blockchain::{TreeRoute, BlockReceipts}; use client::{ Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, CallContract, TransactionInfo, RegistryInfo, - PrepareOpenBlock, BlockChainClient, BlockChainInfo, BlockStatus, BlockId, + PrepareOpenBlock, BlockChainClient, BlockChainInfo, BlockStatus, BlockId, Mode, TransactionId, UncleId, TraceId, TraceFilter, LastHashes, CallAnalytics, BlockImportError, ProvingBlockChainClient, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, Call, StateClient, EngineInfo, AccountData, BlockChain, BlockProducer, SealedBlockImporter, IoClient @@ -51,7 +51,6 @@ use vm::Schedule; use miner::{Miner, MinerService}; use spec::Spec; use types::basic_account::BasicAccount; -use types::mode::Mode; use types::pruning_info::PruningInfo; use verification::queue::QueueInfo; diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index f0fae4b498..d3a20dcff8 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -21,6 +21,7 @@ use itertools::Itertools; use block::{OpenBlock, SealedBlock, ClosedBlock}; use blockchain::TreeRoute; +use client::Mode; use encoded; use vm::LastHashes; use error::{ImportResult, CallError, BlockImportError}; @@ -48,7 +49,6 @@ use types::trace_filter::Filter as TraceFilter; use types::call_analytics::CallAnalytics; use types::blockchain_info::BlockChainInfo; use types::block_status::BlockStatus; -use types::mode::Mode; use types::pruning_info::PruningInfo; /// State information to be used during client query diff --git a/ethcore/types/src/lib.rs b/ethcore/types/src/lib.rs index 8db6163bbf..5ac8ff12ad 100644 --- a/ethcore/types/src/lib.rs +++ b/ethcore/types/src/lib.rs @@ -36,7 +36,6 @@ pub mod call_analytics; pub mod filter; pub mod ids; pub mod log_entry; -pub mod mode; pub mod pruning_info; pub mod receipt; pub mod restoration_status; diff --git a/ethcore/types/src/mode.rs b/ethcore/types/src/mode.rs deleted file mode 100644 index ee4f9fbf2c..0000000000 --- a/ethcore/types/src/mode.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Mode type - -pub use std::time::Duration; - -/// IPC-capable shadow-type for `client::config::Mode` -#[derive(Clone, Debug)] -pub enum Mode { - /// Same as `ClientMode::Off`. - Off, - /// Same as `ClientMode::Dark`; values in seconds. - Dark(u64), - /// Same as `ClientMode::Passive`; values in seconds. - Passive(u64, u64), - /// Same as `ClientMode::Active`. - Active, -} diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index 5707104212..f18723eafe 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -30,7 +30,6 @@ use ethcore::account_provider::AccountProvider; use ethcore::client::{BlockChainClient, StateClient, Call}; use ethcore::ids::BlockId; use ethcore::miner::{self, MinerService}; -use ethcore::mode::Mode; use ethcore::state::StateInfo; use ethcore_logger::RotatingLogger; use node_health::{NodeHealth, Health}; @@ -365,12 +364,7 @@ impl Parity for ParityClient where } fn mode(&self) -> Result { - Ok(match self.client.mode() { - Mode::Off => "offline", - Mode::Dark(..) => "dark", - Mode::Passive(..) => "passive", - Mode::Active => "active", - }.into()) + Ok(self.client.mode().to_string()) } fn enode(&self) -> Result { diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index 4ba9ab658e..18f5776c69 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -17,10 +17,10 @@ /// Parity-specific rpc interface for operations altering the settings. use std::io; use std::sync::Arc; +use std::time::Duration; -use ethcore::client::BlockChainClient; +use ethcore::client::{BlockChainClient, Mode}; use ethcore::miner::MinerService; -use ethcore::mode::Mode; use sync::ManageNetwork; use fetch::{self, Fetch}; use futures_cpupool::CpuPool; @@ -160,8 +160,8 @@ impl ParitySet for ParitySetClient where fn set_mode(&self, mode: String) -> Result { self.client.set_mode(match mode.as_str() { "offline" => Mode::Off, - "dark" => Mode::Dark(300), - "passive" => Mode::Passive(300, 3600), + "dark" => Mode::Dark(Duration::from_secs(300)), + "passive" => Mode::Passive(Duration::from_secs(300), Duration::from_secs(3600)), "active" => Mode::Active, e => { return Err(errors::invalid_params("mode", e.to_owned())); }, }); -- GitLab From bc2f86e806f70d23c1b5123c43be0d4cc73819bc Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Wed, 6 Jun 2018 14:15:13 +0200 Subject: [PATCH 015/191] parity: fix indentation in sync logging (#8794) --- parity/informant.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parity/informant.rs b/parity/informant.rs index 43788bc9d9..1840be3bad 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -304,7 +304,7 @@ impl Informant { paint(White.bold(), format!("{}", chain_info.best_block_hash)), if self.target.executes_transactions() { format!("{} blk/s {} tx/s {} Mgas/s", - paint(Yellow.bold(), format!("{:5.2}", (client_report.blocks_imported * 1000) as f64 / elapsed.as_milliseconds() as f64)), + paint(Yellow.bold(), format!("{:7.2}", (client_report.blocks_imported * 1000) as f64 / elapsed.as_milliseconds() as f64)), paint(Yellow.bold(), format!("{:6.1}", (client_report.transactions_applied * 1000) as f64 / elapsed.as_milliseconds() as f64)), paint(Yellow.bold(), format!("{:4}", (client_report.gas_processed / From::from(elapsed.as_milliseconds() * 1000)).low_u64())) ) -- GitLab From 1318f536c9d13acc1740b401e304e9b88a540d87 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Wed, 6 Jun 2018 15:45:55 +0200 Subject: [PATCH 016/191] CI: Fix docker tags (#8822) * scripts: enable docker builds for beta and stable * scripts: docker latest should be beta not master * scripts: docker latest is master --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6be6b45838..d4add41721 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -201,6 +201,8 @@ docker-build: stage: build only: - tags + - beta + - stable - triggers before_script: - docker info -- GitLab From c8877d40989fa69822b7c4764af7e67ddb4cfb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Thu, 7 Jun 2018 10:15:21 +0100 Subject: [PATCH 017/191] ethcore: fix ancient block error msg handling (#8832) --- ethcore/src/client/client.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 3f19f491ba..ea8fa88630 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -2073,15 +2073,16 @@ impl IoClient for Client { let first = queued.write().1.pop_front(); if let Some((header, block_bytes, receipts_bytes)) = first { let hash = header.hash(); - client.importer.import_old_block( + let result = client.importer.import_old_block( &header, &block_bytes, &receipts_bytes, &**client.db.read(), - &*client.chain.read() - ).ok().map_or((), |e| { + &*client.chain.read(), + ); + if let Err(e) = result { error!(target: "client", "Error importing ancient block: {}", e); - }); + } // remove from pending queued.write().0.remove(&hash); } else { -- GitLab From a6d267abc04bd268a7c9330a9b225244b36f5e5c Mon Sep 17 00:00:00 2001 From: Alex Baranov Date: Thu, 7 Jun 2018 10:47:41 -0400 Subject: [PATCH 018/191] added from and to to Receipt (#8756) --- ethcore/src/client/client.rs | 10 ++++++++++ ethcore/types/src/receipt.rs | 6 +++++- rpc/src/v1/tests/mocked/eth.rs | 6 ++++-- rpc/src/v1/types/receipt.rs | 14 +++++++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index ea8fa88630..2d0201067f 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -2336,6 +2336,11 @@ fn transaction_receipt(machine: &::machine::EthereumMachine, mut tx: LocalizedTr let transaction_index = tx.transaction_index; LocalizedReceipt { + from: sender, + to: match tx.action { + Action::Create => None, + Action::Call(ref address) => Some(address.clone().into()) + }, transaction_hash: transaction_hash, transaction_index: transaction_index, block_hash: block_hash, @@ -2461,6 +2466,11 @@ mod tests { // then assert_eq!(receipt, LocalizedReceipt { + from: tx1.sender().into(), + to: match tx1.action { + Action::Create => None, + Action::Call(ref address) => Some(address.clone().into()) + }, transaction_hash: tx1.hash(), transaction_index: 1, block_hash: block_hash, diff --git a/ethcore/types/src/receipt.rs b/ethcore/types/src/receipt.rs index b4f105afab..81233d212a 100644 --- a/ethcore/types/src/receipt.rs +++ b/ethcore/types/src/receipt.rs @@ -16,7 +16,7 @@ //! Receipt -use ethereum_types::{H256, U256, Address, Bloom}; +use ethereum_types::{H160, H256, U256, Address, Bloom}; use heapsize::HeapSizeOf; use rlp::{Rlp, RlpStream, Encodable, Decodable, DecoderError}; @@ -157,6 +157,10 @@ pub struct LocalizedReceipt { pub log_bloom: Bloom, /// Transaction outcome. pub outcome: TransactionOutcome, + /// Receiver address + pub to: Option, + /// Sender + pub from: H160 } #[cfg(test)] diff --git a/rpc/src/v1/tests/mocked/eth.rs b/rpc/src/v1/tests/mocked/eth.rs index a8875a3354..c0ed3306fe 100644 --- a/rpc/src/v1/tests/mocked/eth.rs +++ b/rpc/src/v1/tests/mocked/eth.rs @@ -19,7 +19,7 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::{Instant, Duration, SystemTime, UNIX_EPOCH}; -use ethereum_types::{H256, U256, Address}; +use ethereum_types::{H160, H256, U256, Address}; use parking_lot::Mutex; use ethcore::account_provider::AccountProvider; use ethcore::client::{BlockChainClient, BlockId, EachBlockWith, Executed, TestBlockChainClient, TransactionId}; @@ -1004,6 +1004,8 @@ fn rpc_eth_send_raw_transaction() { #[test] fn rpc_eth_transaction_receipt() { let receipt = LocalizedReceipt { + from: H160::from_str("b60e8dd61c5d32be8058bb8eb970870f07233155").unwrap(), + to: Some(H160::from_str("d46e8dd67c5d32be8058bb8eb970870f07244567").unwrap()), transaction_hash: H256::zero(), transaction_index: 0, block_hash: H256::from_str("ed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5").unwrap(), @@ -1041,7 +1043,7 @@ fn rpc_eth_transaction_receipt() { "params": ["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"], "id": 1 }"#; - let response = r#"{"jsonrpc":"2.0","result":{"blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","contractAddress":null,"cumulativeGasUsed":"0x20","gasUsed":"0x10","logs":[{"address":"0x33990122638b9132ca29c723bdf037f1a891a70c","blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","data":"0x","logIndex":"0x1","topics":["0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc","0x4861736852656700000000000000000000000000000000000000000000000000"],"transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0","transactionLogIndex":"0x0","type":"mined"}],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","root":"0x0000000000000000000000000000000000000000000000000000000000000000","status":null,"transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0"},"id":1}"#; + let response = r#"{"jsonrpc":"2.0","result":{"blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","contractAddress":null,"cumulativeGasUsed":"0x20","from":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","gasUsed":"0x10","logs":[{"address":"0x33990122638b9132ca29c723bdf037f1a891a70c","blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","data":"0x","logIndex":"0x1","topics":["0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc","0x4861736852656700000000000000000000000000000000000000000000000000"],"transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0","transactionLogIndex":"0x0","type":"mined"}],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","root":"0x0000000000000000000000000000000000000000000000000000000000000000","status":null,"to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0"},"id":1}"#; assert_eq!(tester.io.handle_request_sync(request), Some(response.to_owned())); } diff --git a/rpc/src/v1/types/receipt.rs b/rpc/src/v1/types/receipt.rs index f8d111887a..e46b640f14 100644 --- a/rpc/src/v1/types/receipt.rs +++ b/rpc/src/v1/types/receipt.rs @@ -29,6 +29,10 @@ pub struct Receipt { /// Block hash #[serde(rename="blockHash")] pub block_hash: Option, + /// Sender + pub from: Option, + /// Recipient + pub to: Option, /// Block number #[serde(rename="blockNumber")] pub block_number: Option, @@ -73,6 +77,8 @@ impl Receipt { impl From for Receipt { fn from(r: LocalizedReceipt) -> Self { Receipt { + to: r.to.map(Into::into), + from: Some(r.from.into()), transaction_hash: Some(r.transaction_hash.into()), transaction_index: Some(r.transaction_index.into()), block_hash: Some(r.block_hash.into()), @@ -91,6 +97,8 @@ impl From for Receipt { impl From for Receipt { fn from(r: RichReceipt) -> Self { Receipt { + from: None, + to: None, transaction_hash: Some(r.transaction_hash.into()), transaction_index: Some(r.transaction_index.into()), block_hash: None, @@ -109,6 +117,8 @@ impl From for Receipt { impl From for Receipt { fn from(r: EthReceipt) -> Self { Receipt { + from: None, + to: None, transaction_hash: None, transaction_index: None, block_hash: None, @@ -131,9 +141,11 @@ mod tests { #[test] fn receipt_serialization() { - let s = r#"{"transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0","blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","cumulativeGasUsed":"0x20","gasUsed":"0x10","contractAddress":null,"logs":[{"address":"0x33990122638b9132ca29c723bdf037f1a891a70c","topics":["0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc","0x4861736852656700000000000000000000000000000000000000000000000000"],"data":"0x","blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0","logIndex":"0x1","transactionLogIndex":null,"type":"mined"}],"root":"0x000000000000000000000000000000000000000000000000000000000000000a","logsBloom":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f","status":"0x1"}"#; + let s = r#"{"transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0","blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","from":null,"to":null,"blockNumber":"0x4510c","cumulativeGasUsed":"0x20","gasUsed":"0x10","contractAddress":null,"logs":[{"address":"0x33990122638b9132ca29c723bdf037f1a891a70c","topics":["0xa6697e974e6a320f454390be03f74955e8978f1a6971ea6730542e37b66179bc","0x4861736852656700000000000000000000000000000000000000000000000000"],"data":"0x","blockHash":"0xed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5","blockNumber":"0x4510c","transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionIndex":"0x0","logIndex":"0x1","transactionLogIndex":null,"type":"mined"}],"root":"0x000000000000000000000000000000000000000000000000000000000000000a","logsBloom":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f","status":"0x1"}"#; let receipt = Receipt { + from: None, + to: None, transaction_hash: Some(0.into()), transaction_index: Some(0.into()), block_hash: Some("ed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5".parse().unwrap()), -- GitLab From 24c43513a64a9795129c35ee95c6e1db30012f2b Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 7 Jun 2018 17:48:01 +0300 Subject: [PATCH 019/191] Use system allocator when profiling memory (#8831) --- Cargo.toml | 7 +++++++ parity/lib.rs | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 7795fb3b3b..8df37d5942 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,6 +98,13 @@ slow-blocks = ["ethcore/slow-blocks"] secretstore = ["ethcore-secretstore"] final = ["parity-version/final"] deadlock_detection = ["parking_lot/deadlock_detection"] +# to create a memory profile (requires nightly rust), use e.g. +# `heaptrack /path/to/parity `, +# to visualize a memory profile, use `heaptrack_gui` +# or +# `valgrind --tool=massif /path/to/parity ` +# and `massif-visualizer` for visualization +memory_profiling = [] [lib] path = "parity/lib.rs" diff --git a/parity/lib.rs b/parity/lib.rs index 8c3242afb4..5d0c80289d 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -17,6 +17,7 @@ //! Ethcore client application. #![warn(missing_docs)] +#![cfg_attr(feature = "memory_profiling", feature(alloc_system, global_allocator, allocator_api))] extern crate ansi_term; extern crate docopt; @@ -91,6 +92,9 @@ extern crate pretty_assertions; #[cfg(test)] extern crate tempdir; +#[cfg(feature = "memory_profiling")] +extern crate alloc_system; + mod account; mod blockchain; mod cache; @@ -125,10 +129,16 @@ use cli::Args; use configuration::{Cmd, Execute}; use deprecated::find_deprecated; use ethcore_logger::setup_log; +#[cfg(feature = "memory_profiling")] +use alloc_system::System; pub use self::configuration::Configuration; pub use self::run::RunningClient; +#[cfg(feature = "memory_profiling")] +#[global_allocator] +static A: System = System; + fn print_hash_of(maybe_file: Option) -> Result { if let Some(file) = maybe_file { let mut f = BufReader::new(File::open(&file).map_err(|_| "Unable to open file".to_owned())?); -- GitLab From a48ed024333df586e64c0648e52b297cb1c8583f Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Fri, 8 Jun 2018 11:04:12 +0300 Subject: [PATCH 020/191] Fix `deadlock_detection` feature branch compilation (#8824) --- parity/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/parity/lib.rs b/parity/lib.rs index 5d0c80289d..a4f7d7963f 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -154,6 +154,7 @@ fn run_deadlock_detection_thread() { use std::thread; use std::time::Duration; use parking_lot::deadlock; + use ansi_term::Style; info!("Starting deadlock detection thread."); // Create a background thread which checks for deadlocks every 10s -- GitLab From 13efb6586dde45fba7a28a95d3a15e3f3981e680 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 8 Jun 2018 14:54:23 +0100 Subject: [PATCH 021/191] Specify critical release flag per network (#8821) --- util/version/Cargo.toml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/util/version/Cargo.toml b/util/version/Cargo.toml index 297211b2bd..c7bd4f581e 100644 --- a/util/version/Cargo.toml +++ b/util/version/Cargo.toml @@ -12,14 +12,13 @@ build = "build.rs" # Used by auto-updater and for Parity version string. track = "nightly" -# Indicates a critical release in this track (i.e. consensus issue) -critical = false - -# Latest supported fork blocks for various networks. Used ONLY by auto-updater. -[package.metadata.forks] -foundation = 4370000 -ropsten = 10 -kovan = 6600000 +# Network specific settings, used ONLY by auto-updater. +# Latest supported fork blocks. +# Indicates a critical release in this track (i.e. consensus issue). +[package.metadata.networks] +foundation = { forkBlock = 4370000, critical = false } +ropsten = { forkBlock = 10, critical = false } +kovan = { forkBlock = 6600000, critical = false } [dependencies] ethcore-bytes = { path = "../bytes" } -- GitLab From 1f39a1bd768ae8b490068313bb41ca78bccf964b Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 8 Jun 2018 16:30:44 +0200 Subject: [PATCH 022/191] Fixed AuthorityRound deadlock on shutdown, closes #8088 (#8803) --- ethcore/src/engines/authority_round/mod.rs | 90 ++++++++++++---------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/ethcore/src/engines/authority_round/mod.rs b/ethcore/src/engines/authority_round/mod.rs index 067c754c7f..e2e88c8178 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -382,12 +382,16 @@ impl Decodable for SealedEmptyStep { } } +struct PermissionedStep { + inner: Step, + can_propose: AtomicBool, +} + /// Engine using `AuthorityRound` proof-of-authority BFT consensus. pub struct AuthorityRound { transition_service: IoService<()>, - step: Arc, - can_propose: AtomicBool, - client: RwLock>>, + step: Arc, + client: Arc>>>, signer: RwLock, validators: Box, validate_score_transition: u64, @@ -407,7 +411,7 @@ pub struct AuthorityRound { // header-chain validator. struct EpochVerifier { - step: Arc, + step: Arc, subchain_validators: SimpleList, empty_steps_transition: u64, } @@ -415,7 +419,7 @@ struct EpochVerifier { impl super::EpochVerifier for EpochVerifier { fn verify_light(&self, header: &Header) -> Result<(), Error> { // Validate the timestamp - verify_timestamp(&*self.step, header_step(header, self.empty_steps_transition)?)?; + verify_timestamp(&self.step.inner, header_step(header, self.empty_steps_transition)?)?; // always check the seal since it's fast. // nothing heavier to do. verify_external(header, &self.subchain_validators, self.empty_steps_transition) @@ -615,13 +619,15 @@ impl AuthorityRound { let engine = Arc::new( AuthorityRound { transition_service: IoService::<()>::start()?, - step: Arc::new(Step { - inner: AtomicUsize::new(initial_step), - calibrate: our_params.start_step.is_none(), - duration: our_params.step_duration, + step: Arc::new(PermissionedStep { + inner: Step { + inner: AtomicUsize::new(initial_step), + calibrate: our_params.start_step.is_none(), + duration: our_params.step_duration, + }, + can_propose: AtomicBool::new(true), }), - can_propose: AtomicBool::new(true), - client: RwLock::new(None), + client: Arc::new(RwLock::new(None)), signer: Default::default(), validators: our_params.validators, validate_score_transition: our_params.validate_score_transition, @@ -641,7 +647,10 @@ impl AuthorityRound { // Do not initialize timeouts for tests. if should_timeout { - let handler = TransitionHandler { engine: Arc::downgrade(&engine) }; + let handler = TransitionHandler { + step: engine.step.clone(), + client: engine.client.clone(), + }; engine.transition_service.register_handler(Arc::new(handler))?; } Ok(engine) @@ -666,7 +675,7 @@ impl AuthorityRound { } fn generate_empty_step(&self, parent_hash: &H256) { - let step = self.step.load(); + let step = self.step.inner.load(); let empty_step_rlp = empty_step_rlp(step, parent_hash); if let Ok(signature) = self.sign(keccak(&empty_step_rlp)).map(Into::into) { @@ -698,34 +707,37 @@ fn unix_now() -> Duration { } struct TransitionHandler { - engine: Weak, + step: Arc, + client: Arc>>>, } const ENGINE_TIMEOUT_TOKEN: TimerToken = 23; impl IoHandler<()> for TransitionHandler { fn initialize(&self, io: &IoContext<()>) { - if let Some(engine) = self.engine.upgrade() { - let remaining = engine.step.duration_remaining().as_millis(); - io.register_timer_once(ENGINE_TIMEOUT_TOKEN, Duration::from_millis(remaining)) - .unwrap_or_else(|e| warn!(target: "engine", "Failed to start consensus step timer: {}.", e)) - } + let remaining = self.step.inner.duration_remaining().as_millis(); + io.register_timer_once(ENGINE_TIMEOUT_TOKEN, Duration::from_millis(remaining)) + .unwrap_or_else(|e| warn!(target: "engine", "Failed to start consensus step timer: {}.", e)) } fn timeout(&self, io: &IoContext<()>, timer: TimerToken) { if timer == ENGINE_TIMEOUT_TOKEN { - if let Some(engine) = self.engine.upgrade() { - // NOTE we might be lagging by couple of steps in case the timeout - // has not been called fast enough. - // Make sure to advance up to the actual step. - while engine.step.duration_remaining().as_millis() == 0 { - engine.step(); + // NOTE we might be lagging by couple of steps in case the timeout + // has not been called fast enough. + // Make sure to advance up to the actual step. + while self.step.inner.duration_remaining().as_millis() == 0 { + self.step.inner.increment(); + self.step.can_propose.store(true, AtomicOrdering::SeqCst); + if let Some(ref weak) = *self.client.read() { + if let Some(c) = weak.upgrade() { + c.update_sealing(); + } } - - let next_run_at = engine.step.duration_remaining().as_millis() >> 2; - io.register_timer_once(ENGINE_TIMEOUT_TOKEN, Duration::from_millis(next_run_at)) - .unwrap_or_else(|e| warn!(target: "engine", "Failed to restart consensus step timer: {}.", e)) } + + let next_run_at = self.step.inner.duration_remaining().as_millis() >> 2; + io.register_timer_once(ENGINE_TIMEOUT_TOKEN, Duration::from_millis(next_run_at)) + .unwrap_or_else(|e| warn!(target: "engine", "Failed to restart consensus step timer: {}.", e)) } } } @@ -742,8 +754,8 @@ impl Engine for AuthorityRound { } fn step(&self) { - self.step.increment(); - self.can_propose.store(true, AtomicOrdering::SeqCst); + self.step.inner.increment(); + self.step.can_propose.store(true, AtomicOrdering::SeqCst); if let Some(ref weak) = *self.client.read() { if let Some(c) = weak.upgrade() { c.update_sealing(); @@ -790,7 +802,7 @@ impl Engine for AuthorityRound { fn populate_from_parent(&self, header: &mut Header, parent: &Header) { let parent_step = header_step(parent, self.empty_steps_transition).expect("Header has been verified; qed"); - let current_step = self.step.load(); + let current_step = self.step.inner.load(); let current_empty_steps_len = if header.number() >= self.empty_steps_transition { self.empty_steps(parent_step.into(), current_step.into(), parent.hash()).len() @@ -816,7 +828,7 @@ impl Engine for AuthorityRound { let empty_step: EmptyStep = rlp.as_val().map_err(fmt_err)?;; if empty_step.verify(&*self.validators).unwrap_or(false) { - if self.step.check_future(empty_step.step).is_ok() { + if self.step.inner.check_future(empty_step.step).is_ok() { trace!(target: "engine", "handle_message: received empty step message {:?}", empty_step); self.handle_empty_step_message(empty_step); } else { @@ -836,7 +848,7 @@ impl Engine for AuthorityRound { fn generate_seal(&self, block: &ExecutedBlock, parent: &Header) -> Seal { // first check to avoid generating signature most of the time // (but there's still a race to the `compare_and_swap`) - if !self.can_propose.load(AtomicOrdering::SeqCst) { + if !self.step.can_propose.load(AtomicOrdering::SeqCst) { trace!(target: "engine", "Aborting seal generation. Can't propose."); return Seal::None; } @@ -845,7 +857,7 @@ impl Engine for AuthorityRound { let parent_step: U256 = header_step(parent, self.empty_steps_transition) .expect("Header has been verified; qed").into(); - let step = self.step.load(); + let step = self.step.inner.load(); // filter messages from old and future steps and different parents let empty_steps = if header.number() >= self.empty_steps_transition { @@ -922,7 +934,7 @@ impl Engine for AuthorityRound { trace!(target: "engine", "generate_seal: Issuing a block for step {}.", step); // only issue the seal if we were the first to reach the compare_and_swap. - if self.can_propose.compare_and_swap(true, false, AtomicOrdering::SeqCst) { + if self.step.can_propose.compare_and_swap(true, false, AtomicOrdering::SeqCst) { self.clear_empty_steps(parent_step); @@ -999,7 +1011,7 @@ impl Engine for AuthorityRound { .decode()?; let parent_step = header_step(&parent, self.empty_steps_transition)?; - let current_step = self.step.load(); + let current_step = self.step.inner.load(); self.empty_steps(parent_step.into(), current_step.into(), parent.hash()) } else { // we're verifying a block, extract empty steps from the seal @@ -1052,7 +1064,7 @@ impl Engine for AuthorityRound { // If yes then probably benign reporting needs to be moved further in the verification. let set_number = header.number(); - match verify_timestamp(&*self.step, header_step(header, self.empty_steps_transition)?) { + match verify_timestamp(&self.step.inner, header_step(header, self.empty_steps_transition)?) { Err(BlockError::InvalidSeal) => { self.validators.report_benign(header.author(), set_number, header.number()); Err(BlockError::InvalidSeal.into()) @@ -1294,7 +1306,7 @@ impl Engine for AuthorityRound { // This way, upon encountering an epoch change, the proposer from the // new set will be forced to wait until the next step to avoid sealing a // block that breaks the invariant that the parent's step < the block's step. - self.can_propose.store(false, AtomicOrdering::SeqCst); + self.step.can_propose.store(false, AtomicOrdering::SeqCst); return Some(combine_proofs(signal_number, &pending.proof, &*finality_proof)); } } -- GitLab From 13bc922e546351e962c414b8adcf59eeb1041753 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Fri, 8 Jun 2018 07:31:48 -0700 Subject: [PATCH 023/191] devp2p: Move UDP socket handling from Discovery to Host. (#8790) * devp2p: Move UDP socket handling from Discovery to Host. * devp2p: Fix bug with potentially incorrect UDP registration. This works right now because the Host handler happens to be the first one registered on the IoService. * devp2p: Use 0-initialized memory buffer instead of unsafe. * Remove send_queue field from public interface of Discovery. * Rename Datagramm to Datagram. sed -i 's/Datagramm/Datagram/g' util/network-devp2p/src/discovery.rs util/network-devp2p/src/host.rs sed -i 's/datagramm/datagram/g' util/network-devp2p/src/discovery.rs util/network-devp2p/src/host.rs * Include target in log statements. --- util/network-devp2p/src/discovery.rs | 122 ++++++++------------------- util/network-devp2p/src/host.rs | 107 +++++++++++++++++++---- 2 files changed, 125 insertions(+), 104 deletions(-) diff --git a/util/network-devp2p/src/discovery.rs b/util/network-devp2p/src/discovery.rs index 8e8a3d6cc6..b7cce2832f 100644 --- a/util/network-devp2p/src/discovery.rs +++ b/util/network-devp2p/src/discovery.rs @@ -17,18 +17,13 @@ use ethcore_bytes::Bytes; use std::net::SocketAddr; use std::collections::{HashSet, HashMap, VecDeque}; -use std::mem; use std::default::Default; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; -use mio::*; -use mio::deprecated::{Handler, EventLoop}; -use mio::udp::*; use hash::keccak; use ethereum_types::{H256, H520}; use rlp::{Rlp, RlpStream, encode_list}; use node_table::*; use network::{Error, ErrorKind}; -use io::{StreamToken, IoContext}; use ethkey::{Secret, KeyPair, sign, recover}; use network::IpFilter; @@ -39,7 +34,7 @@ const ADDRESS_BITS: usize = 8 * ADDRESS_BYTES_SIZE; // Denoted by n in [Kademl const DISCOVERY_MAX_STEPS: u16 = 8; // Max iterations of discovery. (discover) const BUCKET_SIZE: usize = 16; // Denoted by k in [Kademlia]. Number of nodes stored in each bucket. const ALPHA: usize = 3; // Denoted by \alpha in [Kademlia]. Number of concurrent FindNode requests. -const MAX_DATAGRAM_SIZE: usize = 1280; +pub const MAX_DATAGRAM_SIZE: usize = 1280; const PACKET_PING: u8 = 1; const PACKET_PONG: u8 = 2; @@ -79,9 +74,9 @@ impl NodeBucket { } } -struct Datagramm { - payload: Bytes, - address: SocketAddr, +pub struct Datagram { + pub payload: Bytes, + pub address: SocketAddr, } pub struct Discovery { @@ -89,13 +84,11 @@ pub struct Discovery { id_hash: H256, secret: Secret, public_endpoint: NodeEndpoint, - udp_socket: UdpSocket, - token: StreamToken, discovery_round: u16, discovery_id: NodeId, discovery_nodes: HashSet, node_buckets: Vec, - send_queue: VecDeque, + send_queue: VecDeque, check_timestamps: bool, adding_nodes: Vec, ip_filter: IpFilter, @@ -107,19 +100,16 @@ pub struct TableUpdates { } impl Discovery { - pub fn new(key: &KeyPair, listen: SocketAddr, public: NodeEndpoint, token: StreamToken, ip_filter: IpFilter) -> Discovery { - let socket = UdpSocket::bind(&listen).expect("Error binding UDP socket"); + pub fn new(key: &KeyPair, public: NodeEndpoint, ip_filter: IpFilter) -> Discovery { Discovery { id: key.public().clone(), id_hash: keccak(key.public()), secret: key.secret().clone(), public_endpoint: public, - token: token, discovery_round: 0, discovery_id: NodeId::new(), discovery_nodes: HashSet::new(), node_buckets: (0..ADDRESS_BITS).map(|_| NodeBucket::new()).collect(), - udp_socket: socket, send_queue: VecDeque::new(), check_timestamps: true, adding_nodes: Vec::new(), @@ -352,53 +342,12 @@ impl Discovery { ret } - pub fn writable(&mut self, io: &IoContext) where Message: Send + Sync + Clone { - while let Some(data) = self.send_queue.pop_front() { - match self.udp_socket.send_to(&data.payload, &data.address) { - Ok(Some(size)) if size == data.payload.len() => { - }, - Ok(Some(_)) => { - warn!("UDP sent incomplete datagramm"); - }, - Ok(None) => { - self.send_queue.push_front(data); - return; - } - Err(e) => { - debug!("UDP send error: {:?}, address: {:?}", e, &data.address); - return; - } - } - } - io.update_registration(self.token).unwrap_or_else(|e| debug!("Error updating discovery registration: {:?}", e)); - } - fn send_to(&mut self, payload: Bytes, address: SocketAddr) { - self.send_queue.push_back(Datagramm { payload: payload, address: address }); - } - - pub fn readable(&mut self, io: &IoContext) -> Option where Message: Send + Sync + Clone { - let mut buf: [u8; MAX_DATAGRAM_SIZE] = unsafe { mem::uninitialized() }; - let writable = !self.send_queue.is_empty(); - let res = match self.udp_socket.recv_from(&mut buf) { - Ok(Some((len, address))) => self.on_packet(&buf[0..len], address).unwrap_or_else(|e| { - debug!("Error processing UDP packet: {:?}", e); - None - }), - Ok(_) => None, - Err(e) => { - debug!("Error reading UPD socket: {:?}", e); - None - } - }; - let new_writable = !self.send_queue.is_empty(); - if writable != new_writable { - io.update_registration(self.token).unwrap_or_else(|e| debug!("Error updating discovery registration: {:?}", e)); - } - res + self.send_queue.push_back(Datagram { payload: payload, address: address }); } - fn on_packet(&mut self, packet: &[u8], from: SocketAddr) -> Result, Error> { + + pub fn on_packet(&mut self, packet: &[u8], from: SocketAddr) -> Result, Error> { // validate packet if packet.len() < 32 + 65 + 4 + 1 { return Err(ErrorKind::BadProtocol.into()); @@ -571,19 +520,16 @@ impl Discovery { self.start(); } - pub fn register_socket(&self, event_loop: &mut EventLoop) -> Result<(), Error> { - event_loop.register(&self.udp_socket, Token(self.token), Ready::all(), PollOpt::edge()).expect("Error registering UDP socket"); - Ok(()) + pub fn any_sends_queued(&self) -> bool { + !self.send_queue.is_empty() } - pub fn update_registration(&self, event_loop: &mut EventLoop) -> Result<(), Error> { - let registration = if !self.send_queue.is_empty() { - Ready::readable() | Ready::writable() - } else { - Ready::readable() - }; - event_loop.reregister(&self.udp_socket, Token(self.token), registration, PollOpt::edge()).expect("Error reregistering UDP socket"); - Ok(()) + pub fn dequeue_send(&mut self) -> Option { + self.send_queue.pop_front() + } + + pub fn requeue_send(&mut self, datagram: Datagram) { + self.send_queue.push_front(datagram) } } @@ -620,8 +566,8 @@ mod tests { let key2 = Random.generate().unwrap(); let ep1 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40444").unwrap(), udp_port: 40444 }; let ep2 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40445").unwrap(), udp_port: 40445 }; - let mut discovery1 = Discovery::new(&key1, ep1.address.clone(), ep1.clone(), 0, IpFilter::default()); - let mut discovery2 = Discovery::new(&key2, ep2.address.clone(), ep2.clone(), 0, IpFilter::default()); + let mut discovery1 = Discovery::new(&key1, ep1.clone(), IpFilter::default()); + let mut discovery2 = Discovery::new(&key2, ep2.clone(), IpFilter::default()); let node1 = Node::from_str("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@127.0.0.1:7770").unwrap(); let node2 = Node::from_str("enode://b979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@127.0.0.1:7771").unwrap(); @@ -632,16 +578,14 @@ mod tests { discovery2.refresh(); for _ in 0 .. 10 { - while !discovery1.send_queue.is_empty() { - let datagramm = discovery1.send_queue.pop_front().unwrap(); - if datagramm.address == ep2.address { - discovery2.on_packet(&datagramm.payload, ep1.address.clone()).ok(); + while let Some(datagram) = discovery1.dequeue_send() { + if datagram.address == ep2.address { + discovery2.on_packet(&datagram.payload, ep1.address.clone()).ok(); } } - while !discovery2.send_queue.is_empty() { - let datagramm = discovery2.send_queue.pop_front().unwrap(); - if datagramm.address == ep1.address { - discovery1.on_packet(&datagramm.payload, ep2.address.clone()).ok(); + while let Some(datagram) = discovery2.dequeue_send() { + if datagram.address == ep1.address { + discovery1.on_packet(&datagram.payload, ep2.address.clone()).ok(); } } discovery2.round(); @@ -653,7 +597,7 @@ mod tests { fn removes_expired() { let key = Random.generate().unwrap(); let ep = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40446").unwrap(), udp_port: 40447 }; - let mut discovery = Discovery::new(&key, ep.address.clone(), ep.clone(), 0, IpFilter::default()); + let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); for _ in 0..1200 { discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); } @@ -668,7 +612,7 @@ mod tests { let key = Random.generate().unwrap(); let ep = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40447").unwrap(), udp_port: 40447 }; - let mut discovery = Discovery::new(&key, ep.address.clone(), ep.clone(), 0, IpFilter::default()); + let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); for _ in 0..(16 + 10) { discovery.node_buckets[0].nodes.push_back(BucketEntry { @@ -728,7 +672,7 @@ mod tests { let key = Secret::from_str(secret_hex) .and_then(|secret| KeyPair::from_secret(secret)) .unwrap(); - let mut discovery = Discovery::new(&key, ep.address.clone(), ep.clone(), 0, IpFilter::default()); + let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); node_entries.iter().for_each(|entry| discovery.update_node(entry.clone())); @@ -773,7 +717,7 @@ mod tests { fn packets() { let key = Random.generate().unwrap(); let ep = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40449").unwrap(), udp_port: 40449 }; - let mut discovery = Discovery::new(&key, ep.address.clone(), ep.clone(), 0, IpFilter::default()); + let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); discovery.check_timestamps = false; let from = SocketAddr::from_str("99.99.99.99:40445").unwrap(); @@ -840,13 +784,13 @@ mod tests { let key2 = Random.generate().unwrap(); let ep1 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40344").unwrap(), udp_port: 40344 }; let ep2 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40345").unwrap(), udp_port: 40345 }; - let mut discovery1 = Discovery::new(&key1, ep1.address.clone(), ep1.clone(), 0, IpFilter::default()); - let mut discovery2 = Discovery::new(&key2, ep2.address.clone(), ep2.clone(), 0, IpFilter::default()); + let mut discovery1 = Discovery::new(&key1, ep1.clone(), IpFilter::default()); + let mut discovery2 = Discovery::new(&key2, ep2.clone(), IpFilter::default()); discovery1.ping(&ep2); - let ping_data = discovery1.send_queue.pop_front().unwrap(); + let ping_data = discovery1.dequeue_send().unwrap(); discovery2.on_packet(&ping_data.payload, ep1.address.clone()).ok(); - let pong_data = discovery2.send_queue.pop_front().unwrap(); + let pong_data = discovery2.dequeue_send().unwrap(); let data = &pong_data.payload[(32 + 65)..]; let rlp = Rlp::new(&data[1..]); assert_eq!(ping_data.payload[0..32], rlp.val_at::>(1).unwrap()[..]) diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index 6d28a838c2..0fbd64b420 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -30,6 +30,7 @@ use hash::keccak; use mio::*; use mio::deprecated::{EventLoop}; use mio::tcp::*; +use mio::udp::*; use ethereum_types::H256; use rlp::{RlpStream, Encodable}; @@ -40,7 +41,7 @@ use node_table::*; use network::{NetworkConfiguration, NetworkIoMessage, ProtocolId, PeerId, PacketId}; use network::{NonReservedPeerMode, NetworkContext as NetworkContextTrait}; use network::{SessionInfo, Error, ErrorKind, DisconnectReason, NetworkProtocolHandler}; -use discovery::{Discovery, TableUpdates, NodeEntry}; +use discovery::{Discovery, TableUpdates, NodeEntry, MAX_DATAGRAM_SIZE}; use ip_utils::{map_external_address, select_public_address}; use path::restrict_permissions_owner; use parking_lot::{Mutex, RwLock}; @@ -239,6 +240,7 @@ struct ProtocolTimer { /// Root IO handler. Manages protocol handlers, IO timers and network connections. pub struct Host { pub info: RwLock, + udp_socket: Mutex>, tcp_listener: Mutex, sessions: Arc>>, discovery: Mutex>, @@ -295,6 +297,7 @@ impl Host { local_endpoint: local_endpoint, }), discovery: Mutex::new(None), + udp_socket: Mutex::new(None), tcp_listener: Mutex::new(tcp_listener), sessions: Arc::new(RwLock::new(Slab::new_starting_at(FIRST_SESSION, MAX_SESSIONS))), nodes: RwLock::new(NodeTable::new(path)), @@ -458,13 +461,16 @@ impl Host { let discovery = { let info = self.info.read(); if info.config.discovery_enabled && info.config.non_reserved_mode == NonReservedPeerMode::Accept { - let mut udp_addr = local_endpoint.address.clone(); - udp_addr.set_port(local_endpoint.udp_port); - Some(Discovery::new(&info.keys, udp_addr, public_endpoint, DISCOVERY, allow_ips)) + Some(Discovery::new(&info.keys, public_endpoint, allow_ips)) } else { None } }; if let Some(mut discovery) = discovery { + let mut udp_addr = local_endpoint.address; + udp_addr.set_port(local_endpoint.udp_port); + let socket = UdpSocket::bind(&udp_addr).expect("Error binding UDP socket"); + *self.udp_socket.lock() = Some(socket); + discovery.init_node_list(self.nodes.read().entries()); discovery.add_node_list(self.nodes.read().entries()); *self.discovery.lock() = Some(discovery); @@ -819,6 +825,67 @@ impl Host { } } + fn discovery_readable(&self, io: &IoContext) { + let node_changes = match (self.udp_socket.lock().as_ref(), self.discovery.lock().as_mut()) { + (Some(udp_socket), Some(discovery)) => { + let mut buf = [0u8; MAX_DATAGRAM_SIZE]; + let writable = discovery.any_sends_queued(); + let res = match udp_socket.recv_from(&mut buf) { + Ok(Some((len, address))) => discovery.on_packet(&buf[0..len], address).unwrap_or_else(|e| { + debug!(target: "network", "Error processing UDP packet: {:?}", e); + None + }), + Ok(_) => None, + Err(e) => { + debug!(target: "network", "Error reading UPD socket: {:?}", e); + None + } + }; + let new_writable = discovery.any_sends_queued(); + if writable != new_writable { + io.update_registration(DISCOVERY) + .unwrap_or_else(|e| { + debug!(target: "network" ,"Error updating discovery registration: {:?}", e) + }); + } + res + }, + _ => None, + }; + if let Some(node_changes) = node_changes { + self.update_nodes(io, node_changes); + } + } + + fn discovery_writable(&self, io: &IoContext) { + match (self.udp_socket.lock().as_ref(), self.discovery.lock().as_mut()) { + (Some(udp_socket), Some(discovery)) => { + while let Some(data) = discovery.dequeue_send() { + match udp_socket.send_to(&data.payload, &data.address) { + Ok(Some(size)) if size == data.payload.len() => { + }, + Ok(Some(_)) => { + warn!(target: "network", "UDP sent incomplete datagram"); + }, + Ok(None) => { + discovery.requeue_send(data); + return; + } + Err(e) => { + debug!(target: "network", "UDP send error: {:?}, address: {:?}", e, &data.address); + return; + } + } + } + io.update_registration(DISCOVERY) + .unwrap_or_else(|e| { + debug!(target: "network", "Error updating discovery registration: {:?}", e) + }); + }, + _ => (), + } + } + fn connection_timeout(&self, token: StreamToken, io: &IoContext) { trace!(target: "network", "Connection timeout: {}", token); self.kill_connection(token, io, true) @@ -920,12 +987,7 @@ impl IoHandler for Host { } match stream { FIRST_SESSION ... LAST_SESSION => self.session_readable(stream, io), - DISCOVERY => { - let node_changes = { self.discovery.lock().as_mut().map_or(None, |d| d.readable(io)) }; - if let Some(node_changes) = node_changes { - self.update_nodes(io, node_changes); - } - }, + DISCOVERY => self.discovery_readable(io), TCP_ACCEPT => self.accept(io), _ => panic!("Received unknown readable token"), } @@ -937,9 +999,7 @@ impl IoHandler for Host { } match stream { FIRST_SESSION ... LAST_SESSION => self.session_writable(stream, io), - DISCOVERY => { - self.discovery.lock().as_mut().map(|d| d.writable(io)); - } + DISCOVERY => self.discovery_writable(io), _ => panic!("Received unknown writable token"), } } @@ -1055,7 +1115,13 @@ impl IoHandler for Host { session.lock().register_socket(reg, event_loop).expect("Error registering socket"); } } - DISCOVERY => self.discovery.lock().as_ref().and_then(|d| d.register_socket(event_loop).ok()).expect("Error registering discovery socket"), + DISCOVERY => match self.udp_socket.lock().as_ref() { + Some(udp_socket) => { + event_loop.register(udp_socket, reg, Ready::all(), PollOpt::edge()) + .expect("Error registering UDP socket"); + }, + _ => panic!("Error registering discovery socket"), + } TCP_ACCEPT => event_loop.register(&*self.tcp_listener.lock(), Token(TCP_ACCEPT), Ready::all(), PollOpt::edge()).expect("Error registering stream"), _ => warn!("Unexpected stream registration") } @@ -1086,7 +1152,18 @@ impl IoHandler for Host { connection.lock().update_socket(reg, event_loop).expect("Error updating socket"); } } - DISCOVERY => self.discovery.lock().as_ref().and_then(|d| d.update_registration(event_loop).ok()).expect("Error reregistering discovery socket"), + DISCOVERY => match (self.udp_socket.lock().as_ref(), self.discovery.lock().as_ref()) { + (Some(udp_socket), Some(discovery)) => { + let registration = if discovery.any_sends_queued() { + Ready::readable() | Ready::writable() + } else { + Ready::readable() + }; + event_loop.reregister(udp_socket, reg, registration, PollOpt::edge()) + .expect("Error reregistering UDP socket"); + }, + _ => panic!("Error reregistering discovery socket"), + } TCP_ACCEPT => event_loop.reregister(&*self.tcp_listener.lock(), Token(TCP_ACCEPT), Ready::all(), PollOpt::edge()).expect("Error reregistering stream"), _ => warn!("Unexpected stream update") } -- GitLab From af1088ef61323f171915555023d8e993aaaed755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 8 Jun 2018 17:05:46 +0200 Subject: [PATCH 024/191] Disable parallel verification and skip verifiying already imported txs. (#8834) * Reject transactions that are already in pool without verifying them. * Avoid verifying already imported transactions. --- Cargo.lock | 1 - miner/Cargo.toml | 1 - miner/src/lib.rs | 1 - miner/src/pool/queue.rs | 11 ++++++++--- miner/src/pool/tests/client.rs | 9 +++++++++ miner/src/pool/tests/mod.rs | 34 ++++++++++++++++++++++++++++++++++ miner/src/pool/verifier.rs | 4 +++- 7 files changed, 54 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a22012300b..9334d01028 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -691,7 +691,6 @@ dependencies = [ "parity-reactor 0.1.0", "parking_lot 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "price-info 1.12.0", - "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.1", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "trace-time 0.1.0", diff --git a/miner/Cargo.toml b/miner/Cargo.toml index 707352484e..e692d2f708 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -27,7 +27,6 @@ linked-hash-map = "0.5" log = "0.3" parking_lot = "0.5" price-info = { path = "../price-info" } -rayon = "1.0" rlp = { path = "../util/rlp" } trace-time = { path = "../util/trace-time" } transaction-pool = { path = "../transaction-pool" } diff --git a/miner/src/lib.rs b/miner/src/lib.rs index 107b9b22b5..9dc180fefe 100644 --- a/miner/src/lib.rs +++ b/miner/src/lib.rs @@ -29,7 +29,6 @@ extern crate keccak_hash as hash; extern crate linked_hash_map; extern crate parking_lot; extern crate price_info; -extern crate rayon; extern crate rlp; extern crate trace_time; extern crate transaction_pool as txpool; diff --git a/miner/src/pool/queue.rs b/miner/src/pool/queue.rs index 4ebdf9e3f1..cf4a956f42 100644 --- a/miner/src/pool/queue.rs +++ b/miner/src/pool/queue.rs @@ -23,7 +23,6 @@ use std::collections::BTreeMap; use ethereum_types::{H256, U256, Address}; use parking_lot::RwLock; -use rayon::prelude::*; use transaction; use txpool::{self, Verifier}; @@ -179,8 +178,14 @@ impl TransactionQueue { let verifier = verifier::Verifier::new(client, options, self.insertion_id.clone()); let results = transactions - .into_par_iter() - .map(|transaction| verifier.verify_transaction(transaction)) + .into_iter() + .map(|transaction| { + if self.pool.read().find(&transaction.hash()).is_some() { + bail!(transaction::Error::AlreadyImported) + } + + verifier.verify_transaction(transaction) + }) .map(|result| result.and_then(|verified| { self.pool.write().import(verified) .map(|_imported| ()) diff --git a/miner/src/pool/tests/client.rs b/miner/src/pool/tests/client.rs index 101b6cdc21..08b43f12ad 100644 --- a/miner/src/pool/tests/client.rs +++ b/miner/src/pool/tests/client.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . +use std::sync::{atomic, Arc}; + use ethereum_types::{U256, H256, Address}; use rlp::Rlp; use transaction::{self, Transaction, SignedTransaction, UnverifiedTransaction}; @@ -25,6 +27,7 @@ const MAX_TRANSACTION_SIZE: usize = 15 * 1024; #[derive(Debug, Clone)] pub struct TestClient { + verification_invoked: Arc, account_details: AccountDetails, gas_required: U256, is_service_transaction: bool, @@ -35,6 +38,7 @@ pub struct TestClient { impl Default for TestClient { fn default() -> Self { TestClient { + verification_invoked: Default::default(), account_details: AccountDetails { nonce: 123.into(), balance: 63_100.into(), @@ -88,6 +92,10 @@ impl TestClient { insertion_id: 1, } } + + pub fn was_verification_triggered(&self) -> bool { + self.verification_invoked.load(atomic::Ordering::SeqCst) + } } impl pool::client::Client for TestClient { @@ -98,6 +106,7 @@ impl pool::client::Client for TestClient { fn verify_transaction(&self, tx: UnverifiedTransaction) -> Result { + self.verification_invoked.store(true, atomic::Ordering::SeqCst); Ok(SignedTransaction::new(tx)?) } diff --git a/miner/src/pool/tests/mod.rs b/miner/src/pool/tests/mod.rs index 552903a4bb..ac2e6b008e 100644 --- a/miner/src/pool/tests/mod.rs +++ b/miner/src/pool/tests/mod.rs @@ -796,3 +796,37 @@ fn should_include_local_transaction_to_a_full_pool() { // then assert_eq!(txq.status().status.transaction_count, 1); } + +#[test] +fn should_avoid_verifying_transaction_already_in_pool() { + // given + let txq = TransactionQueue::new( + txpool::Options { + max_count: 1, + max_per_sender: 2, + max_mem_usage: 50 + }, + verifier::Options { + minimal_gas_price: 1.into(), + block_gas_limit: 1_000_000.into(), + tx_gas_limit: 1_000_000.into(), + }, + PrioritizationStrategy::GasPriceOnly, + ); + let client = TestClient::new(); + let tx1 = Tx::default().signed().unverified(); + + let res = txq.import(client.clone(), vec![tx1.clone()]); + assert_eq!(res, vec![Ok(())]); + assert_eq!(txq.status().status.transaction_count, 1); + assert!(client.was_verification_triggered()); + + // when + let client = TestClient::new(); + let res = txq.import(client.clone(), vec![tx1]); + assert_eq!(res, vec![Err(transaction::Error::AlreadyImported)]); + assert!(!client.was_verification_triggered()); + + // then + assert_eq!(txq.status().status.transaction_count, 1); +} diff --git a/miner/src/pool/verifier.rs b/miner/src/pool/verifier.rs index 4675303928..5e6e22077a 100644 --- a/miner/src/pool/verifier.rs +++ b/miner/src/pool/verifier.rs @@ -57,6 +57,7 @@ impl Default for Options { } /// Transaction to verify. +#[cfg_attr(test, derive(Clone))] pub enum Transaction { /// Fresh, never verified transaction. /// @@ -75,7 +76,8 @@ pub enum Transaction { } impl Transaction { - fn hash(&self) -> H256 { + /// Return transaction hash + pub fn hash(&self) -> H256 { match *self { Transaction::Unverified(ref tx) => tx.hash(), Transaction::Retracted(ref tx) => tx.hash(), -- GitLab From 986f485b3e66ec4724c0d026a19894cbc91ef9a3 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Mon, 11 Jun 2018 11:02:46 +0300 Subject: [PATCH 025/191] Clearing up a comment about the prefix for signing (#8828) --- rpc/src/v1/helpers/dispatch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/src/v1/helpers/dispatch.rs b/rpc/src/v1/helpers/dispatch.rs index 9bec8e1d31..dbfdd51bc5 100644 --- a/rpc/src/v1/helpers/dispatch.rs +++ b/rpc/src/v1/helpers/dispatch.rs @@ -237,7 +237,7 @@ pub fn fetch_gas_price_corpus( /// Returns a eth_sign-compatible hash of data to sign. /// The data is prepended with special message to prevent -/// chosen-plaintext attacks. +/// malicious DApps from using the function to sign forged transactions. pub fn eth_data_hash(mut data: Bytes) -> H256 { let mut message_data = format!("\x19Ethereum Signed Message:\n{}", data.len()) -- GitLab From 10fc74eb8119330ff3a065e0d3e5400e9de18240 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Mon, 11 Jun 2018 10:03:16 +0200 Subject: [PATCH 026/191] network-devp2p: downgrade logging to debug, add target (#8784) * network-devp2p: downgrade logging to debug, add target * network-devp2p: rename s/datagramm/datagram --- util/network-devp2p/src/discovery.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/network-devp2p/src/discovery.rs b/util/network-devp2p/src/discovery.rs index b7cce2832f..5f8f0cdbc2 100644 --- a/util/network-devp2p/src/discovery.rs +++ b/util/network-devp2p/src/discovery.rs @@ -147,7 +147,7 @@ impl Discovery { let dist = match Discovery::distance(&self.id_hash, &id_hash) { Some(dist) => dist, None => { - warn!(target: "discovery", "Attempted to update own entry: {:?}", e); + debug!(target: "discovery", "Attempted to update own entry: {:?}", e); return; } }; @@ -181,7 +181,7 @@ impl Discovery { let dist = match Discovery::distance(&self.id_hash, &keccak(id)) { Some(dist) => dist, None => { - warn!(target: "discovery", "Received ping from self"); + debug!(target: "discovery", "Received ping from self"); return } }; @@ -370,7 +370,7 @@ impl Discovery { PACKET_FIND_NODE => self.on_find_node(&rlp, &node_id, &from), PACKET_NEIGHBOURS => self.on_neighbours(&rlp, &node_id, &from), _ => { - debug!("Unknown UDP packet: {}", packet_id); + debug!(target: "discovery", "Unknown UDP packet: {}", packet_id); Ok(None) } } -- GitLab From 09ee6e147750f4ea22be7e87157598539f5032b7 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 11 Jun 2018 18:26:49 +0800 Subject: [PATCH 027/191] Fix subcrate test compile (#8862) * Fix test compile for light, node_filter, service in ethcore * Fix ipfs, local-store, rpc, secret_store, updater subcrate test compile --- ethcore/light/Cargo.toml | 1 + ethcore/node_filter/Cargo.toml | 1 + ethcore/service/Cargo.toml | 1 + ipfs/Cargo.toml | 3 +++ local-store/Cargo.toml | 1 + rpc/Cargo.toml | 1 + secret_store/Cargo.toml | 1 + updater/Cargo.toml | 1 + 8 files changed, 10 insertions(+) diff --git a/ethcore/light/Cargo.toml b/ethcore/light/Cargo.toml index 3853ad910f..ab347c62e8 100644 --- a/ethcore/light/Cargo.toml +++ b/ethcore/light/Cargo.toml @@ -38,6 +38,7 @@ memory-cache = { path = "../../util/memory_cache" } error-chain = { version = "0.11", default-features = false } [dev-dependencies] +ethcore = { path = "..", features = ["test-helpers"] } kvdb-memorydb = { path = "../../util/kvdb-memorydb" } tempdir = "0.3" diff --git a/ethcore/node_filter/Cargo.toml b/ethcore/node_filter/Cargo.toml index 0d204e29ff..11be807652 100644 --- a/ethcore/node_filter/Cargo.toml +++ b/ethcore/node_filter/Cargo.toml @@ -19,6 +19,7 @@ ethabi-contract = "5.0" lru-cache = "0.1" [dev-dependencies] +ethcore = { path = "..", features = ["test-helpers"] } kvdb-memorydb = { path = "../../util/kvdb-memorydb" } ethcore-io = { path = "../../util/io" } tempdir = "0.3" diff --git a/ethcore/service/Cargo.toml b/ethcore/service/Cargo.toml index 3a10849b61..634ee55dba 100644 --- a/ethcore/service/Cargo.toml +++ b/ethcore/service/Cargo.toml @@ -16,5 +16,6 @@ stop-guard = { path = "../../util/stop-guard" } trace-time = { path = "../../util/trace-time" } [dev-dependencies] +ethcore = { path = "..", features = ["test-helpers"] } tempdir = "0.3" kvdb-rocksdb = { path = "../../util/kvdb-rocksdb" } diff --git a/ipfs/Cargo.toml b/ipfs/Cargo.toml index 9c7b5f3b00..5a72048134 100644 --- a/ipfs/Cargo.toml +++ b/ipfs/Cargo.toml @@ -15,3 +15,6 @@ rlp = { path = "../util/rlp" } cid = "0.2" multihash = "0.7" unicase = "2.0" + +[dev-dependencies] +ethcore = { path = "../ethcore", features = ["test-helpers"] } diff --git a/local-store/Cargo.toml b/local-store/Cargo.toml index 6d09eb76f6..d2c3469ca4 100644 --- a/local-store/Cargo.toml +++ b/local-store/Cargo.toml @@ -16,5 +16,6 @@ serde_derive = "1.0" serde_json = "1.0" [dev-dependencies] +ethcore = { path = "../ethcore", features = ["test-helpers"] } ethkey = { path = "../ethkey" } kvdb-memorydb = { path = "../util/kvdb-memorydb" } diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 8a0b689c65..338a892682 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -65,6 +65,7 @@ stats = { path = "../util/stats" } vm = { path = "../ethcore/vm" } [dev-dependencies] +ethcore = { path = "../ethcore", features = ["test-helpers"] } ethcore-network = { path = "../util/network" } fake-fetch = { path = "../util/fake-fetch" } kvdb-memorydb = { path = "../util/kvdb-memorydb" } diff --git a/secret_store/Cargo.toml b/secret_store/Cargo.toml index 261658903c..a8aed83127 100644 --- a/secret_store/Cargo.toml +++ b/secret_store/Cargo.toml @@ -39,5 +39,6 @@ ethabi-derive = "5.0" ethabi-contract = "5.0" [dev-dependencies] +ethcore = { path = "../ethcore", features = ["test-helpers"] } tempdir = "0.3" kvdb-rocksdb = { path = "../util/kvdb-rocksdb" } diff --git a/updater/Cargo.toml b/updater/Cargo.toml index d76db6ec0e..8d94680335 100644 --- a/updater/Cargo.toml +++ b/updater/Cargo.toml @@ -25,5 +25,6 @@ path = { path = "../util/path" } rand = "0.4" [dev-dependencies] +ethcore = { path = "../ethcore", features = ["test-helpers"] } tempdir = "0.3" matches = "0.1" -- GitLab From 861d829420ff28e387642659ffe256955352d939 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Mon, 11 Jun 2018 20:38:01 +0200 Subject: [PATCH 028/191] Fix Cli Return Code on --help for ethkey, ethstore & whisper (#8863) Docopt handles `--help` automatically for us, however we've handled those Errors the same as all others: by exiting with Return Code `1`, which is wrong for a totally appropriate a quit on `--help`. Fortunately `docopt:Error` provides an `exit` helper function that discriminates properly between fatal and non-fatal errors and exist appropriately. This patch makes sure we use that handy function in case we encounter such an error in the CLI of ethkey, ethstore and whisper. Thus those are now giving the appropriate Return code on `--help`. fixes #8851 --- ethkey/cli/src/main.rs | 3 ++- ethstore/cli/src/main.rs | 1 + whisper/cli/src/main.rs | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ethkey/cli/src/main.rs b/ethkey/cli/src/main.rs index c8f5e2e64e..af50f86b31 100644 --- a/ethkey/cli/src/main.rs +++ b/ethkey/cli/src/main.rs @@ -166,10 +166,11 @@ fn main() { match execute(env::args()) { Ok(ok) => println!("{}", ok), + Err(Error::Docopt(ref e)) => e.exit(), Err(err) => { println!("{}", err); process::exit(1); - }, + } } } diff --git a/ethstore/cli/src/main.rs b/ethstore/cli/src/main.rs index 416b64d43e..922d857149 100644 --- a/ethstore/cli/src/main.rs +++ b/ethstore/cli/src/main.rs @@ -149,6 +149,7 @@ fn main() { match execute(env::args()) { Ok(result) => println!("{}", result), + Err(Error::Docopt(ref e)) => e.exit(), Err(err) => { println!("{}", err); process::exit(1); diff --git a/whisper/cli/src/main.rs b/whisper/cli/src/main.rs index 6f3aec8594..1d57691418 100644 --- a/whisper/cli/src/main.rs +++ b/whisper/cli/src/main.rs @@ -190,11 +190,12 @@ fn main() { Ok(_) => { println!("whisper-cli terminated"); process::exit(1); - } + }, + Err(Error::Docopt(ref e)) => e.exit(), Err(err) => { println!("{}", err); process::exit(1); - }, + } } } -- GitLab From 2a470deeafa194dbb53d277d7839cd8c78deed28 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Tue, 12 Jun 2018 09:15:52 +0300 Subject: [PATCH 029/191] Don't allocate in expect_valid_rlp unless necessary (#8867) * don't allocate via format! in case there's no error * fix test? --- ethcore/src/views/view_rlp.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ethcore/src/views/view_rlp.rs b/ethcore/src/views/view_rlp.rs index 2ecc4dbdd3..2dd1b33a94 100644 --- a/ethcore/src/views/view_rlp.rs +++ b/ethcore/src/views/view_rlp.rs @@ -39,10 +39,10 @@ impl<'a, 'view> ViewRlp<'a> where 'a : 'view { /// Returns a new instance replacing existing rlp with new rlp, maintaining debug info fn new_from_rlp(&self, rlp: Rlp<'a>) -> Self { - ViewRlp { - rlp, + ViewRlp { + rlp, file: self.file, - line: self.line + line: self.line } } @@ -53,7 +53,12 @@ impl<'a, 'view> ViewRlp<'a> where 'a : 'view { } fn expect_valid_rlp(&self, r: Result) -> T { - r.expect(&format!("View rlp is trusted and should be valid. Constructed in {} on line {}", self.file, self.line)) + r.unwrap_or_else(|e| panic!( + "View rlp is trusted and should be valid. Constructed in {} on line {}: {}", + self.file, + self.line, + e + )) } /// Returns rlp at the given index, panics if no rlp at that index @@ -75,7 +80,7 @@ impl<'a, 'view> ViewRlp<'a> where 'a : 'view { /// Returns decoded value at the given index, panics not present or valid at that index pub fn val_at(&self, index: usize) -> T where T : Decodable { self.expect_valid_rlp(self.rlp.val_at(index)) - } + } /// Returns decoded list of values, panics if rlp is invalid pub fn list_at(&self, index: usize) -> Vec where T: Decodable { -- GitLab From 4817b94d0bb23356a5ee9b659ab8f4c4cbbd660d Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Tue, 12 Jun 2018 14:21:55 +0800 Subject: [PATCH 030/191] Use sealing.enabled to emit eth_mining information (#8844) * Use sealing.enabled to emit eth_mining information * Be more accurate on last_requests by using Option * Add tests for internal sealing * Add test for pow non-mining * Add test for mining pow --- ethcore/src/miner/miner.rs | 71 +++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index bf51d0b135..e91e03e8bc 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -180,7 +180,7 @@ struct SealingWork { next_allowed_reseal: Instant, next_mandatory_reseal: Instant, // block number when sealing work was last requested - last_request: u64, + last_request: Option, } impl SealingWork { @@ -231,7 +231,7 @@ impl Miner { || spec.engine.seals_internally().is_some(), next_allowed_reseal: Instant::now(), next_mandatory_reseal: Instant::now() + options.reseal_max_period, - last_request: 0, + last_request: None, }), params: RwLock::new(AuthoringParams::default()), listeners: RwLock::new(vec![]), @@ -496,8 +496,10 @@ impl Miner { trace!(target: "miner", "requires_reseal: sealing enabled"); // Disable sealing if there were no requests for SEALING_TIMEOUT_IN_BLOCKS - let had_requests = best_block > sealing.last_request - && best_block - sealing.last_request <= SEALING_TIMEOUT_IN_BLOCKS; + let had_requests = sealing.last_request.map(|last_request| { + best_block > last_request + && best_block - last_request <= SEALING_TIMEOUT_IN_BLOCKS + }).unwrap_or(false); // keep sealing enabled if any of the conditions is met let sealing_enabled = self.forced_sealing() @@ -516,7 +518,7 @@ impl Miner { ); if should_disable_sealing { - trace!(target: "miner", "Miner sleeping (current {}, last {})", best_block, sealing.last_request); + trace!(target: "miner", "Miner sleeping (current {}, last {})", best_block, sealing.last_request.unwrap_or(0)); sealing.enabled = false; sealing.queue.reset(); false @@ -676,13 +678,13 @@ impl Miner { let best_number = client.chain_info().best_block_number; let mut sealing = self.sealing.lock(); - if sealing.last_request != best_number { + if sealing.last_request != Some(best_number) { trace!( target: "miner", "prepare_pending_block: Miner received request (was {}, now {}) - waking up.", - sealing.last_request, best_number + sealing.last_request.unwrap_or(0), best_number ); - sealing.last_request = best_number; + sealing.last_request = Some(best_number); } // Return if we restarted @@ -954,7 +956,7 @@ impl miner::MinerService for Miner { } fn is_currently_sealing(&self) -> bool { - self.sealing.lock().queue.is_in_use() + self.sealing.lock().enabled } fn work_package(&self, chain: &C) -> Option<(H256, BlockNumber, u64, U256)> where @@ -1266,4 +1268,55 @@ mod tests { let client = generate_dummy_client_with_spec_and_accounts(spec, None); assert!(match client.miner().set_author(addr, Some("".into())) { Err(AccountError::NotFound) => true, _ => false }); } + + #[test] + fn should_mine_if_internal_sealing_is_enabled() { + let spec = Spec::new_instant(); + let miner = Miner::new_for_tests(&spec, None); + + let client = generate_dummy_client(2); + miner.update_sealing(&*client); + + assert!(miner.is_currently_sealing()); + } + + #[test] + fn should_not_mine_if_internal_sealing_is_disabled() { + let spec = Spec::new_test_round(); + let miner = Miner::new_for_tests(&spec, None); + + let client = generate_dummy_client(2); + miner.update_sealing(&*client); + + assert!(!miner.is_currently_sealing()); + } + + #[test] + fn should_not_mine_if_no_fetch_work_request() { + let spec = Spec::new_test(); + let miner = Miner::new_for_tests(&spec, None); + + let client = generate_dummy_client(2); + miner.update_sealing(&*client); + + assert!(!miner.is_currently_sealing()); + } + + #[test] + fn should_mine_if_fetch_work_request() { + struct DummyNotifyWork; + + impl NotifyWork for DummyNotifyWork { + fn notify(&self, _pow_hash: H256, _difficulty: U256, _number: u64) { } + } + + let spec = Spec::new_test(); + let miner = Miner::new_for_tests(&spec, None); + miner.add_work_listener(Box::new(DummyNotifyWork)); + + let client = generate_dummy_client(2); + miner.update_sealing(&*client); + + assert!(miner.is_currently_sealing()); + } } -- GitLab From 4938d5dde5c83403e6cffc7301ebd35cbdcf04a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Tue, 12 Jun 2018 08:22:54 +0200 Subject: [PATCH 031/191] Limit the number of transactions in pending set (#8777) * Unordered iterator. * Use unordered and limited set if full not required. * Split timeout work into smaller timers. * Avoid collecting all pending transactions when mining * Remove println. * Use priority ordering in eth-filter. * Fix ethcore-miner tests and tx propagation. * Review grumbles addressed. * Add test for unordered not populating the cache. * Fix ethcore tests. * Fix light tests. * Fix ethcore-sync tests. * Fix RPC tests. --- Cargo.lock | 6 +- ethcore/light/src/net/mod.rs | 5 +- ethcore/light/src/net/tests/mod.rs | 4 +- ethcore/light/src/provider.rs | 13 ++- ethcore/src/client/client.rs | 4 +- ethcore/src/client/test_client.rs | 6 +- ethcore/src/client/traits.rs | 2 +- ethcore/src/miner/miner.rs | 51 ++++++--- ethcore/src/miner/mod.rs | 7 +- ethcore/src/tests/client.rs | 10 +- ethcore/sync/src/api.rs | 21 +++- ethcore/sync/src/chain/mod.rs | 10 +- ethcore/sync/src/chain/propagator.rs | 3 +- miner/src/lib.rs | 3 +- miner/src/pool/mod.rs | 39 ++++++- miner/src/pool/queue.rs | 71 ++++++++++--- miner/src/pool/tests/mod.rs | 124 ++++++++++++++++------ parity/rpc_apis.rs | 4 +- rpc/Cargo.toml | 2 +- rpc/src/v1/impls/eth_filter.rs | 2 +- rpc/src/v1/impls/eth_pubsub.rs | 2 +- rpc/src/v1/impls/light/parity.rs | 3 +- rpc/src/v1/impls/parity.rs | 10 +- rpc/src/v1/tests/helpers/miner_service.rs | 4 +- rpc/src/v1/tests/mocked/eth_pubsub.rs | 2 +- rpc/src/v1/traits/parity.rs | 2 +- transaction-pool/Cargo.toml | 2 +- transaction-pool/src/pool.rs | 58 +++++++++- transaction-pool/src/tests/mod.rs | 60 +++++++++++ 29 files changed, 415 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9334d01028..60565f1758 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -694,7 +694,7 @@ dependencies = [ "rlp 0.2.1", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "trace-time 0.1.0", - "transaction-pool 1.12.0", + "transaction-pool 1.12.1", "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2241,7 +2241,7 @@ dependencies = [ "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "transaction-pool 1.12.0", + "transaction-pool 1.12.1", "transient-hashmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", ] @@ -3422,7 +3422,7 @@ dependencies = [ [[package]] name = "transaction-pool" -version = "1.12.0" +version = "1.12.1" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 39f53445ad..179f709003 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -72,6 +72,9 @@ const PROPAGATE_TIMEOUT_INTERVAL: Duration = Duration::from_secs(5); const RECALCULATE_COSTS_TIMEOUT: TimerToken = 3; const RECALCULATE_COSTS_INTERVAL: Duration = Duration::from_secs(60 * 60); +/// Max number of transactions in a single packet. +const MAX_TRANSACTIONS_TO_PROPAGATE: usize = 64; + // minimum interval between updates. const UPDATE_INTERVAL: Duration = Duration::from_millis(5000); @@ -647,7 +650,7 @@ impl LightProtocol { fn propagate_transactions(&self, io: &IoContext) { if self.capabilities.read().tx_relay { return } - let ready_transactions = self.provider.ready_transactions(); + let ready_transactions = self.provider.ready_transactions(MAX_TRANSACTIONS_TO_PROPAGATE); if ready_transactions.is_empty() { return } trace!(target: "pip", "propagate transactions: {} ready", ready_transactions.len()); diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 305ef9b354..e182f38b8a 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -173,8 +173,8 @@ impl Provider for TestProvider { }) } - fn ready_transactions(&self) -> Vec { - self.0.client.ready_transactions() + fn ready_transactions(&self, max_len: usize) -> Vec { + self.0.client.ready_transactions(max_len) } } diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index 0e518ea772..e75915e8cf 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -125,7 +125,7 @@ pub trait Provider: Send + Sync { fn header_proof(&self, req: request::CompleteHeaderProofRequest) -> Option; /// Provide pending transactions. - fn ready_transactions(&self) -> Vec; + fn ready_transactions(&self, max_len: usize) -> Vec; /// Provide a proof-of-execution for the given transaction proof request. /// Returns a vector of all state items necessary to execute the transaction. @@ -280,8 +280,8 @@ impl Provider for T { .map(|(_, proof)| ::request::ExecutionResponse { items: proof }) } - fn ready_transactions(&self) -> Vec { - BlockChainClient::ready_transactions(self) + fn ready_transactions(&self, max_len: usize) -> Vec { + BlockChainClient::ready_transactions(self, max_len) .into_iter() .map(|tx| tx.pending().clone()) .collect() @@ -367,9 +367,12 @@ impl Provider for LightProvider { None } - fn ready_transactions(&self) -> Vec { + fn ready_transactions(&self, max_len: usize) -> Vec { let chain_info = self.chain_info(); - self.txqueue.read().ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp) + let mut transactions = self.txqueue.read() + .ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp); + transactions.truncate(max_len); + transactions } } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 2d0201067f..d47d1afa49 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1956,8 +1956,8 @@ impl BlockChainClient for Client { (*self.build_last_hashes(&self.chain.read().best_block_hash())).clone() } - fn ready_transactions(&self) -> Vec> { - self.importer.miner.ready_transactions(self) + fn ready_transactions(&self, max_len: usize) -> Vec> { + self.importer.miner.ready_transactions(self, max_len, ::miner::PendingOrdering::Priority) } fn signing_chain_id(&self) -> Option { diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 4bd76b4495..620f1af333 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -48,7 +48,7 @@ use log_entry::LocalizedLogEntry; use receipt::{Receipt, LocalizedReceipt, TransactionOutcome}; use error::ImportResult; use vm::Schedule; -use miner::{Miner, MinerService}; +use miner::{self, Miner, MinerService}; use spec::Spec; use types::basic_account::BasicAccount; use types::pruning_info::PruningInfo; @@ -806,8 +806,8 @@ impl BlockChainClient for TestBlockChainClient { self.traces.read().clone() } - fn ready_transactions(&self) -> Vec> { - self.miner.ready_transactions(self) + fn ready_transactions(&self, max_len: usize) -> Vec> { + self.miner.ready_transactions(self, max_len, miner::PendingOrdering::Priority) } fn signing_chain_id(&self) -> Option { None } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index d3a20dcff8..29876fe80a 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -321,7 +321,7 @@ pub trait BlockChainClient : Sync + Send + AccountData + BlockChain + CallContra fn last_hashes(&self) -> LastHashes; /// List all transactions that are allowed into the next block. - fn ready_transactions(&self) -> Vec>; + fn ready_transactions(&self, max_len: usize) -> Vec>; /// Sorted list of transaction gas prices from at least last sample_size blocks. fn gas_price_corpus(&self, sample_size: usize) -> ::stats::Corpus { diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index e91e03e8bc..2547fea62b 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -364,18 +364,28 @@ impl Miner { let client = self.pool_client(chain); let engine_params = self.engine.params(); - let min_tx_gas = self.engine.schedule(chain_info.best_block_number).tx_gas.into(); + let min_tx_gas: U256 = self.engine.schedule(chain_info.best_block_number).tx_gas.into(); let nonce_cap: Option = if chain_info.best_block_number + 1 >= engine_params.dust_protection_transition { Some((engine_params.nonce_cap_increment * (chain_info.best_block_number + 1)).into()) } else { None }; + // we will never need more transactions than limit divided by min gas + let max_transactions = if min_tx_gas.is_zero() { + usize::max_value() + } else { + (*open_block.block().header().gas_limit() / min_tx_gas).as_u64() as usize + }; let pending: Vec> = self.transaction_queue.pending( client.clone(), - chain_info.best_block_number, - chain_info.best_block_timestamp, - nonce_cap, + pool::PendingSettings { + block_number: chain_info.best_block_number, + current_timestamp: chain_info.best_block_timestamp, + nonce_cap, + max_len: max_transactions, + ordering: miner::PendingOrdering::Priority, + } ); let took_ms = |elapsed: &Duration| { @@ -807,20 +817,28 @@ impl miner::MinerService for Miner { self.transaction_queue.all_transactions() } - fn ready_transactions(&self, chain: &C) -> Vec> where + fn ready_transactions(&self, chain: &C, max_len: usize, ordering: miner::PendingOrdering) + -> Vec> + where C: ChainInfo + Nonce + Sync, { let chain_info = chain.chain_info(); let from_queue = || { + // We propagate transactions over the nonce cap. + // The mechanism is only to limit number of transactions in pending block + // those transactions are valid and will just be ready to be included in next block. + let nonce_cap = None; + self.transaction_queue.pending( CachedNonceClient::new(chain, &self.nonce_cache), - chain_info.best_block_number, - chain_info.best_block_timestamp, - // We propagate transactions over the nonce cap. - // The mechanism is only to limit number of transactions in pending block - // those transactions are valid and will just be ready to be included in next block. - None, + pool::PendingSettings { + block_number: chain_info.best_block_number, + current_timestamp: chain_info.best_block_timestamp, + nonce_cap, + max_len, + ordering, + }, ) }; @@ -830,6 +848,7 @@ impl miner::MinerService for Miner { .iter() .map(|signed| pool::VerifiedTransaction::from_pending_block_transaction(signed.clone())) .map(Arc::new) + .take(max_len) .collect() }, chain_info.best_block_number) }; @@ -1083,7 +1102,7 @@ mod tests { use rustc_hex::FromHex; use client::{TestBlockChainClient, EachBlockWith, ChainInfo, ImportSealedBlock}; - use miner::MinerService; + use miner::{MinerService, PendingOrdering}; use test_helpers::{generate_dummy_client, generate_dummy_client_with_spec_and_accounts}; use transaction::{Transaction}; @@ -1179,7 +1198,7 @@ mod tests { assert_eq!(res.unwrap(), ()); assert_eq!(miner.pending_transactions(best_block).unwrap().len(), 1); assert_eq!(miner.pending_receipts(best_block).unwrap().len(), 1); - assert_eq!(miner.ready_transactions(&client).len(), 1); + assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); // This method will let us know if pending block was created (before calling that method) assert!(!miner.prepare_pending_block(&client)); } @@ -1198,7 +1217,7 @@ mod tests { assert_eq!(res.unwrap(), ()); assert_eq!(miner.pending_transactions(best_block), None); assert_eq!(miner.pending_receipts(best_block), None); - assert_eq!(miner.ready_transactions(&client).len(), 1); + assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); } #[test] @@ -1217,11 +1236,11 @@ mod tests { assert_eq!(miner.pending_transactions(best_block), None); assert_eq!(miner.pending_receipts(best_block), None); // By default we use PendingSet::AlwaysSealing, so no transactions yet. - assert_eq!(miner.ready_transactions(&client).len(), 0); + assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 0); // This method will let us know if pending block was created (before calling that method) assert!(miner.prepare_pending_block(&client)); // After pending block is created we should see a transaction. - assert_eq!(miner.ready_transactions(&client).len(), 1); + assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); } #[test] diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index dd5f28feb6..631941de61 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -26,6 +26,7 @@ pub mod pool_client; pub mod stratum; pub use self::miner::{Miner, MinerOptions, Penalization, PendingSet, AuthoringParams}; +pub use ethcore_miner::pool::PendingOrdering; use std::sync::Arc; use std::collections::BTreeMap; @@ -156,10 +157,12 @@ pub trait MinerService : Send + Sync { fn next_nonce(&self, chain: &C, address: &Address) -> U256 where C: Nonce + Sync; - /// Get a list of all ready transactions. + /// Get a list of all ready transactions either ordered by priority or unordered (cheaper). /// /// Depending on the settings may look in transaction pool or only in pending block. - fn ready_transactions(&self, chain: &C) -> Vec> + /// If you don't need a full set of transactions, you can add `max_len` and create only a limited set of + /// transactions. + fn ready_transactions(&self, chain: &C, max_len: usize, ordering: PendingOrdering) -> Vec> where C: ChainInfo + Nonce + Sync; /// Get a list of all transactions in the pool (some of them might not be ready for inclusion yet). diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index ccafcf6613..e18b4db983 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -30,7 +30,7 @@ use test_helpers::{ use types::filter::Filter; use ethereum_types::{U256, Address}; use kvdb_rocksdb::{Database, DatabaseConfig}; -use miner::Miner; +use miner::{Miner, PendingOrdering}; use spec::Spec; use views::BlockView; use ethkey::KeyPair; @@ -343,12 +343,12 @@ fn does_not_propagate_delayed_transactions() { client.miner().import_own_transaction(&*client, tx0).unwrap(); client.miner().import_own_transaction(&*client, tx1).unwrap(); - assert_eq!(0, client.ready_transactions().len()); - assert_eq!(0, client.miner().ready_transactions(&*client).len()); + assert_eq!(0, client.ready_transactions(10).len()); + assert_eq!(0, client.miner().ready_transactions(&*client, 10, PendingOrdering::Priority).len()); push_blocks_to_client(&client, 53, 2, 2); client.flush_queue(); - assert_eq!(2, client.ready_transactions().len()); - assert_eq!(2, client.miner().ready_transactions(&*client).len()); + assert_eq!(2, client.ready_transactions(10).len()); + assert_eq!(2, client.miner().ready_transactions(&*client, 10, PendingOrdering::Priority).len()); } #[test] diff --git a/ethcore/sync/src/api.rs b/ethcore/sync/src/api.rs index b759fb734a..56bc579ad8 100644 --- a/ethcore/sync/src/api.rs +++ b/ethcore/sync/src/api.rs @@ -359,6 +359,10 @@ impl SyncProvider for EthSync { } } +const PEERS_TIMER: TimerToken = 0; +const SYNC_TIMER: TimerToken = 1; +const TX_TIMER: TimerToken = 2; + struct SyncProtocolHandler { /// Shared blockchain client. chain: Arc, @@ -373,7 +377,9 @@ struct SyncProtocolHandler { impl NetworkProtocolHandler for SyncProtocolHandler { fn initialize(&self, io: &NetworkContext) { if io.subprotocol_name() != WARP_SYNC_PROTOCOL_ID { - io.register_timer(0, Duration::from_secs(1)).expect("Error registering sync timer"); + io.register_timer(PEERS_TIMER, Duration::from_millis(700)).expect("Error registering peers timer"); + io.register_timer(SYNC_TIMER, Duration::from_millis(1100)).expect("Error registering sync timer"); + io.register_timer(TX_TIMER, Duration::from_millis(1300)).expect("Error registering transactions timer"); } } @@ -399,12 +405,17 @@ impl NetworkProtocolHandler for SyncProtocolHandler { } } - fn timeout(&self, io: &NetworkContext, _timer: TimerToken) { + fn timeout(&self, io: &NetworkContext, timer: TimerToken) { trace_time!("sync::timeout"); let mut io = NetSyncIo::new(io, &*self.chain, &*self.snapshot_service, &self.overlay); - self.sync.write().maintain_peers(&mut io); - self.sync.write().maintain_sync(&mut io); - self.sync.write().propagate_new_transactions(&mut io); + match timer { + PEERS_TIMER => self.sync.write().maintain_peers(&mut io), + SYNC_TIMER => self.sync.write().maintain_sync(&mut io), + TX_TIMER => { + self.sync.write().propagate_new_transactions(&mut io); + }, + _ => warn!("Unknown timer {} triggered.", timer), + } } } diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index 8f0aff7514..84e6344e68 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -149,6 +149,10 @@ const MAX_NEW_HASHES: usize = 64; const MAX_NEW_BLOCK_AGE: BlockNumber = 20; // maximal packet size with transactions (cannot be greater than 16MB - protocol limitation). const MAX_TRANSACTION_PACKET_SIZE: usize = 8 * 1024 * 1024; +// Maximal number of transactions queried from miner to propagate. +// This set is used to diff with transactions known by the peer and +// we will send a difference of length up to `MAX_TRANSACTIONS_TO_PROPAGATE`. +const MAX_TRANSACTIONS_TO_QUERY: usize = 4096; // Maximal number of transactions in sent in single packet. const MAX_TRANSACTIONS_TO_PROPAGATE: usize = 64; // Min number of blocks to be behind for a snapshot sync @@ -1143,7 +1147,7 @@ pub mod tests { use super::{PeerInfo, PeerAsking}; use ethcore::header::*; use ethcore::client::{BlockChainClient, EachBlockWith, TestBlockChainClient, ChainInfo, BlockInfo}; - use ethcore::miner::MinerService; + use ethcore::miner::{MinerService, PendingOrdering}; use private_tx::NoopPrivateTxHandler; pub fn get_dummy_block(order: u32, parent_hash: H256) -> Bytes { @@ -1355,7 +1359,7 @@ pub mod tests { let mut io = TestIo::new(&mut client, &ss, &queue, None); io.chain.miner.chain_new_blocks(io.chain, &[], &[], &[], &good_blocks, false); sync.chain_new_blocks(&mut io, &[], &[], &[], &good_blocks, &[], &[]); - assert_eq!(io.chain.miner.ready_transactions(io.chain).len(), 1); + assert_eq!(io.chain.miner.ready_transactions(io.chain, 10, PendingOrdering::Priority).len(), 1); } // We need to update nonce status (because we say that the block has been imported) for h in &[good_blocks[0]] { @@ -1371,7 +1375,7 @@ pub mod tests { } // then - assert_eq!(client.miner.ready_transactions(&client).len(), 1); + assert_eq!(client.miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); } #[test] diff --git a/ethcore/sync/src/chain/propagator.rs b/ethcore/sync/src/chain/propagator.rs index 4ae0518a53..75cf550f28 100644 --- a/ethcore/sync/src/chain/propagator.rs +++ b/ethcore/sync/src/chain/propagator.rs @@ -33,6 +33,7 @@ use super::{ MAX_PEERS_PROPAGATION, MAX_TRANSACTION_PACKET_SIZE, MAX_TRANSACTIONS_TO_PROPAGATE, + MAX_TRANSACTIONS_TO_QUERY, MIN_PEERS_PROPAGATION, CONSENSUS_DATA_PACKET, NEW_BLOCK_HASHES_PACKET, @@ -114,7 +115,7 @@ impl SyncPropagator { return 0; } - let transactions = io.chain().ready_transactions(); + let transactions = io.chain().ready_transactions(MAX_TRANSACTIONS_TO_QUERY); if transactions.is_empty() { return 0; } diff --git a/miner/src/lib.rs b/miner/src/lib.rs index 9dc180fefe..6b61df4de4 100644 --- a/miner/src/lib.rs +++ b/miner/src/lib.rs @@ -30,13 +30,14 @@ extern crate linked_hash_map; extern crate parking_lot; extern crate price_info; extern crate rlp; -extern crate trace_time; extern crate transaction_pool as txpool; #[macro_use] extern crate error_chain; #[macro_use] extern crate log; +#[macro_use] +extern crate trace_time; #[cfg(test)] extern crate rustc_hex; diff --git a/miner/src/pool/mod.rs b/miner/src/pool/mod.rs index 57f813157b..fd4ef6ef2e 100644 --- a/miner/src/pool/mod.rs +++ b/miner/src/pool/mod.rs @@ -16,7 +16,7 @@ //! Transaction Pool -use ethereum_types::{H256, Address}; +use ethereum_types::{U256, H256, Address}; use heapsize::HeapSizeOf; use transaction; use txpool; @@ -45,6 +45,43 @@ pub enum PrioritizationStrategy { GasPriceOnly, } +/// Transaction ordering when requesting pending set. +#[derive(Debug, PartialEq, Eq, Clone, Copy)] +pub enum PendingOrdering { + /// Get pending transactions ordered by their priority (potentially expensive) + Priority, + /// Get pending transactions without any care of particular ordering (cheaper). + Unordered, +} + +/// Pending set query settings +#[derive(Debug, Clone)] +pub struct PendingSettings { + /// Current block number (affects readiness of some transactions). + pub block_number: u64, + /// Current timestamp (affects readiness of some transactions). + pub current_timestamp: u64, + /// Nonce cap (for dust protection; EIP-168) + pub nonce_cap: Option, + /// Maximal number of transactions in pending the set. + pub max_len: usize, + /// Ordering of transactions. + pub ordering: PendingOrdering, +} + +impl PendingSettings { + /// Get all transactions (no cap or len limit) prioritized. + pub fn all_prioritized(block_number: u64, current_timestamp: u64) -> Self { + PendingSettings { + block_number, + current_timestamp, + nonce_cap: None, + max_len: usize::max_value(), + ordering: PendingOrdering::Priority, + } + } +} + /// Transaction priority. #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub(crate) enum Priority { diff --git a/miner/src/pool/queue.rs b/miner/src/pool/queue.rs index cf4a956f42..4351087b29 100644 --- a/miner/src/pool/queue.rs +++ b/miner/src/pool/queue.rs @@ -26,7 +26,10 @@ use parking_lot::RwLock; use transaction; use txpool::{self, Verifier}; -use pool::{self, scoring, verifier, client, ready, listener, PrioritizationStrategy}; +use pool::{ + self, scoring, verifier, client, ready, listener, + PrioritizationStrategy, PendingOrdering, PendingSettings, +}; use pool::local_transactions::LocalTransactionsList; type Listener = (LocalTransactionsList, (listener::Notifier, listener::Logger)); @@ -74,6 +77,7 @@ struct CachedPending { nonce_cap: Option, has_local_pending: bool, pending: Option>>, + max_len: usize, } impl CachedPending { @@ -85,6 +89,7 @@ impl CachedPending { has_local_pending: false, pending: None, nonce_cap: None, + max_len: 0, } } @@ -99,6 +104,7 @@ impl CachedPending { block_number: u64, current_timestamp: u64, nonce_cap: Option<&U256>, + max_len: usize, ) -> Option>> { // First check if we have anything in cache. let pending = self.pending.as_ref()?; @@ -123,7 +129,12 @@ impl CachedPending { return None; } - Some(pending.clone()) + // It's fine to just take a smaller subset, but not other way around. + if max_len > self.max_len { + return None; + } + + Some(pending.iter().take(max_len).cloned().collect()) } } @@ -173,7 +184,7 @@ impl TransactionQueue { transactions: Vec, ) -> Vec> { // Run verification - let _timer = ::trace_time::PerfTimer::new("pool::verify_and_import"); + trace_time!("pool::verify_and_import"); let options = self.options.read().clone(); let verifier = verifier::Verifier::new(client, options, self.insertion_id.clone()); @@ -203,13 +214,13 @@ impl TransactionQueue { results } - /// Returns all transactions in the queue ordered by priority. + /// Returns all transactions in the queue without explicit ordering. pub fn all_transactions(&self) -> Vec> { let ready = |_tx: &pool::VerifiedTransaction| txpool::Readiness::Ready; - self.pool.read().pending(ready).collect() + self.pool.read().unordered_pending(ready).collect() } - /// Returns current pneding transactions. + /// Returns current pending transactions ordered by priority. /// /// NOTE: This may return a cached version of pending transaction set. /// Re-computing the pending set is possible with `#collect_pending` method, @@ -217,24 +228,31 @@ impl TransactionQueue { pub fn pending( &self, client: C, - block_number: u64, - current_timestamp: u64, - nonce_cap: Option, + settings: PendingSettings, ) -> Vec> where C: client::NonceClient, { - - if let Some(pending) = self.cached_pending.read().pending(block_number, current_timestamp, nonce_cap.as_ref()) { + let PendingSettings { block_number, current_timestamp, nonce_cap, max_len, ordering } = settings; + if let Some(pending) = self.cached_pending.read().pending(block_number, current_timestamp, nonce_cap.as_ref(), max_len) { return pending; } // Double check after acquiring write lock let mut cached_pending = self.cached_pending.write(); - if let Some(pending) = cached_pending.pending(block_number, current_timestamp, nonce_cap.as_ref()) { + if let Some(pending) = cached_pending.pending(block_number, current_timestamp, nonce_cap.as_ref(), max_len) { return pending; } - let pending: Vec<_> = self.collect_pending(client, block_number, current_timestamp, nonce_cap, |i| i.collect()); + // In case we don't have a cached set, but we don't care about order + // just return the unordered set. + if let PendingOrdering::Unordered = ordering { + let ready = Self::ready(client, block_number, current_timestamp, nonce_cap); + return self.pool.read().unordered_pending(ready).take(max_len).collect(); + } + + let pending: Vec<_> = self.collect_pending(client, block_number, current_timestamp, nonce_cap, |i| { + i.take(max_len).collect() + }); *cached_pending = CachedPending { block_number, @@ -242,6 +260,7 @@ impl TransactionQueue { nonce_cap, has_local_pending: self.has_local_pending_transactions(), pending: Some(pending.clone()), + max_len, }; pending @@ -266,15 +285,27 @@ impl TransactionQueue { scoring::NonceAndGasPrice, Listener, >) -> T, + { + debug!(target: "txqueue", "Re-computing pending set for block: {}", block_number); + trace_time!("pool::collect_pending"); + let ready = Self::ready(client, block_number, current_timestamp, nonce_cap); + collect(self.pool.read().pending(ready)) + } + + fn ready( + client: C, + block_number: u64, + current_timestamp: u64, + nonce_cap: Option, + ) -> (ready::Condition, ready::State) where + C: client::NonceClient, { let pending_readiness = ready::Condition::new(block_number, current_timestamp); // don't mark any transactions as stale at this point. let stale_id = None; let state_readiness = ready::State::new(client, stale_id, nonce_cap); - let ready = (pending_readiness, state_readiness); - - collect(self.pool.read().pending(ready)) + (pending_readiness, state_readiness) } /// Culls all stalled transactions from the pool. @@ -415,6 +446,12 @@ impl TransactionQueue { let mut pool = self.pool.write(); (pool.listener_mut().1).0.add(f); } + + /// Check if pending set is cached. + #[cfg(test)] + pub fn is_pending_cached(&self) -> bool { + self.cached_pending.read().pending.is_some() + } } fn convert_error(err: txpool::Error) -> transaction::Error { @@ -440,7 +477,7 @@ mod tests { fn should_get_pending_transactions() { let queue = TransactionQueue::new(txpool::Options::default(), verifier::Options::default(), PrioritizationStrategy::GasPriceOnly); - let pending: Vec<_> = queue.pending(TestClient::default(), 0, 0, None); + let pending: Vec<_> = queue.pending(TestClient::default(), PendingSettings::all_prioritized(0, 0)); for tx in pending { assert!(tx.signed().nonce > 0.into()); diff --git a/miner/src/pool/tests/mod.rs b/miner/src/pool/tests/mod.rs index ac2e6b008e..ef83db4a90 100644 --- a/miner/src/pool/tests/mod.rs +++ b/miner/src/pool/tests/mod.rs @@ -18,7 +18,7 @@ use ethereum_types::U256; use transaction::{self, PendingTransaction}; use txpool; -use pool::{verifier, TransactionQueue, PrioritizationStrategy}; +use pool::{verifier, TransactionQueue, PrioritizationStrategy, PendingSettings, PendingOrdering}; pub mod tx; pub mod client; @@ -108,7 +108,7 @@ fn should_handle_same_transaction_imported_twice_with_different_state_nonces() { // and then there should be only one transaction in current (the one with higher gas_price) assert_eq!(res, vec![Ok(())]); assert_eq!(txq.status().status.transaction_count, 1); - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top[0].hash, hash); } @@ -133,7 +133,7 @@ fn should_move_all_transactions_from_future() { // then assert_eq!(res, vec![Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top[0].hash, hash); assert_eq!(top[1].hash, hash2); } @@ -207,7 +207,7 @@ fn should_import_txs_from_same_sender() { txq.import(TestClient::new(), txs.local().into_vec()); // then - let top = txq.pending(TestClient::new(), 0 ,0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0 ,0)); assert_eq!(top[0].hash, hash); assert_eq!(top[1].hash, hash2); assert_eq!(top.len(), 2); @@ -229,7 +229,7 @@ fn should_prioritize_local_transactions_within_same_nonce_height() { assert_eq!(res, vec![Ok(()), Ok(())]); // then - let top = txq.pending(client, 0, 0, None); + let top = txq.pending(client, PendingSettings::all_prioritized(0, 0)); assert_eq!(top[0].hash, hash); // local should be first assert_eq!(top[1].hash, hash2); assert_eq!(top.len(), 2); @@ -251,7 +251,7 @@ fn should_prioritize_reimported_transactions_within_same_nonce_height() { assert_eq!(res, vec![Ok(()), Ok(())]); // then - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top[0].hash, hash); // retracted should be first assert_eq!(top[1].hash, hash2); assert_eq!(top.len(), 2); @@ -270,7 +270,7 @@ fn should_not_prioritize_local_transactions_with_different_nonce_height() { assert_eq!(res, vec![Ok(()), Ok(())]); // then - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top[0].hash, hash); assert_eq!(top[1].hash, hash2); assert_eq!(top.len(), 2); @@ -288,7 +288,7 @@ fn should_put_transaction_to_futures_if_gap_detected() { // then assert_eq!(res, vec![Ok(()), Ok(())]); - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top.len(), 1); assert_eq!(top[0].hash, hash); } @@ -308,9 +308,9 @@ fn should_handle_min_block() { assert_eq!(res, vec![Ok(()), Ok(())]); // then - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top.len(), 0); - let top = txq.pending(TestClient::new(), 1, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(1, 0)); assert_eq!(top.len(), 2); } @@ -341,7 +341,7 @@ fn should_move_transactions_if_gap_filled() { let res = txq.import(TestClient::new(), vec![tx, tx2].local()); assert_eq!(res, vec![Ok(()), Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 1); // when let res = txq.import(TestClient::new(), vec![tx1.local()]); @@ -349,7 +349,7 @@ fn should_move_transactions_if_gap_filled() { // then assert_eq!(txq.status().status.transaction_count, 3); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 3); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 3); } #[test] @@ -361,12 +361,12 @@ fn should_remove_transaction() { let res = txq.import(TestClient::default(), vec![tx, tx2].local()); assert_eq!(res, vec![Ok(()), Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 1); // when txq.cull(TestClient::new().with_nonce(124)); assert_eq!(txq.status().status.transaction_count, 1); - assert_eq!(txq.pending(TestClient::new().with_nonce(125), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new().with_nonce(125), PendingSettings::all_prioritized(0, 0)).len(), 1); txq.cull(TestClient::new().with_nonce(126)); // then @@ -384,19 +384,19 @@ fn should_move_transactions_to_future_if_gap_introduced() { let res = txq.import(TestClient::new(), vec![tx3, tx2].local()); assert_eq!(res, vec![Ok(()), Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 1); let res = txq.import(TestClient::new(), vec![tx].local()); assert_eq!(res, vec![Ok(())]); assert_eq!(txq.status().status.transaction_count, 3); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 3); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 3); // when txq.remove(vec![&hash], true); // then assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 1); } #[test] @@ -447,7 +447,7 @@ fn should_prefer_current_transactions_when_hitting_the_limit() { assert_eq!(res, vec![Ok(())]); assert_eq!(txq.status().status.transaction_count, 1); - let top = txq.pending(TestClient::new(), 0, 0, None); + let top = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); assert_eq!(top.len(), 1); assert_eq!(top[0].hash, hash); assert_eq!(txq.next_nonce(TestClient::new(), &sender), Some(124.into())); @@ -494,19 +494,19 @@ fn should_accept_same_transaction_twice_if_removed() { let res = txq.import(TestClient::new(), txs.local().into_vec()); assert_eq!(res, vec![Ok(()), Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 2); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 2); // when txq.remove(vec![&hash], true); assert_eq!(txq.status().status.transaction_count, 1); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 0); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 0); let res = txq.import(TestClient::new(), vec![tx1].local()); assert_eq!(res, vec![Ok(())]); // then assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 2); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 2); } #[test] @@ -526,8 +526,8 @@ fn should_not_replace_same_transaction_if_the_fee_is_less_than_minimal_bump() { // then assert_eq!(res, vec![Err(transaction::Error::TooCheapToReplace), Ok(())]); assert_eq!(txq.status().status.transaction_count, 2); - assert_eq!(txq.pending(client.clone(), 0, 0, None)[0].signed().gas_price, U256::from(20)); - assert_eq!(txq.pending(client.clone(), 0, 0, None)[1].signed().gas_price, U256::from(2)); + assert_eq!(txq.pending(client.clone(), PendingSettings::all_prioritized(0, 0))[0].signed().gas_price, U256::from(20)); + assert_eq!(txq.pending(client.clone(), PendingSettings::all_prioritized(0, 0))[1].signed().gas_price, U256::from(2)); } #[test] @@ -569,7 +569,7 @@ fn should_return_valid_last_nonce_after_cull() { let client = TestClient::new().with_nonce(124); txq.cull(client.clone()); // tx2 should be not be promoted to current - assert_eq!(txq.pending(client.clone(), 0, 0, None).len(), 0); + assert_eq!(txq.pending(client.clone(), PendingSettings::all_prioritized(0, 0)).len(), 0); // then assert_eq!(txq.next_nonce(client.clone(), &sender), None); @@ -667,7 +667,7 @@ fn should_accept_local_transactions_below_min_gas_price() { assert_eq!(res, vec![Ok(())]); // then - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 1); } #[test] @@ -685,7 +685,7 @@ fn should_accept_local_service_transaction() { assert_eq!(res, vec![Ok(())]); // then - assert_eq!(txq.pending(TestClient::new(), 0, 0, None).len(), 1); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)).len(), 1); } #[test] @@ -726,15 +726,77 @@ fn should_not_return_transactions_over_nonce_cap() { assert_eq!(res, vec![Ok(()), Ok(()), Ok(())]); // when - let all = txq.pending(TestClient::new(), 0, 0, None); + let all = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); // This should invalidate the cache! - let limited = txq.pending(TestClient::new(), 0, 0, Some(123.into())); + let limited = txq.pending(TestClient::new(), PendingSettings { + block_number: 0, + current_timestamp: 0, + nonce_cap: Some(123.into()), + max_len: usize::max_value(), + ordering: PendingOrdering::Priority, + }); // then assert_eq!(all.len(), 3); assert_eq!(limited.len(), 1); } +#[test] +fn should_return_cached_pending_even_if_unordered_is_requested() { + // given + let txq = new_queue(); + let tx1 = Tx::default().signed(); + let (tx2_1, tx2_2)= Tx::default().signed_pair(); + let tx2_1_hash = tx2_1.hash(); + let res = txq.import(TestClient::new(), vec![tx1].unverified()); + assert_eq!(res, vec![Ok(())]); + let res = txq.import(TestClient::new(), vec![tx2_1, tx2_2].local()); + assert_eq!(res, vec![Ok(()), Ok(())]); + + // when + let all = txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 0)); + assert_eq!(all[0].hash, tx2_1_hash); + assert_eq!(all.len(), 3); + + // This should not invalidate the cache! + let limited = txq.pending(TestClient::new(), PendingSettings { + block_number: 0, + current_timestamp: 0, + nonce_cap: None, + max_len: 3, + ordering: PendingOrdering::Unordered, + }); + + // then + assert_eq!(all, limited); +} + +#[test] +fn should_return_unordered_and_not_populate_the_cache() { + // given + let txq = new_queue(); + let tx1 = Tx::default().signed(); + let (tx2_1, tx2_2)= Tx::default().signed_pair(); + let res = txq.import(TestClient::new(), vec![tx1].unverified()); + assert_eq!(res, vec![Ok(())]); + let res = txq.import(TestClient::new(), vec![tx2_1, tx2_2].local()); + assert_eq!(res, vec![Ok(()), Ok(())]); + + // when + // This should not invalidate the cache! + let limited = txq.pending(TestClient::new(), PendingSettings { + block_number: 0, + current_timestamp: 0, + nonce_cap: None, + max_len: usize::max_value(), + ordering: PendingOrdering::Unordered, + }); + + // then + assert_eq!(limited.len(), 3); + assert!(!txq.is_pending_cached()); +} + #[test] fn should_clear_cache_after_timeout_for_local() { // given @@ -748,12 +810,12 @@ fn should_clear_cache_after_timeout_for_local() { // This should populate cache and set timestamp to 1 // when - assert_eq!(txq.pending(TestClient::new(), 0, 1, None).len(), 0); - assert_eq!(txq.pending(TestClient::new(), 0, 1000, None).len(), 0); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 1)).len(), 0); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 1000)).len(), 0); // This should invalidate the cache and trigger transaction ready. // then - assert_eq!(txq.pending(TestClient::new(), 0, 1002, None).len(), 2); + assert_eq!(txq.pending(TestClient::new(), PendingSettings::all_prioritized(0, 1002)).len(), 2); } #[test] diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index ce30f3cd85..31af69eaa0 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -304,7 +304,7 @@ impl FullDependencies { let client = EthPubSubClient::new(self.client.clone(), self.remote.clone()); let h = client.handler(); self.miner.add_transactions_listener(Box::new(move |hashes| if let Some(h) = h.upgrade() { - h.new_transactions(hashes); + h.notify_new_transactions(hashes); })); if let Some(h) = client.handler().upgrade() { @@ -525,7 +525,7 @@ impl LightDependencies { let h = client.handler(); self.transaction_queue.write().add_listener(Box::new(move |transactions| { if let Some(h) = h.upgrade() { - h.new_transactions(transactions); + h.notify_new_transactions(transactions); } })); handler.extend_with(EthPubSub::to_delegate(client)); diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 338a892682..d227f45f53 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -36,7 +36,7 @@ jsonrpc-macros = { git = "https://github.com/paritytech/jsonrpc.git", branch = " jsonrpc-pubsub = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } ethash = { path = "../ethash" } -ethcore = { path = "../ethcore" } +ethcore = { path = "../ethcore", features = ["test-helpers"] } ethcore-bytes = { path = "../util/bytes" } ethcore-crypto = { path = "../ethcore/crypto" } ethcore-devtools = { path = "../devtools" } diff --git a/rpc/src/v1/impls/eth_filter.rs b/rpc/src/v1/impls/eth_filter.rs index bbad2fe27d..c91070cbfb 100644 --- a/rpc/src/v1/impls/eth_filter.rs +++ b/rpc/src/v1/impls/eth_filter.rs @@ -85,7 +85,7 @@ impl Filterable for EthFilterClient where } fn pending_transactions_hashes(&self) -> Vec { - self.miner.ready_transactions(&*self.client) + self.miner.ready_transactions(&*self.client, usize::max_value(), miner::PendingOrdering::Priority) .into_iter() .map(|tx| tx.signed().hash()) .collect() diff --git a/rpc/src/v1/impls/eth_pubsub.rs b/rpc/src/v1/impls/eth_pubsub.rs index 11fef2e0bd..38162e8ea1 100644 --- a/rpc/src/v1/impls/eth_pubsub.rs +++ b/rpc/src/v1/impls/eth_pubsub.rs @@ -175,7 +175,7 @@ impl ChainNotificationHandler { } /// Notify all subscribers about new transaction hashes. - pub fn new_transactions(&self, hashes: &[H256]) { + pub fn notify_new_transactions(&self, hashes: &[H256]) { for subscriber in self.transactions_subscribers.read().values() { for hash in hashes { Self::notify(&self.remote, subscriber, pubsub::Result::TransactionHash((*hash).into())); diff --git a/rpc/src/v1/impls/light/parity.rs b/rpc/src/v1/impls/light/parity.rs index 91db00ca30..6e93132b92 100644 --- a/rpc/src/v1/impls/light/parity.rs +++ b/rpc/src/v1/impls/light/parity.rs @@ -264,12 +264,13 @@ impl Parity for ParityClient { .map(Into::into) } - fn pending_transactions(&self) -> Result> { + fn pending_transactions(&self, limit: Trailing) -> Result> { let txq = self.light_dispatch.transaction_queue.read(); let chain_info = self.light_dispatch.client.chain_info(); Ok( txq.ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp) .into_iter() + .take(limit.unwrap_or_else(usize::max_value)) .map(|tx| Transaction::from_pending(tx, chain_info.best_block_number, self.eip86_transition)) .collect::>() ) diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index f18723eafe..d7c26014ed 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -303,15 +303,19 @@ impl Parity for ParityClient where .map(Into::into) } - fn pending_transactions(&self) -> Result> { + fn pending_transactions(&self, limit: Trailing) -> Result> { let block_number = self.client.chain_info().best_block_number; - let ready_transactions = self.miner.ready_transactions(&*self.client); + let ready_transactions = self.miner.ready_transactions( + &*self.client, + limit.unwrap_or_else(usize::max_value), + miner::PendingOrdering::Priority, + ); Ok(ready_transactions .into_iter() .map(|t| Transaction::from_pending(t.pending().clone(), block_number, self.eip86_transition)) .collect() - ) + ) } fn all_transactions(&self) -> Result> { diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index 90201e346a..8d0ec23ae1 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -27,7 +27,7 @@ use ethcore::engines::EthEngine; use ethcore::error::Error; use ethcore::header::{BlockNumber, Header}; use ethcore::ids::BlockId; -use ethcore::miner::{MinerService, AuthoringParams}; +use ethcore::miner::{self, MinerService, AuthoringParams}; use ethcore::receipt::{Receipt, RichReceipt}; use ethereum_types::{H256, U256, Address}; use miner::pool::local_transactions::Status as LocalTransactionStatus; @@ -208,7 +208,7 @@ impl MinerService for TestMinerService { self.local_transactions.lock().iter().map(|(hash, stats)| (*hash, stats.clone())).collect() } - fn ready_transactions(&self, _chain: &C) -> Vec> { + fn ready_transactions(&self, _chain: &C, _max_len: usize, _ordering: miner::PendingOrdering) -> Vec> { self.queued_transactions() } diff --git a/rpc/src/v1/tests/mocked/eth_pubsub.rs b/rpc/src/v1/tests/mocked/eth_pubsub.rs index 0d886fe2f1..30c99fc67a 100644 --- a/rpc/src/v1/tests/mocked/eth_pubsub.rs +++ b/rpc/src/v1/tests/mocked/eth_pubsub.rs @@ -181,7 +181,7 @@ fn should_subscribe_to_pending_transactions() { assert_eq!(io.handle_request_sync(request, metadata.clone()), Some(response.to_owned())); // Send new transactions - handler.new_transactions(&[5.into(), 7.into()]); + handler.notify_new_transactions(&[5.into(), 7.into()]); let (res, receiver) = receiver.into_future().wait().unwrap(); let response = r#"{"jsonrpc":"2.0","method":"eth_subscription","params":{"result":"0x0000000000000000000000000000000000000000000000000000000000000005","subscription":"0x416d77337e24399d"}}"#; diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index f78cf8052e..1b9a7d09f5 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -141,7 +141,7 @@ build_rpc_trait! { /// Returns all pending transactions from transaction queue. #[rpc(name = "parity_pendingTransactions")] - fn pending_transactions(&self) -> Result>; + fn pending_transactions(&self, Trailing) -> Result>; /// Returns all transactions from transaction queue. /// diff --git a/transaction-pool/Cargo.toml b/transaction-pool/Cargo.toml index 8965c8cee0..0ba1790a47 100644 --- a/transaction-pool/Cargo.toml +++ b/transaction-pool/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Generic transaction pool." name = "transaction-pool" -version = "1.12.0" +version = "1.12.1" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/transaction-pool/src/pool.rs b/transaction-pool/src/pool.rs index dcd52a3e7e..4bbf00ef24 100644 --- a/transaction-pool/src/pool.rs +++ b/transaction-pool/src/pool.rs @@ -15,7 +15,8 @@ // along with Parity. If not, see . use std::sync::Arc; -use std::collections::{HashMap, BTreeSet}; +use std::slice; +use std::collections::{hash_map, HashMap, BTreeSet}; use error; use listener::{Listener, NoopListener}; @@ -416,7 +417,16 @@ impl Pool where PendingIterator { ready, best_transactions, - pool: self + pool: self, + } + } + + /// Returns unprioritized list of ready transactions. + pub fn unordered_pending>(&self, ready: R) -> UnorderedIterator { + UnorderedIterator { + ready, + senders: self.transactions.iter(), + transactions: None, } } @@ -482,6 +492,50 @@ impl Pool where } } +/// An iterator over all pending (ready) transactions in unoredered fashion. +/// +/// NOTE: Current implementation will iterate over all transactions from particular sender +/// ordered by nonce, but that might change in the future. +/// +/// NOTE: the transactions are not removed from the queue. +/// You might remove them later by calling `cull`. +pub struct UnorderedIterator<'a, T, R, S> where + T: VerifiedTransaction + 'a, + S: Scoring + 'a, +{ + ready: R, + senders: hash_map::Iter<'a, T::Sender, Transactions>, + transactions: Option>>, +} + +impl<'a, T, R, S> Iterator for UnorderedIterator<'a, T, R, S> where + T: VerifiedTransaction, + R: Ready, + S: Scoring, +{ + type Item = Arc; + + fn next(&mut self) -> Option { + loop { + if let Some(transactions) = self.transactions.as_mut() { + if let Some(tx) = transactions.next() { + match self.ready.is_ready(&tx) { + Readiness::Ready => { + return Some(tx.transaction.clone()); + }, + state => trace!("[{:?}] Ignoring {:?} transaction.", tx.hash(), state), + } + } + } + + // otherwise fallback and try next sender + let next_sender = self.senders.next()?; + self.transactions = Some(next_sender.1.iter()); + } + } +} + + /// An iterator over all pending (ready) transactions. /// NOTE: the transactions are not removed from the queue. /// You might remove them later by calling `cull`. diff --git a/transaction-pool/src/tests/mod.rs b/transaction-pool/src/tests/mod.rs index 6edd60e60e..77c2528757 100644 --- a/transaction-pool/src/tests/mod.rs +++ b/transaction-pool/src/tests/mod.rs @@ -250,6 +250,66 @@ fn should_construct_pending() { assert_eq!(pending.next(), None); } +#[test] +fn should_return_unordered_iterator() { + // given + let b = TransactionBuilder::default(); + let mut txq = TestPool::default(); + + let tx0 = txq.import(b.tx().nonce(0).gas_price(5).new()).unwrap(); + let tx1 = txq.import(b.tx().nonce(1).gas_price(5).new()).unwrap(); + let tx2 = txq.import(b.tx().nonce(2).new()).unwrap(); + let tx3 = txq.import(b.tx().nonce(3).gas_price(4).new()).unwrap(); + //gap + txq.import(b.tx().nonce(5).new()).unwrap(); + + let tx5 = txq.import(b.tx().sender(1).nonce(0).new()).unwrap(); + let tx6 = txq.import(b.tx().sender(1).nonce(1).new()).unwrap(); + let tx7 = txq.import(b.tx().sender(1).nonce(2).new()).unwrap(); + let tx8 = txq.import(b.tx().sender(1).nonce(3).gas_price(4).new()).unwrap(); + // gap + txq.import(b.tx().sender(1).nonce(5).new()).unwrap(); + + let tx9 = txq.import(b.tx().sender(2).nonce(0).new()).unwrap(); + assert_eq!(txq.light_status().transaction_count, 11); + assert_eq!(txq.status(NonceReady::default()), Status { + stalled: 0, + pending: 9, + future: 2, + }); + assert_eq!(txq.status(NonceReady::new(1)), Status { + stalled: 3, + pending: 6, + future: 2, + }); + + // when + let all: Vec<_> = txq.unordered_pending(NonceReady::default()).collect(); + + let chain1 = vec![tx0, tx1, tx2, tx3]; + let chain2 = vec![tx5, tx6, tx7, tx8]; + let chain3 = vec![tx9]; + + assert_eq!(all.len(), chain1.len() + chain2.len() + chain3.len()); + + let mut options = vec![ + vec![chain1.clone(), chain2.clone(), chain3.clone()], + vec![chain2.clone(), chain1.clone(), chain3.clone()], + vec![chain2.clone(), chain3.clone(), chain1.clone()], + vec![chain3.clone(), chain2.clone(), chain1.clone()], + vec![chain3.clone(), chain1.clone(), chain2.clone()], + vec![chain1.clone(), chain3.clone(), chain2.clone()], + ].into_iter().map(|mut v| { + let mut first = v.pop().unwrap(); + for mut x in v { + first.append(&mut x); + } + first + }); + + assert!(options.any(|opt| all == opt)); +} + #[test] fn should_update_scoring_correctly() { // given -- GitLab From 0bb78814a60d1abc759ded380906a79cf3474f78 Mon Sep 17 00:00:00 2001 From: Vladyslav Lupashevskyi Date: Tue, 12 Jun 2018 10:31:14 +0300 Subject: [PATCH 032/191] Tx permission contract improvement (#8400) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Tx permission contract improvement * Use tuple for to address * Introduced ABI for deprecated tx permission contract * Improved ABI for tx permission contract with contract name, name hash and version * Introduced support for deprecated tx permission contract + fixed cache for the new version + introduced `target` for tx filter loging * Introduced test for the new tx permission contract version + old test renamed as deprecated * Removed empty lines * Introduced filter_only_sender return value in allowedTxTypes fn + improved caching * Introduced version checking for tx permission contract * Moved tx permission contract test genesis specs to separate files * handle queue import errors a bit more gracefully (#8385) * Some tweaks to main.rs for parity as a library (#8370) * Some tweaks to main.rs for parity as a library * Remove pub from PostExecutionAction * New Transaction Queue implementation (#8074) * Implementation of Verifier, Scoring and Ready. * Queue in progress. * TransactionPool. * Prepare for txpool release. * Miner refactor [WiP] * WiP reworking miner. * Make it compile. * Add some docs. * Split blockchain access to a separate file. * Work on miner API. * Fix ethcore tests. * Refactor miner interface for sealing/work packages. * Implement next nonce. * RPC compiles. * Implement couple of missing methdods for RPC. * Add transaction queue listeners. * Compiles! * Clean-up and parallelize. * Get rid of RefCell in header. * Revert "Get rid of RefCell in header." This reverts commit 0f2424c9b7319a786e1565ea2a8a6d801a21b4fb. * Override Sync requirement. * Fix status display. * Unify logging. * Extract some cheap checks. * Measurements and optimizations. * Fix scoring bug, heap size of bug and add cache * Disable tx queueing and parallel verification. * Make ethcore and ethcore-miner compile again. * Make RPC compile again. * Bunch of txpool tests. * Migrate transaction queue tests. * Nonce Cap * Nonce cap cache and tests. * Remove stale future transactions from the queue. * Optimize scoring and write some tests. * Simple penalization. * Clean up and support for different scoring algorithms. * Add CLI parameters for the new queue. * Remove banning queue. * Disable debug build. * Change per_sender limit to be 1% instead of 5% * Avoid cloning when propagating transactions. * Remove old todo. * Post-review fixes. * Fix miner options default. * Implement back ready transactions for light client. * Get rid of from_pending_block * Pass rejection reason. * Add more details to drop. * Rollback heap size of. * Avoid cloning hashes when propagating and include more details on rejection. * Fix tests. * Introduce nonces cache. * Remove uneccessary hashes allocation. * Lower the mem limit. * Re-enable parallel verification. * Add miner log. Don't check the type if not below min_gas_price. * Add more traces, fix disabling miner. * Fix creating pending blocks twice on AuRa authorities. * Fix tests. * re-use pending blocks in AuRa * Use reseal_min_period to prevent too frequent update_sealing. * Fix log to contain hash not sender. * Optimize local transactions. * Fix aura tests. * Update locks comments. * Get rid of unsafe Sync impl. * Review fixes. * Remove excessive matches. * Fix compilation errors. * Use new pool in private transactions. * Fix private-tx test. * Fix secret store tests. * Actually use gas_floor_target * Fix config tests. * Fix pool tests. * Address grumbles. * clarify that windows need perl and yasm (#8402) * Unify and limit rocksdb dependency places (#8371) * secret_store: remove kvdb_rocksdb dependency * cli: init db mod for open dispatch * cli: move db, client_db, restoration_db, secretstore_db to a separate mod * migration: rename to migration-rocksdb and remove ethcore-migrations * ethcore: re-move kvdb-rocksdb dep to test * mark test_helpers as test only and fix migration mod naming * Move restoration_db_handler to test_helpers_internal * Fix missing preambles in test_helpers_internal and rocksdb/helpers * Move test crates downward * Fix missing docs * cli, db::open_db: move each argument to a separate line * Use featuregate instead of dead code for `open_secretstore_db` * Move pathbuf import to open_secretstore_db Because it's only used there behind a feature gate * Use tokio::spawn in secret_store listener and fix Uri (#8373) * Directly wait for future to resolve in a threadpool * Ignore return value * Use path.starts_with instead of req_uri.is_absolute The later now means something else in hyper 0.11.. * Use tokio::spawn * typo: remove accidential unsafe impl * remove Tendermint extra_info due to seal inconsistencies (#8367) * More code refactoring to integrate Duration (#8322) * More code refactoring to integrate Duration * Fix typo * Fix tests * More test fix * tokio-core v0.1.16 -> v0.1.17 (#8408) * Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316) * WIP * Replace Rlp with UntrustedRlp in views, explicity unwrap with expect First pass to get it to compile. Need to figure out whether to do this or to propogate Errors upstream, which would require many more changes to dependent code. If we do this way we are assuming that the views are always used in a context where the rlp is trusted to be valid e.g. when reading from our own DB. So need to fid out whether views are used with data received from an untrusted (e.g. extrernal peer). * Remove original Rlp impl, rename UntrustedRlp -> Rlp * Create rlp views with view! macro to record debug info Views are assumed to be over valid rlp, so if there is a decoding error we record where the view was created in the first place and report it in the expect * Use $crate in view! macro to avoid import, fix tests * Expect valid rlp in decode functions for now * Replace spaces with tabs in new file * Add doc tests for creating views with macro * Update rlp docs to reflect removing of UntrustedRlp * Replace UntrustedRlp usages in private-tx merge * Fix TODO comments (#8413) * update zip to 0.3 (#8381) * update zip to 0.3 * enable zip deflate feature * typo, docs parity_chainId: empty string -> None (#8434) * Fix receipts stripping. (#8414) * Changelogs for 1.9.6 and 1.10.1 (#8411) * Add changelog for 1.9.6 * Add Changelog for 1.10.1 * Move ethcore::Error to error_chain (#8386) * WIP * Convert Ethcore error to use error_chain * Use error_chain for ImportError and BlockImportError * Fix error pattern matches for error_chain in miner * Implement explicit From for AccountsError * Fix pattern matches for ErrorKinds * Handle ethcore error_chain in light client * Explicitly define Result type to avoid shadowing * Fix remaining Error pattern matches * Fix tab space formatting * Helps if the tests compile * Fix error chain matching after merge * remove From::from. (#8390) * Some tiny modifications. 1. fix some typo in the comment. 2. sort the order of methods in 'impl state::Backend for StateDB` * Remove the clone of code_cache, as it has been done in clone_basic. * remove From::from. It seems not necessary. * Use forked app_dirs crate for reverted Windows dir behavior (#8438) * Remove unused appdirs dependency in CLI * Use forked app_dirs crate for reverted Windows dir behavior * Permission fix (#8441) * Block reward contract (#8419) * engine: add block reward contract abi and helper client * aura: add support for block reward contract * engine: test block reward contract client * aura: test block reward contract * engine + aura: add missing docs * engine: share SystemCall type alias * aura: add transition for block reward contract * engine: fix example block reward contract source link and bytecode * Improve VM executor stack size estimation rules (#8439) * Improve VM executor stack size estimation rules * typo: docs add "(Debug build)" comment * Fix an off by one typo and set minimal stack size This avoids the case if `depth_threshold == max_depth`. Usually setting stack size to zero will just rebound it to platform minimal stack size, but we set it here just in case. * Use saturating_sub to avoid potential overflow * Private transactions processing error handling (#8431) * Integration test for private transaction returned * Do not interrupt verification in case of errors * Helpers use specified * Review comments fixed * Update Cargo hidapi-rs dependency (#8447) * Allow 32 bit pipelines to fail (#8454) * Disable 32bit tragets for gitlab * Rename linux pipelines * Update wasmi (#8452) * Return error in case eth_call returns VM errors (#8448) * Add VMError generator * Return executed exceptions in eth_call * ParityShell::open `Return result` (#8377) * start * add error handling for winapi * fix typo * fix warnings and windows errors * formatting * Address review comments * fix docker build (#8462) * Add changelog for 1.9.7 and 1.10.2 (#8460) * Add changelog for 1.9.7 * Add Changelog for 1.10.2 * Apply proper markdown * Run a spellchecker :) * Be pedantic about the 32-bit pipelines :) * fix typos in vm description comment (#8446) * Use rename_all for RichBlock and RichHeader serialization (#8471) * typo: fix a resolved TODO comment * Use rename_all instead of individual renames * Don't require write lock when fetching status. (#8481) * Bump master to 1.12 (#8477) * Bump master to 1.12 * Bump crates to 1.12 * Bump mac installer version to 1.12 * Update Gitlab scripts * Fix snap builds (#8483) * Update hardcodedSync for Ethereum, Kovan, and Ropsten (#8489) * Update wasmi and pwasm-utils (#8493) * Update wasmi to 0.2 New wasmi supports 32bit platforms and no longer requires a special feature to build for such platforms. * Update pwasm-utils to 0.1.5 * Remove three old warp boot nodes. (#8497) * Return error if RLP size of transaction exceeds the limit (#8473) * Return error if RLP size of transaction exceeds the limit * Review comments fixed * RLP check moved to verifier, corresponding pool test added * `duration_ns: u64 -> duration: Duration` (#8457) * duration_ns: u64 -> duration: Duration * format on millis {:.2} -> {} * Remove unused dependency `bigint` (#8505) * remove unused dependency bigint in * remove bigint in rpc_cli * Show imported messages for light client (#8517) * Directly return None if tracing is disabled (#8504) * Directly return None if tracing is disabled * Address gumbles: release read locks as fast as possible * Hardware Wallet trait (#8071) * getting started with replacing HardwareWalletManager * trezor and ledger impls the new trait with some drawbacks * Everything move to the new trait * It required lifetime annotations in the trait because [u8] in unsized * Lets now start moving entry point from HardwareWalletManager * rename trait to Wallet * move thread management to the actual wallets * Moved thread management to each respective Wallet * Cleaned up pub items that is needed to be pub * Wallet trait more or less finished * Cleaned up docs * fix tests * omit removed docs * fix spelling, naming och remove old comments * ledger test is broken, add correct logging format * So locally on my machine Linux Ubuntu 17.10 the test doesn't panic but on the CI server libusb::Context::new() fails which I don't understand because it has worked before * Additionally the ledger test is optional so I lean toward ignoring it the CI Server * ignore hardware tests by default * more verbose checking in ledger test * SecretStore: merge two types of errors into single one + Error::is_non_fatal (#8357) * SecretStore: error unify initial commit SecretStore: pass real error in error messages SecretStore: is_internal_error -> Error::is_non_fatal warnings SecretStore: ConsensusTemporaryUnreachable fix after merge removed comments removed comments SecretStore: updated HTTP error responses SecretStore: more ConsensusTemporaryUnreachable tests fix after rebase * fixed grumbles * use HashSet in tests * Enable WebAssembly and Byzantium for Ellaism (#8520) * Enable WebAssembly and Byzantium for Ellaism * Fix indentation * Remove empty lines * More changes for Android (#8421) * Transaction Pool improvements (#8470) * Don't use ethereum_types in transaction pool. * Hide internal insertion_id. * Fix tests. * Review grumbles. * Fetching logs by hash in blockchain database (#8463) * Fetch logs by hash in blockchain database * Fix tests * Add unit test for branch block logs fetching * Add docs that blocks must already be sorted * Handle branch block cases properly * typo: empty -> is_empty * Remove return_empty_if_none by using a closure * Use BTreeSet to avoid sorting again * Move is_canon to BlockChain * typo: pass value by reference * Use loop and wrap inside blocks to simplify the code Borrowed from https://github.com/paritytech/parity/pull/8463#discussion_r183453326 * typo: missed a comment * Pass on storage keys tracing to handle the case when it is not modified (#8491) * Pass on storage keys even if it is not modified * typo: account and storage query `to_pod_diff` builds both `touched_addresses` merge and storage keys merge. * Fix tests * Use state query directly because of suicided accounts * Fix a RefCell borrow issue * Add tests for unmodified storage trace * Address grumbles * typo: remove unwanted empty line * ensure_cached compiles with the original signature * Don't panic in import_block if invalid rlp (#8522) * Don't panic in import_block if invalid rlp * Remove redundant type annotation * Replace RLP header view usage with safe decoding Using the view will panic with invalid RLP. Here we use Rlp decoding directly which will return a `Result<_, DecoderError>`. While this path currently should not have any invalid RLP - it makes it safer if ever called with invalid RLP from other code paths. * Remove expect (#8536) * Remove expect and propagate rlp::DecoderErrors as TrieErrors * EIP 145: Bitwise shifting instructions in EVM (#8451) * Add SHL, SHR, SAR opcodes * Add have_bitwise_shifting schedule flag * Add all EIP tests for SHL * Add SHR implementation and tests * Implement SAR and add tests * Add eip145transition config param * Change map_or to map_or_else when possible * Consolidate crypto functionality in `ethcore-crypto`. (#8432) * Consolidate crypto functionality in `ethcore-crypto`. - Move `ecdh`/`ecies` modules to `ethkey`. - Refactor `ethcore-crypto` to use file per module. - Replace `subtle` with `ethcore_crypto::is_equal`. - Add `aes_gcm` module to `ethcore-crypto`. * Rename `aes::{encrypt,decrypt,decrypt_cbc}` ... ... to `aes::{encrypt_128_ctr,decrypt_128_ctr,decrypt_128_cbc}`. * ethcore, rpc, machine: refactor block reward application and tracing (#8490) * Keep all enacted blocks notify in order (#8524) * Keep all enacted blocks notify in order * Collect is unnecessary * Update ChainNotify to use ChainRouteType * Fix all ethcore fn defs * Wrap the type within ChainRoute * Fix private-tx and sync api * Fix secret_store API * Fix updater API * Fix rpc api * Fix informant api * Eagerly cache enacted/retracted and remove contain_enacted/retracted * Fix indent * tests: should use full expr form for struct constructor * Use into_enacted_retracted to further avoid copy * typo: not a function * rpc/tests: ChainRoute -> ChainRoute::new * Node table sorting according to last contact data (#8541) * network-devp2p: sort nodes in node table using last contact data * network-devp2p: rename node contact types in node table json output * network-devp2p: fix node table tests * network-devp2p: note node failure when failed to establish connection * network-devp2p: handle UselessPeer error * network-devp2p: note failure when marking node as useless * Rlp decode returns Result (#8527) rlp::decode returns Result Make a best effort to handle decoding errors gracefully throughout the code, using `expect` where the value is guaranteed to be valid (and in other places where it makes sense). * Parity as a library (#8412) * Parity as a library * Fix concerns * Allow using a null on_client_restart_cb * Fix more concerns * Test the C library in test.sh * Reduce CMake version to 3.5 * Move the clib test before cargo test * Add println in test * Trace precompiled contracts when the transfer value is not zero (#8486) * Trace precompiled contracts when the transfer value is not zero * Add tests for precompiled CALL tracing * Use byzantium test machine for the new test * Add notes in comments on why we don't trace all precompileds * Use is_transferred instead of transferred * Don't block sync when importing old blocks (#8530) * Alter IO queueing. * Don't require IoMessages to be Clone * Ancient blocks imported via IoChannel. * Get rid of private transactions io message. * Get rid of deadlock and fix disconnected handler. * Revert to old disconnect condition. * Fix tests. * Fix deadlock. * Make trace-time publishable. (#8568) * Remove State::replace_backend (#8569) * Refactoring `ethcore-sync` - Fixing warp-sync barrier (#8543) * Start dividing sync chain : first supplier method * WIP - updated chain sync supplier * Finish refactoring the Chain Sync Supplier * Create Chain Sync Requester * Add Propagator for Chain Sync * Add the Chain Sync Handler * Move tests from mod -> handler * Move tests to propagator * Refactor SyncRequester arguments * Refactoring peer fork header handler * Fix wrong highest block number in snapshot sync * Small refactor... * Address PR grumbles * Retry failed CI job * Fix tests * PR Grumbles * Decoding headers can fail (#8570) * rlp::decode returns Result * Fix journaldb to handle rlp::decode Result * Fix ethcore to work with rlp::decode returning Result * Light client handles rlp::decode returning Result * Fix tests in rlp_derive * Fix tests * Cleanup * cleanup * Allow panic rather than breaking out of iterator * Let decoding failures when reading from disk blow up * syntax * Fix the trivial grumbles * Fix failing tests * Make Account::from_rlp return Result * Syntx, sigh * Temp-fix for decoding failures * Header::decode returns Result Handle new return type throughout the code base. * Do not continue reading from the DB when a value could not be read * Fix tests * Handle header decoding in light_sync * Handling header decoding errors * Let the DecodeError bubble up unchanged * Remove redundant error conversion * Update CHANGELOG for 1.9, 1.10, and 1.11 (#8556) * Move changelog for 1.10.x * Mark 1.9 EOL * Prepare changelog for 1.10.3 stable * Prepare changelog for 1.11.0 stable * Update changelogs * Update CHANGELOG for 1.10.3 beta * Update CHANGELOG for 1.11.0 beta * Update CHANGELOG for 1.11.0 beta * Update CHANGELOG for 1.11.0 beta * Format changelog * Handle socket address parsing errors (#8545) Unpack errors and check for io::ErrorKind::InvalidInput and return our own AddressParse error. Remove the foreign link to std::net::AddrParseError and add an `impl From` for that error. Test parsing properly. * Remove unnecessary cloning in overwrite_with (#8580) * Remove unnecessary cloning in overwrite_with * Remove into_iter * changelog nit (#8585) * Rename `whisper-cli binary` to `whisper` (#8579) * rename whisper-cli binary to whisper * fix tests * Add whisper CLI to the pipelines (#8578) * Add whisper CLI to the pipelines * Address todo, ref #8579 * Added Dockerfile for alpine linux by @andresilva, closes #3565 (#8587) * Changelog and Readme (#8591) * Move changelog for 1.10.x * Mark 1.9 EOL * Prepare changelog for 1.10.3 stable * Prepare changelog for 1.11.0 stable * Update changelogs * Update CHANGELOG for 1.10.3 beta * Update CHANGELOG for 1.11.0 beta * Update CHANGELOG for 1.11.0 beta * Update CHANGELOG for 1.11.0 beta * Format changelog * Update README for 1.11 * Fix typo * Attempt to fix intermittent test failures (#8584) Occasionally should_return_correct_nonces_when_dropped_because_of_limit fails, possibly because of multiple threads competing to finish. See CI logs here for an example: https://gitlab.parity.io/parity/parity/-/jobs/86738 * Make mio optional in ethcore-io (#8537) * Make mio optional in ethcore-io * Add some annotations, plus a check for features * Increase timer for test * Fix Parity UI link (#8600) Fix link https://github.com/paritytech/parity/issues/8599 * fix compiler warning (#8590) * Block::decode() returns Result (#8586) * block_header can fail so return Result (#8581) * block_header can fail so return Result * Restore previous return type based on feedback * Fix failing doc tests running on non-code * Remove inject.js server-side injection for dapps (#8539) * Remove inject.js server-side injection for dapps * Remove dapps test `should_inject_js` Parity doesn't inject a - ``` - - The `inject.js` script will create global `web3` instance with proper provider that should be used by your dapp. - -1. Create `./parity/dapps/myapp/Cargo.toml` with you apps details. See example here: [parity-status Cargo.toml](https://github.com/paritytech/parity-ui/blob/master/status/Cargo.toml). - - ```bash - $ git clone https://github.com/paritytech/parity-ui.git - $ cd ./parity-ui/ - $ cp ./home/Cargo.toml ../parity/dapps/myapp/Cargo.toml - $ cp ./home/build.rs ../parity/dapps/myapp/build.rs - $ cp ./home/src/lib.rs ../parity/dapps/myapp/src/lib.rs - $ cp ./home/src/lib.rs.in ../parity/dapps/myapp/src/lib.rs.in - # And edit the details of your app - $ vim ../parity/dapps/myapp/Cargo.toml # Edit the details - $ vim ./parity/dapps/myapp/src/lib.rs.in # Edit the details - ``` -# How to include your Dapp into `Parity`? -1. Edit `dapps/Cargo.toml` and add dependency to your application (it can be optional) - - ```toml - # Use git repo and version - parity-dapps-myapp = { path="./myapp" } - ``` - -1. Edit `dapps/src/apps.rs` and add your application to `all_pages` (if it's optional you need to specify two functions - see `parity-dapps-wallet` example) - -1. Compile parity. - - ```bash - $ cargo build --release # While inside `parity` - ``` - -1. Commit the results. - - ```bash - $ git add myapp && git commit -am "My first Parity Dapp". - ``` diff --git a/dapps/js-glue/build.rs b/dapps/js-glue/build.rs deleted file mode 100644 index 19d422ab23..0000000000 --- a/dapps/js-glue/build.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015-2018 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 . - -#[cfg(feature = "with-syntex")] -mod inner { - extern crate syntex; - extern crate quasi_codegen; - - use std::env; - use std::path::Path; - - pub fn main() { - let out_dir = env::var_os("OUT_DIR").unwrap(); - - let src = Path::new("src/lib.rs.in"); - let dst = Path::new(&out_dir).join("lib.rs"); - - quasi_codegen::expand(&src, &dst).unwrap(); - } -} - -#[cfg(not(feature = "with-syntex"))] -mod inner { - pub fn main() {} -} - -fn main() { - inner::main(); -} diff --git a/dapps/js-glue/src/build.rs b/dapps/js-glue/src/build.rs deleted file mode 100644 index 76b0a8714c..0000000000 --- a/dapps/js-glue/src/build.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2015-2018 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 . - -#[cfg(feature = "with-syntex")] -pub mod inner { - use syntex; - use codegen; - use syntax::{ast, fold}; - use std::env; - use std::path::Path; - - fn strip_attributes(krate: ast::Crate) -> ast::Crate { - /// Helper folder that strips the serde attributes after the extensions have been expanded. - struct StripAttributeFolder; - - impl fold::Folder for StripAttributeFolder { - fn fold_attribute(&mut self, attr: ast::Attribute) -> Option { - if &*attr.value.name.as_str() == "webapp" { - return None; - } - - Some(attr) - } - - fn fold_mac(&mut self, mac: ast::Mac) -> ast::Mac { - fold::noop_fold_mac(mac, self) - } - } - - fold::Folder::fold_crate(&mut StripAttributeFolder, krate) - } - - pub fn register(reg: &mut syntex::Registry) { - reg.add_attr("feature(custom_derive)"); - reg.add_attr("feature(custom_attribute)"); - - reg.add_decorator("derive_WebAppFiles", codegen::expand_webapp_implementation); - reg.add_post_expansion_pass(strip_attributes); - } - - pub fn generate() { - let out_dir = env::var_os("OUT_DIR").unwrap(); - let mut registry = syntex::Registry::new(); - register(&mut registry); - - let src = Path::new("src/lib.rs.in"); - let dst = Path::new(&out_dir).join("lib.rs"); - - registry.expand("", &src, &dst).unwrap(); - } -} - -#[cfg(not(feature = "with-syntex"))] -pub mod inner { - use codegen; - - pub fn register(reg: &mut rustc_plugin::Registry) { - reg.register_syntax_extension( - syntax::parse::token::intern("derive_WebAppFiles"), - syntax::ext::base::MultiDecorator( - Box::new(codegen::expand_webapp_implementation))); - - reg.register_attribute("webapp".to_owned(), AttributeType::Normal); - } - - pub fn generate() {} -} diff --git a/dapps/js-glue/src/codegen.rs b/dapps/js-glue/src/codegen.rs deleted file mode 100644 index 4b6c4445d7..0000000000 --- a/dapps/js-glue/src/codegen.rs +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2015-2018 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 aster; -extern crate glob; -extern crate mime_guess; - -use self::mime_guess::guess_mime_type; -use std::path::{self, Path, PathBuf}; -use std::ops::Deref; - -use syntax::attr; -use syntax::ast::{self, MetaItem, Item}; -use syntax::codemap::Span; -use syntax::ext::base::{Annotatable, ExtCtxt}; -use syntax::print::pprust::lit_to_string; -use syntax::symbol::InternedString; - -pub fn expand_webapp_implementation( - cx: &mut ExtCtxt, - span: Span, - meta_item: &MetaItem, - annotatable: &Annotatable, - push: &mut FnMut(Annotatable) -) { - let item = match *annotatable { - Annotatable::Item(ref item) => item, - _ => { - cx.span_err(meta_item.span, "`#[derive(WebAppFiles)]` may only be applied to struct implementations"); - return; - }, - }; - let builder = aster::AstBuilder::new().span(span); - implement_webapp(cx, &builder, item, push); -} - -fn implement_webapp(cx: &ExtCtxt, builder: &aster::AstBuilder, item: &Item, push: &mut FnMut(Annotatable)) { - let static_files_dir = extract_path(cx, item); - - let src = Path::new("src"); - let static_files = { - let mut buf = src.to_path_buf(); - buf.push(static_files_dir.deref()); - buf - }; - - let search_location = { - let mut buf = static_files.to_path_buf(); - buf.push("**"); - buf.push("*"); - buf - }; - - let files = glob::glob(search_location.to_str().expect("Valid UTF8 path")) - .expect("The sources directory is missing.") - .collect::, glob::GlobError>>() - .expect("There should be no error when reading a list of files."); - - let statements = files - .iter() - .filter(|path_buf| path_buf.is_file()) - .map(|path_buf| { - let path = path_buf.as_path(); - let filename = path.file_name().and_then(|s| s.to_str()).expect("Only UTF8 paths."); - let mime_type = guess_mime_type(filename).to_string(); - let file_path = as_uri(path.strip_prefix(&static_files).ok().expect("Prefix is always there, cause it's absolute path;qed")); - let file_path_in_source = path.to_str().expect("Only UTF8 paths."); - - let path_lit = builder.expr().str(file_path.as_str()); - let mime_lit = builder.expr().str(mime_type.as_str()); - let web_path_lit = builder.expr().str(file_path_in_source); - let separator_lit = builder.expr().str(path::MAIN_SEPARATOR.to_string().as_str()); - let concat_id = builder.id("concat!"); - let env_id = builder.id("env!"); - let macro_id = builder.id("include_bytes!"); - - let content = quote_expr!( - cx, - $macro_id($concat_id($env_id("CARGO_MANIFEST_DIR"), $separator_lit, $web_path_lit)) - ); - quote_stmt!( - cx, - files.insert($path_lit, File { path: $path_lit, content_type: $mime_lit, content: $content }); - ).expect("The statement is always ok, because it just uses literals.") - }).collect::>(); - - let type_name = item.ident; - - let files_impl = quote_item!(cx, - impl $type_name { - #[allow(unused_mut)] - fn files() -> ::std::collections::HashMap<&'static str, File> { - let mut files = ::std::collections::HashMap::new(); - $statements - files - } - } - ).unwrap(); - - push(Annotatable::Item(files_impl)); -} - -fn extract_path(cx: &ExtCtxt, item: &Item) -> String { - for meta_items in item.attrs.iter().filter_map(webapp_meta_items) { - for meta_item in meta_items { - let is_path = &*meta_item.name.as_str() == "path"; - match meta_item.node { - ast::MetaItemKind::NameValue(ref lit) if is_path => { - if let Some(s) = get_str_from_lit(cx, lit) { - return s.deref().to_owned(); - } - }, - _ => {}, - } - } - } - - // default - "web".to_owned() -} - -fn webapp_meta_items(attr: &ast::Attribute) -> Option> { - let is_webapp = &*attr.value.name.as_str() == "webapp"; - match attr.value.node { - ast::MetaItemKind::List(ref items) if is_webapp => { - attr::mark_used(&attr); - Some( - items.iter() - .map(|item| item.node.clone()) - .filter_map(|item| match item { - ast::NestedMetaItemKind::MetaItem(item) => Some(item), - _ => None, - }) - .collect() - ) - } - _ => None - } -} - -fn get_str_from_lit(cx: &ExtCtxt, lit: &ast::Lit) -> Option { - match lit.node { - ast::LitKind::Str(ref s, _) => Some(s.clone().as_str()), - _ => { - cx.span_err( - lit.span, - &format!("webapp annotation path must be a string, not `{}`", - lit_to_string(lit) - ) - ); - return None; - } - } -} - -fn as_uri(path: &Path) -> String { - let mut s = String::new(); - for component in path.iter() { - s.push_str(component.to_str().expect("Only UTF-8 filenames are supported.")); - s.push('/'); - } - s[0..s.len()-1].into() -} - -#[test] -fn should_convert_path_separators_on_all_platforms() { - // given - let p = { - let mut p = PathBuf::new(); - p.push("web"); - p.push("src"); - p.push("index.html"); - p - }; - - // when - let path = as_uri(&p); - - // then - assert_eq!(path, "web/src/index.html".to_owned()); -} diff --git a/dapps/js-glue/src/js.rs b/dapps/js-glue/src/js.rs deleted file mode 100644 index 906b238ec7..0000000000 --- a/dapps/js-glue/src/js.rs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2015-2018 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 . - -#![cfg_attr(feature = "use-precompiled-js", allow(dead_code))] -#![cfg_attr(feature = "use-precompiled-js", allow(unused_imports))] - -use std::fmt; -use std::process::Command; - -#[cfg(not(windows))] -mod platform { - use std::process::Command; - - pub static NPM_CMD: &'static str = "npm"; - pub fn handle_cmd(cmd: &mut Command) -> &mut Command { - cmd - } -} - -#[cfg(windows)] -mod platform { - use std::process::{Command, Stdio}; - - pub static NPM_CMD: &'static str = "cmd.exe"; - // NOTE [ToDr] For some reason on windows - // The command doesn't have %~dp0 set properly - // and it cannot load globally installed node.exe - pub fn handle_cmd(cmd: &mut Command) -> &mut Command { - cmd.stdin(Stdio::null()) - .arg("/c") - .arg("npm.cmd") - } -} - -fn die(s: &'static str, e: T) -> ! { - panic!("Error: {}: {:?}", s, e); -} - -#[cfg(feature = "use-precompiled-js")] -pub fn test(_path: &str) { -} -#[cfg(feature = "use-precompiled-js")] -pub fn build(_path: &str, _dest: &str) { -} - -#[cfg(not(feature = "use-precompiled-js"))] -pub fn build(path: &str, dest: &str) { - let child = platform::handle_cmd(&mut Command::new(platform::NPM_CMD)) - .arg("install") - .arg("--no-progress") - .current_dir(path) - .status() - .unwrap_or_else(|e| die("Installing node.js dependencies with npm", e)); - assert!(child.success(), "There was an error installing dependencies."); - - let child = platform::handle_cmd(&mut Command::new(platform::NPM_CMD)) - .arg("run") - .arg("build") - .env("NODE_ENV", "production") - .env("BUILD_DEST", dest) - .current_dir(path) - .status() - .unwrap_or_else(|e| die("Building JS code", e)); - assert!(child.success(), "There was an error build JS code."); -} - -#[cfg(not(feature = "use-precompiled-js"))] -pub fn test(path: &str) { - let child = Command::new(platform::NPM_CMD) - .arg("run") - .arg("test") - .current_dir(path) - .status() - .unwrap_or_else(|e| die("Running test command", e)); - assert!(child.success(), "There was an error while running JS tests."); -} diff --git a/dapps/js-glue/src/lib.rs b/dapps/js-glue/src/lib.rs deleted file mode 100644 index f8ada2541e..0000000000 --- a/dapps/js-glue/src/lib.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2015-2018 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 . - -#![cfg_attr(not(feature = "with-syntex"), feature(rustc_private, plugin))] -#![cfg_attr(not(feature = "with-syntex"), plugin(quasi_macros))] - -#[cfg(feature = "with-syntex")] -extern crate syntex; - -#[cfg(feature = "with-syntex")] -extern crate syntex_syntax as syntax; - -#[cfg(feature = "with-syntex")] -include!(concat!(env!("OUT_DIR"), "/lib.rs")); - -#[cfg(not(feature = "with-syntex"))] -#[macro_use] -extern crate syntax; - -#[cfg(not(feature = "with-syntex"))] -extern crate rustc_plugin; - -#[cfg(not(feature = "with-syntex"))] -include!("lib.rs.in"); diff --git a/dapps/js-glue/src/lib.rs.in b/dapps/js-glue/src/lib.rs.in deleted file mode 100644 index b78eae1098..0000000000 --- a/dapps/js-glue/src/lib.rs.in +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2015-2018 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 quasi; - -mod codegen; -mod build; -pub mod js; -pub use build::inner::generate; - -use std::default::Default; - -#[derive(Clone)] -pub struct File { - pub path: &'static str, - pub content: &'static [u8], - // TODO: use strongly-typed MIME. - pub content_type: &'static str, -} - -#[derive(Clone, Debug)] -pub struct Info { - pub name: &'static str, - pub version: &'static str, - pub author: &'static str, - pub description: &'static str, - pub icon_url: &'static str, -} - -pub trait WebApp : Default + Send + Sync { - fn file(&self, path: &str) -> Option<&File>; - fn info(&self) -> Info; -} diff --git a/dapps/res/gavcoin.zip b/dapps/res/gavcoin.zip deleted file mode 100644 index 3ced8c5c1d8cf7d23d2f0db1b60fc4443b970e31..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 434 zcmWIWW@h1H0D;ZXb39x32=A5vvO$=OL53kSFD11?FQX(kCp3hUfmvuuas&vMR&X;g zvbG-G*9OGA zK(lib^D@&?i%ayfiu3cp#(M*e24OVgS3e612sq^vxG5;W%U{R)-1#%Xml!#psyh4_7_!3qfoG*?2*!{uFM^J0MJp?Mx? XBo>bcc(byBEN243#X$Neh{FH?UCDKQ diff --git a/dapps/src/api/api.rs b/dapps/src/api/api.rs deleted file mode 100644 index e6bba899f9..0000000000 --- a/dapps/src/api/api.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2015-2018 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; - -use hyper::{Method, StatusCode}; - -use api::response; -use apps::fetcher::Fetcher; -use endpoint::{Endpoint, Request, Response, EndpointPath}; -use futures::{future, Future}; -use node_health::{NodeHealth, HealthStatus}; - -#[derive(Clone)] -pub struct RestApi { - fetcher: Arc, - health: NodeHealth, -} - -impl Endpoint for RestApi { - fn respond(&self, mut path: EndpointPath, req: Request) -> Response { - if let Method::Options = *req.method() { - return Box::new(future::ok(response::empty())); - } - - let endpoint = path.app_params.get(0).map(String::to_owned); - let hash = path.app_params.get(1).map(String::to_owned); - - // at this point path.app_id contains 'api', adjust it to the hash properly, otherwise - // we will try and retrieve 'api' as the hash when doing the /api/content route - if let Some(ref hash) = hash { - path.app_id = hash.to_owned(); - } - - trace!(target: "dapps", "Handling /api request: {:?}/{:?}", endpoint, hash); - match endpoint.as_ref().map(String::as_str) { - Some("ping") => Box::new(future::ok(response::ping(req))), - Some("health") => self.health(), - Some("content") => self.resolve_content(hash.as_ref().map(String::as_str), path, req), - _ => Box::new(future::ok(response::not_found())), - } - } -} - -impl RestApi { - pub fn new( - fetcher: Arc, - health: NodeHealth, - ) -> Box { - Box::new(RestApi { - fetcher, - health, - }) - } - - fn resolve_content(&self, hash: Option<&str>, path: EndpointPath, req: Request) -> Response { - trace!(target: "dapps", "Resolving content: {:?} from path: {:?}", hash, path); - match hash { - Some(hash) if self.fetcher.contains(hash) => { - self.fetcher.respond(path, req) - }, - _ => Box::new(future::ok(response::not_found())), - } - } - - fn health(&self) -> Response { - Box::new(self.health.health() - .then(|health| { - let status = match health { - Ok(ref health) => { - if [&health.peers.status, &health.sync.status].iter().any(|x| *x != &HealthStatus::Ok) { - StatusCode::PreconditionFailed // HTTP 412 - } else { - StatusCode::Ok // HTTP 200 - } - }, - _ => StatusCode::ServiceUnavailable, // HTTP 503 - }; - - Ok(response::as_json(status, &health).into()) - }) - ) - } -} diff --git a/dapps/src/api/mod.rs b/dapps/src/api/mod.rs deleted file mode 100644 index c18eb189ea..0000000000 --- a/dapps/src/api/mod.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015-2018 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 . - -//! REST API - -mod api; -mod response; -mod types; - -pub use self::api::RestApi; diff --git a/dapps/src/api/response.rs b/dapps/src/api/response.rs deleted file mode 100644 index 5fe81eaa19..0000000000 --- a/dapps/src/api/response.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015-2018 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 serde::Serialize; -use serde_json; -use hyper::{self, mime, StatusCode}; - -use handlers::{ContentHandler, EchoHandler}; - -pub fn empty() -> hyper::Response { - ContentHandler::ok("".into(), mime::TEXT_PLAIN).into() -} - -pub fn as_json(status: StatusCode, val: &T) -> hyper::Response { - let json = serde_json::to_string(val) - .expect("serialization to string is infallible; qed"); - ContentHandler::new(status, json, mime::APPLICATION_JSON).into() -} - -pub fn ping(req: hyper::Request) -> hyper::Response { - EchoHandler::new(req).into() -} - -pub fn not_found() -> hyper::Response { - as_json(StatusCode::NotFound, &::api::types::ApiError { - code: "404".into(), - title: "Not Found".into(), - detail: "Resource you requested has not been found.".into(), - }) -} diff --git a/dapps/src/api/types.rs b/dapps/src/api/types.rs deleted file mode 100644 index 8bc451a849..0000000000 --- a/dapps/src/api/types.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015-2018 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 . - -/// A structure representing any error in REST API. -#[derive(Debug, PartialEq, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct ApiError { - /// Error code. - pub code: String, - /// Human-readable error summary. - pub title: String, - /// More technical error details. - pub detail: String, -} diff --git a/dapps/src/apps/app.rs b/dapps/src/apps/app.rs deleted file mode 100644 index 15468b4f1d..0000000000 --- a/dapps/src/apps/app.rs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015-2018 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 . - -#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct App { - pub id: Option, - pub name: String, - pub description: String, - pub version: String, - pub author: String, - #[serde(rename="iconUrl")] - pub icon_url: String, - #[serde(rename="localUrl")] - pub local_url: Option, - #[serde(rename="allowJsEval")] - pub allow_js_eval: Option, -} - -impl App { - pub fn with_id(&self, id: &str) -> Self { - let mut app = self.clone(); - app.id = Some(id.into()); - app - } -} diff --git a/dapps/src/apps/cache.rs b/dapps/src/apps/cache.rs deleted file mode 100644 index b93acfaece..0000000000 --- a/dapps/src/apps/cache.rs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Fetchable Dapps support. - -use std::fs; - -use linked_hash_map::LinkedHashMap; -use page::local; -use handlers::FetchControl; - -pub enum ContentStatus { - Fetching(FetchControl), - Ready(local::Dapp), -} - -#[derive(Default)] -pub struct ContentCache { - cache: LinkedHashMap, -} - -impl ContentCache { - pub fn insert(&mut self, content_id: String, status: ContentStatus) -> Option { - self.cache.insert(content_id, status) - } - - pub fn remove(&mut self, content_id: &str) -> Option { - self.cache.remove(content_id) - } - - pub fn get(&mut self, content_id: &str) -> Option<&mut ContentStatus> { - self.cache.get_refresh(content_id) - } - - pub fn clear_garbage(&mut self, expected_size: usize) -> Vec<(String, ContentStatus)> { - let len = self.cache.len(); - - if len <= expected_size { - return Vec::new(); - } - - let mut removed = Vec::with_capacity(len - expected_size); - - while self.cache.len() > expected_size { - let entry = self.cache.pop_front().expect("expected_size bounded at 0, len is greater; qed"); - - match entry.1 { - ContentStatus::Fetching(ref fetch) => { - trace!(target: "dapps", "Aborting {} because of limit.", entry.0); - // Mark as aborted - fetch.abort() - }, - ContentStatus::Ready(ref endpoint) => { - trace!(target: "dapps", "Removing {} because of limit.", entry.0); - // Remove path (dir or file) - let res = fs::remove_dir_all(&endpoint.path()).or_else(|_| fs::remove_file(&endpoint.path())); - if let Err(e) = res { - warn!(target: "dapps", "Unable to remove dapp/content from cache: {:?}", e); - } - } - } - - removed.push(entry); - } - removed - } - - #[cfg(test)] - pub fn len(&self) -> usize { - self.cache.len() - } -} - -#[cfg(test)] -mod tests { - use super::*; - - fn only_keys(data: Vec<(String, ContentStatus)>) -> Vec { - data.into_iter().map(|x| x.0).collect() - } - - #[test] - fn should_remove_least_recently_used() { - // given - let mut cache = ContentCache::default(); - cache.insert("a".into(), ContentStatus::Fetching(Default::default())); - cache.insert("b".into(), ContentStatus::Fetching(Default::default())); - cache.insert("c".into(), ContentStatus::Fetching(Default::default())); - - // when - let res = cache.clear_garbage(2); - - // then - assert_eq!(cache.len(), 2); - assert_eq!(only_keys(res), vec!["a"]); - } - - #[test] - fn should_update_lru_if_accessed() { - // given - let mut cache = ContentCache::default(); - cache.insert("a".into(), ContentStatus::Fetching(Default::default())); - cache.insert("b".into(), ContentStatus::Fetching(Default::default())); - cache.insert("c".into(), ContentStatus::Fetching(Default::default())); - - // when - cache.get("a"); - let res = cache.clear_garbage(2); - - // then - assert_eq!(cache.len(), 2); - assert_eq!(only_keys(res), vec!["b"]); - } - -} diff --git a/dapps/src/apps/fetcher/installers.rs b/dapps/src/apps/fetcher/installers.rs deleted file mode 100644 index 9fba80aabe..0000000000 --- a/dapps/src/apps/fetcher/installers.rs +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright 2015-2018 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 zip; -use std::{fs, fmt}; -use std::io::{self, Read, Write}; -use std::path::PathBuf; -use ethereum_types::H256; -use fetch; -use futures_cpupool::CpuPool; -use hash::keccak_pipe; -use mime_guess::Mime; - -use apps::manifest::{MANIFEST_FILENAME, deserialize_manifest, serialize_manifest, Manifest}; -use handlers::{ContentValidator, ValidatorResponse}; -use page::{local, PageCache}; - -type OnDone = Box) + Send>; - -fn write_response_and_check_hash( - id: &str, - mut content_path: PathBuf, - filename: &str, - response: fetch::Response -) -> Result<(fs::File, PathBuf), ValidationError> { - // try to parse id - let id = id.parse().map_err(|_| ValidationError::InvalidContentId)?; - - // check if content exists - if content_path.exists() { - warn!(target: "dapps", "Overwriting existing content at 0x{:?}", id); - fs::remove_dir_all(&content_path)? - } - - // create directory - fs::create_dir_all(&content_path)?; - - // append filename - content_path.push(filename); - - // Now write the response - let mut file = io::BufWriter::new(fs::File::create(&content_path)?); - let mut reader = io::BufReader::new(fetch::BodyReader::new(response)); - let hash = keccak_pipe(&mut reader, &mut file)?; - let mut file = file.into_inner()?; - file.flush()?; - - // Validate hash - if id == hash { - // The writing above changed the file Read position, which we need later. So we just create a new file handle - // here. - Ok((fs::File::open(&content_path)?, content_path)) - } else { - Err(ValidationError::HashMismatch { - expected: id, - got: hash, - }) - } -} - -pub struct Content { - id: String, - mime: Mime, - content_path: PathBuf, - on_done: OnDone, - pool: CpuPool, -} - -impl Content { - pub fn new(id: String, mime: Mime, content_path: PathBuf, on_done: OnDone, pool: CpuPool) -> Self { - Content { - id, - mime, - content_path, - on_done, - pool, - } - } -} - -impl ContentValidator for Content { - type Error = ValidationError; - - fn validate_and_install(self, response: fetch::Response) -> Result { - let pool = self.pool; - let id = self.id.clone(); - let mime = self.mime; - let validate = move |content_path: PathBuf| { - // Create dir - let (_, content_path) = write_response_and_check_hash(&id, content_path, &id, response)?; - - Ok(local::Dapp::single_file(pool, content_path, mime, PageCache::Enabled)) - }; - - // Prepare path for a file - let content_path = self.content_path.join(&self.id); - // Make sure to always call on_done (even in case of errors)! - let result = validate(content_path.clone()); - // remove the file if there was an error - if result.is_err() { - // Ignore errors since the file might not exist - let _ = fs::remove_dir_all(&content_path); - } - (self.on_done)(result.as_ref().ok().cloned()); - result.map(ValidatorResponse::Local) - } -} - -pub struct Dapp { - id: String, - dapps_path: PathBuf, - on_done: OnDone, - pool: CpuPool, -} - -impl Dapp { - pub fn new(id: String, dapps_path: PathBuf, on_done: OnDone, pool: CpuPool) -> Self { - Dapp { - id, - dapps_path, - on_done, - pool, - } - } - - fn find_manifest(zip: &mut zip::ZipArchive) -> Result<(Manifest, PathBuf), ValidationError> { - for i in 0..zip.len() { - let mut file = zip.by_index(i)?; - - if !file.name().ends_with(MANIFEST_FILENAME) { - continue; - } - - // try to read manifest - let mut manifest = String::new(); - let manifest = file - .read_to_string(&mut manifest).ok() - .and_then(|_| deserialize_manifest(manifest).ok()); - - if let Some(manifest) = manifest { - let mut manifest_location = PathBuf::from(file.name()); - manifest_location.pop(); // get rid of filename - return Ok((manifest, manifest_location)); - } - } - - Err(ValidationError::ManifestNotFound) - } -} - -impl ContentValidator for Dapp { - type Error = ValidationError; - - fn validate_and_install(self, response: fetch::Response) -> Result { - let id = self.id.clone(); - let pool = self.pool; - let validate = move |dapp_path: PathBuf| { - let (file, zip_path) = write_response_and_check_hash(&id, dapp_path.clone(), &format!("{}.zip", id), response)?; - trace!(target: "dapps", "Opening dapp bundle at {:?}", zip_path); - // Unpack archive - let mut zip = zip::ZipArchive::new(file)?; - // First find manifest file - let (mut manifest, manifest_dir) = Self::find_manifest(&mut zip)?; - // Overwrite id to match hash - manifest.id = Some(id); - - // Unpack zip - for i in 0..zip.len() { - let mut file = zip.by_index(i)?; - 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 = dapp_path.join(location_in_manifest_base); - // Check if it's a directory - if is_dir { - fs::create_dir_all(p)?; - } else { - let mut target = fs::File::create(p)?; - io::copy(&mut file, &mut target)?; - } - } - } - - // Remove zip - fs::remove_file(&zip_path)?; - - // Write manifest - let manifest_str = serialize_manifest(&manifest).map_err(ValidationError::ManifestSerialization)?; - let manifest_path = dapp_path.join(MANIFEST_FILENAME); - let mut manifest_file = fs::File::create(manifest_path)?; - manifest_file.write_all(manifest_str.as_bytes())?; - // Create endpoint - let endpoint = local::Dapp::new(pool, dapp_path, manifest.into(), PageCache::Enabled); - Ok(endpoint) - }; - - // Prepare directory for dapp - let target = self.dapps_path.join(&self.id); - // Validate the dapp - let result = validate(target.clone()); - // remove the file if there was an error - if result.is_err() { - // Ignore errors since the file might not exist - let _ = fs::remove_dir_all(&target); - } - (self.on_done)(result.as_ref().ok().cloned()); - result.map(ValidatorResponse::Local) - } -} - -#[derive(Debug)] -pub enum ValidationError { - Io(io::Error), - Zip(zip::result::ZipError), - InvalidContentId, - ManifestNotFound, - ManifestSerialization(String), - HashMismatch { expected: H256, got: H256, }, -} - -impl fmt::Display for ValidationError { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - match *self { - ValidationError::Io(ref io) => write!(f, "Unexpected IO error occured: {:?}", io), - ValidationError::Zip(ref zip) => write!(f, "Unable to read ZIP archive: {:?}", zip), - ValidationError::InvalidContentId => write!(f, "ID is invalid. It should be 256 bits keccak hash of content."), - ValidationError::ManifestNotFound => write!(f, "Downloaded Dapp bundle did not contain valid manifest.json file."), - ValidationError::ManifestSerialization(ref err) => { - write!(f, "There was an error during Dapp Manifest serialization: {:?}", err) - }, - ValidationError::HashMismatch { ref expected, ref got } => { - write!(f, "Hash of downloaded content did not match. Expected:{:?}, Got:{:?}.", expected, got) - }, - } - } -} - -impl From for ValidationError { - fn from(err: io::Error) -> Self { - ValidationError::Io(err) - } -} - -impl From for ValidationError { - fn from(err: zip::result::ZipError) -> Self { - ValidationError::Zip(err) - } -} - -impl From>> for ValidationError { - fn from(err: io::IntoInnerError>) -> Self { - ValidationError::Io(err.into()) - } -} diff --git a/dapps/src/apps/fetcher/mod.rs b/dapps/src/apps/fetcher/mod.rs deleted file mode 100644 index a7afd91eed..0000000000 --- a/dapps/src/apps/fetcher/mod.rs +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Fetchable Dapps support. -//! Manages downloaded (cached) Dapps and downloads them when necessary. -//! Uses `URLHint` to resolve addresses into Dapps bundle file location. - -mod installers; - -use std::{fs, env}; -use std::path::PathBuf; -use std::sync::Arc; -use futures::{future, Future}; -use futures_cpupool::CpuPool; -use fetch::{Client as FetchClient, Fetch}; -use hash_fetch::urlhint::{URLHintContract, URLHint, URLHintResult}; - -use hyper::StatusCode; - -use ethereum_types::H256; -use {SyncStatus, random_filename}; -use parking_lot::Mutex; -use page::local; -use handlers::{ContentHandler, ContentFetcherHandler}; -use endpoint::{self, Endpoint, EndpointPath}; -use apps::cache::{ContentCache, ContentStatus}; - -/// Limit of cached dapps/content -const MAX_CACHED_DAPPS: usize = 20; - -pub trait Fetcher: Endpoint + 'static { - fn contains(&self, content_id: &str) -> bool; -} - -pub struct ContentFetcher { - cache_path: PathBuf, - resolver: R, - cache: Arc>, - sync: Arc, - fetch: F, - pool: CpuPool, - only_content: bool, -} - -impl Drop for ContentFetcher { - fn drop(&mut self) { - // Clear cache path - let _ = fs::remove_dir_all(&self.cache_path); - } -} - -impl ContentFetcher { - pub fn new( - resolver: R, - sync: Arc, - fetch: F, - pool: CpuPool, - ) -> Self { - let mut cache_path = env::temp_dir(); - cache_path.push(random_filename()); - - ContentFetcher { - cache_path, - resolver, - sync, - cache: Arc::new(Mutex::new(ContentCache::default())), - fetch, - pool, - only_content: true, - } - } - - pub fn allow_dapps(mut self, dapps: bool) -> Self { - self.only_content = !dapps; - self - } - - fn not_found() -> endpoint::Response { - Box::new(future::ok(ContentHandler::error( - StatusCode::NotFound, - "Resource Not Found", - "Requested resource was not found.", - None, - ).into())) - } - - fn still_syncing() -> endpoint::Response { - Box::new(future::ok(ContentHandler::error( - StatusCode::ServiceUnavailable, - "Sync In Progress", - "Your node is still syncing. We cannot resolve any content before it's fully synced.", - Some("Refresh"), - ).into())) - } - - fn dapps_disabled() -> endpoint::Response { - Box::new(future::ok(ContentHandler::error( - StatusCode::ServiceUnavailable, - "Network Dapps Not Available", - "This interface doesn't support network dapps for security reasons.", - None, - ).into())) - } - - #[cfg(test)] - fn set_status(&self, content_id: &str, status: ContentStatus) { - self.cache.lock().insert(content_id.to_owned(), status); - } - - // resolve contract call synchronously. - // TODO: port to futures-based hyper and make it all async. - fn resolve(&self, content_id: H256) -> Option { - self.resolver.resolve(content_id) - .wait() - .unwrap_or_else(|e| { warn!("Error resolving content-id: {}", e); None }) - } -} - -impl Fetcher for ContentFetcher { - fn contains(&self, content_id: &str) -> bool { - { - let mut cache = self.cache.lock(); - // Check if we already have the app - if cache.get(content_id).is_some() { - return true; - } - } - // fallback to resolver - if let Ok(content_id) = content_id.parse() { - // if there is content or we are syncing return true - self.sync.is_major_importing() || self.resolve(content_id).is_some() - } else { - false - } - } -} - -impl Endpoint for ContentFetcher { - fn respond(&self, path: EndpointPath, req: endpoint::Request) -> endpoint::Response { - let mut cache = self.cache.lock(); - let content_id = path.app_id.clone(); - - let (new_status, handler) = { - let status = cache.get(&content_id); - match status { - // Just serve the content - Some(&mut ContentStatus::Ready(ref endpoint)) => { - (None, endpoint.to_response(&path)) - }, - // Content is already being fetched - Some(&mut ContentStatus::Fetching(ref fetch_control)) if !fetch_control.is_deadline_reached() => { - trace!(target: "dapps", "Content fetching in progress. Waiting..."); - (None, fetch_control.to_response(path)) - }, - // We need to start fetching the content - _ => { - trace!(target: "dapps", "Content unavailable. Fetching... {:?}", content_id); - let content_hex = content_id.parse().expect("to_handler is called only when `contains` returns true."); - let content = self.resolve(content_hex); - - let cache = self.cache.clone(); - let id = content_id.clone(); - let on_done = move |result: Option| { - let mut cache = cache.lock(); - match result { - Some(endpoint) => cache.insert(id.clone(), ContentStatus::Ready(endpoint)), - // In case of error - None => cache.remove(&id), - }; - }; - - match content { - // Don't serve dapps if we are still syncing (but serve content) - Some(URLHintResult::Dapp(_)) if self.sync.is_major_importing() => { - (None, Self::still_syncing()) - }, - Some(URLHintResult::Dapp(_)) if self.only_content => { - (None, Self::dapps_disabled()) - }, - Some(content) => { - let handler = match content { - URLHintResult::Dapp(dapp) => { - ContentFetcherHandler::new( - req.method(), - &dapp.url(), - path, - installers::Dapp::new( - content_id.clone(), - self.cache_path.clone(), - Box::new(on_done), - self.pool.clone(), - ), - self.fetch.clone(), - self.pool.clone(), - ) - }, - URLHintResult::GithubDapp(content) => { - ContentFetcherHandler::new( - req.method(), - &content.url, - path, - installers::Dapp::new( - content_id.clone(), - self.cache_path.clone(), - Box::new(on_done), - self.pool.clone(), - ), - self.fetch.clone(), - self.pool.clone(), - ) - }, - URLHintResult::Content(content) => { - ContentFetcherHandler::new( - req.method(), - &content.url, - path, - installers::Content::new( - content_id.clone(), - content.mime, - self.cache_path.clone(), - Box::new(on_done), - self.pool.clone(), - ), - self.fetch.clone(), - self.pool.clone(), - ) - }, - }; - - (Some(ContentStatus::Fetching(handler.fetch_control())), Box::new(handler) as endpoint::Response) - }, - None if self.sync.is_major_importing() => { - (None, Self::still_syncing()) - }, - None => { - // This may happen when sync status changes in between - // `contains` and `to_handler` - (None, Self::not_found()) - }, - } - }, - } - }; - - if let Some(status) = new_status { - cache.clear_garbage(MAX_CACHED_DAPPS); - cache.insert(content_id, status); - } - - handler - } -} - -#[cfg(test)] -mod tests { - use std::env; - use std::sync::Arc; - use fetch::Client; - use futures::{future, Future}; - use hash_fetch::urlhint::{URLHint, URLHintResult}; - use ethereum_types::H256; - - use apps::cache::ContentStatus; - use endpoint::EndpointInfo; - use page::local; - use super::{ContentFetcher, Fetcher}; - use {SyncStatus}; - - #[derive(Clone)] - struct FakeResolver; - impl URLHint for FakeResolver { - fn resolve(&self, _id: H256) -> Box, Error = String> + Send> { - Box::new(future::ok(None)) - } - } - - #[derive(Debug)] - struct FakeSync(bool); - impl SyncStatus for FakeSync { - fn is_major_importing(&self) -> bool { self.0 } - fn peers(&self) -> (usize, usize) { (0, 5) } - } - - #[test] - fn should_true_if_contains_the_app() { - // given - let pool = ::futures_cpupool::CpuPool::new(1); - let path = env::temp_dir(); - let fetcher = ContentFetcher::new( - FakeResolver, - Arc::new(FakeSync(false)), - Client::new().unwrap(), - pool.clone(), - ).allow_dapps(true); - - let handler = local::Dapp::new(pool, path, EndpointInfo { - id: None, - name: "fake".into(), - description: "".into(), - version: "".into(), - author: "".into(), - icon_url: "".into(), - local_url: Some("".into()), - allow_js_eval: None, - }, Default::default()); - - // when - fetcher.set_status("test", ContentStatus::Ready(handler)); - fetcher.set_status("test2", ContentStatus::Fetching(Default::default())); - - // then - assert_eq!(fetcher.contains("test"), true); - assert_eq!(fetcher.contains("test2"), true); - assert_eq!(fetcher.contains("test3"), false); - } -} diff --git a/dapps/src/apps/fs.rs b/dapps/src/apps/fs.rs deleted file mode 100644 index 975f3067ee..0000000000 --- a/dapps/src/apps/fs.rs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2015-2018 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::collections::BTreeMap; -use std::io; -use std::io::Read; -use std::fs; -use std::path::{Path, PathBuf}; -use futures_cpupool::CpuPool; - -use apps::manifest::{MANIFEST_FILENAME, deserialize_manifest}; -use endpoint::{Endpoint, EndpointInfo}; -use page::{local, PageCache}; - -struct LocalDapp { - id: String, - path: PathBuf, - info: EndpointInfo, -} - -/// Tries to find and read manifest file in given `path` to extract `EndpointInfo` -/// If manifest is not found sensible default `EndpointInfo` is returned based on given `name`. -fn read_manifest(name: &str, mut path: PathBuf) -> EndpointInfo { - path.push(MANIFEST_FILENAME); - - fs::File::open(path.clone()) - .map_err(|e| format!("{:?}", e)) - .and_then(|mut f| { - // Reat file - let mut s = String::new(); - f.read_to_string(&mut s).map_err(|e| format!("{:?}", e))?; - // Try to deserialize manifest - deserialize_manifest(s) - }) - .unwrap_or_else(|e| { - warn!(target: "dapps", "Cannot read manifest file at: {:?}. Error: {:?}", path, e); - - EndpointInfo { - id: None, - name: name.into(), - description: name.into(), - version: "0.0.0".into(), - author: "?".into(), - icon_url: "icon.png".into(), - local_url: None, - allow_js_eval: Some(false), - } - }) -} - -/// Returns Dapp Id and Local Dapp Endpoint for given filesystem path. -/// Parses the path to extract last component (for name). -/// `None` is returned when path is invalid or non-existent. -pub fn local_endpoint>(path: P, pool: CpuPool) -> Option<(String, Box)> { - let path = path.as_ref().to_owned(); - path.canonicalize().ok().and_then(|path| { - let name = path.file_name().and_then(|name| name.to_str()); - name.map(|name| { - let dapp = local_dapp(name.into(), path.clone()); - (dapp.id, Box::new(local::Dapp::new( - pool.clone(), dapp.path, dapp.info, PageCache::Disabled) - )) - }) - }) -} - -fn local_dapp(name: String, path: PathBuf) -> LocalDapp { - // try to get manifest file - let info = read_manifest(&name, path.clone()); - LocalDapp { - id: name, - path: path, - info: info, - } -} - -/// Returns endpoints for Local Dapps found for given filesystem path. -/// Scans the directory and collects `local::Dapp`. -pub fn local_endpoints>(dapps_path: P, pool: CpuPool) -> BTreeMap> { - let mut pages = BTreeMap::>::new(); - for dapp in local_dapps(dapps_path.as_ref()) { - pages.insert( - dapp.id, - Box::new(local::Dapp::new(pool.clone(), dapp.path, dapp.info, PageCache::Disabled)) - ); - } - pages -} - -fn local_dapps(dapps_path: &Path) -> Vec { - let files = fs::read_dir(dapps_path); - if let Err(e) = files { - warn!(target: "dapps", "Unable to load local dapps from: {}. Reason: {:?}", dapps_path.display(), e); - return vec![]; - } - - let files = files.expect("Check is done earlier"); - files.map(|dir| { - let entry = dir?; - let file_type = entry.file_type()?; - - // skip files - if file_type.is_file() { - return Err(io::Error::new(io::ErrorKind::NotFound, "Not a file")); - } - - // take directory name and path - entry.file_name().into_string() - .map(|name| (name, entry.path())) - .map_err(|e| { - info!(target: "dapps", "Unable to load dapp: {:?}. Reason: {:?}", entry.path(), e); - io::Error::new(io::ErrorKind::NotFound, "Invalid name") - }) - }) - .filter_map(|m| { - if let Err(ref e) = m { - debug!(target: "dapps", "Ignoring local dapp: {:?}", e); - } - m.ok() - }) - .map(|(name, path)| local_dapp(name, path)) - .collect() -} diff --git a/dapps/src/apps/manifest.rs b/dapps/src/apps/manifest.rs deleted file mode 100644 index 4d71af40fe..0000000000 --- a/dapps/src/apps/manifest.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2015-2018 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 serde_json; -pub use apps::App as Manifest; - -pub const MANIFEST_FILENAME: &'static str = "manifest.json"; - -pub fn deserialize_manifest(manifest: String) -> Result { - let mut manifest = serde_json::from_str::(&manifest).map_err(|e| format!("{:?}", e))?; - if manifest.id.is_none() { - return Err("App 'id' is missing.".into()); - } - manifest.allow_js_eval = Some(manifest.allow_js_eval.unwrap_or(false)); - - Ok(manifest) -} - -pub fn serialize_manifest(manifest: &Manifest) -> Result { - serde_json::to_string_pretty(manifest).map_err(|e| format!("{:?}", e)) -} diff --git a/dapps/src/apps/mod.rs b/dapps/src/apps/mod.rs deleted file mode 100644 index 3fe394b6de..0000000000 --- a/dapps/src/apps/mod.rs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2015-2018 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::path::PathBuf; -use std::sync::Arc; - -use endpoint::Endpoints; -use futures_cpupool::CpuPool; -use proxypac::ProxyPac; -use web::Web; -use fetch::Fetch; -use WebProxyTokens; - -mod app; -mod cache; -pub mod fs; -pub mod fetcher; -pub mod manifest; - -pub use self::app::App; - -pub const HOME_PAGE: &'static str = "home"; -pub const RPC_PATH: &'static str = "rpc"; -pub const API_PATH: &'static str = "api"; -pub const WEB_PATH: &'static str = "web"; -pub const URL_REFERER: &'static str = "__referer="; - -pub fn all_endpoints( - dapps_path: PathBuf, - extra_dapps: Vec, - dapps_domain: &str, - web_proxy_tokens: Arc, - fetch: F, - pool: CpuPool, -) -> (Vec, Endpoints) { - // fetch fs dapps at first to avoid overwriting builtins - let mut pages = fs::local_endpoints(dapps_path.clone(), pool.clone()); - let local_endpoints: Vec = pages.keys().cloned().collect(); - for path in extra_dapps { - if let Some((id, endpoint)) = fs::local_endpoint(path.clone(), pool.clone()) { - pages.insert(id, endpoint); - } else { - warn!(target: "dapps", "Ignoring invalid dapp at {}", path.display()); - } - } - - pages.insert( - "proxy".into(), - ProxyPac::boxed(dapps_domain.to_owned()) - ); - pages.insert( - WEB_PATH.into(), - Web::boxed(web_proxy_tokens.clone(), fetch.clone(), pool.clone()) - ); - - (local_endpoints, pages) -} diff --git a/dapps/src/endpoint.rs b/dapps/src/endpoint.rs deleted file mode 100644 index 948f412b38..0000000000 --- a/dapps/src/endpoint.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2015-2018 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 . - -//! URL Endpoint traits - -use std::collections::BTreeMap; - -use futures::Future; -use hyper; - -#[derive(Debug, PartialEq, Default, Clone)] -pub struct EndpointPath { - pub app_id: String, - pub app_params: Vec, - pub query: Option, - pub host: String, - pub port: u16, - pub using_dapps_domains: bool, -} - -impl EndpointPath { - pub fn has_no_params(&self) -> bool { - self.app_params.is_empty() || self.app_params.iter().all(|x| x.is_empty()) - } -} - -pub type EndpointInfo = ::apps::App; -pub type Endpoints = BTreeMap>; -pub type Response = Box + Send>; -pub type Request = hyper::Request; - -pub trait Endpoint : Send + Sync { - fn info(&self) -> Option<&EndpointInfo> { None } - - fn respond(&self, path: EndpointPath, req: Request) -> Response; -} diff --git a/dapps/src/error_tpl.html b/dapps/src/error_tpl.html deleted file mode 100644 index 4b155cf35d..0000000000 --- a/dapps/src/error_tpl.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - {title} - - - -
-
-
-

{title}

-

{message}

-

{details}

-
-
- {version} -
- - diff --git a/dapps/src/handlers/content.rs b/dapps/src/handlers/content.rs deleted file mode 100644 index 9449f0f796..0000000000 --- a/dapps/src/handlers/content.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Simple Content Handler - -use hyper::{self, mime, header}; -use hyper::StatusCode; - -use parity_version::version; - -use handlers::add_security_headers; - -#[derive(Debug, Clone)] -pub struct ContentHandler { - code: StatusCode, - content: String, - mimetype: mime::Mime, -} - -impl ContentHandler { - pub fn ok(content: String, mimetype: mime::Mime) -> Self { - Self::new(StatusCode::Ok, content, mimetype) - } - - pub fn html(code: StatusCode, content: String) -> Self { - Self::new(code, content, mime::TEXT_HTML) - } - - pub fn error( - code: StatusCode, - title: &str, - message: &str, - details: Option<&str>, - ) -> Self { - Self::html(code, format!( - include_str!("../error_tpl.html"), - title=title, - message=message, - details=details.unwrap_or_else(|| ""), - version=version(), - )) - } - - pub fn new( - code: StatusCode, - content: String, - mimetype: mime::Mime, - ) -> Self { - ContentHandler { - code, - content, - mimetype, - } - } -} - -impl Into for ContentHandler { - fn into(self) -> hyper::Response { - let mut res = hyper::Response::new() - .with_status(self.code) - .with_header(header::ContentType(self.mimetype)) - .with_body(self.content); - add_security_headers(&mut res.headers_mut(), false); - res - } -} diff --git a/dapps/src/handlers/echo.rs b/dapps/src/handlers/echo.rs deleted file mode 100644 index 03dfd1c974..0000000000 --- a/dapps/src/handlers/echo.rs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Echo Handler - -use hyper::{self, header}; - -use handlers::add_security_headers; - -#[derive(Debug)] -pub struct EchoHandler { - request: hyper::Request, -} - -impl EchoHandler { - pub fn new(request: hyper::Request) -> Self { - EchoHandler { - request, - } - } -} - -impl Into for EchoHandler { - fn into(self) -> hyper::Response { - let content_type = self.request.headers().get().cloned(); - let mut res = hyper::Response::new() - .with_header(content_type.unwrap_or(header::ContentType::json())) - .with_body(self.request.body()); - - add_security_headers(res.headers_mut(), false); - res - } -} diff --git a/dapps/src/handlers/errors.rs b/dapps/src/handlers/errors.rs deleted file mode 100644 index 5261dc3c15..0000000000 --- a/dapps/src/handlers/errors.rs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Handler errors. - -use handlers::{ContentHandler, FETCH_TIMEOUT}; -use hyper::StatusCode; -use std::fmt; - -pub fn streaming() -> ContentHandler { - ContentHandler::error( - StatusCode::BadGateway, - "Streaming Error", - "This content is being streamed in other place.", - None, - ) -} - -pub fn download_error(e: E) -> ContentHandler { - ContentHandler::error( - StatusCode::BadGateway, - "Download Error", - "There was an error when fetching the content.", - Some(&format!("{:?}", e)), - ) -} - -pub fn invalid_content(e: E) -> ContentHandler { - ContentHandler::error( - StatusCode::BadGateway, - "Invalid Dapp", - "Downloaded bundle does not contain a valid content.", - Some(&format!("{:?}", e)), - ) -} - -pub fn timeout_error() -> ContentHandler { - ContentHandler::error( - StatusCode::GatewayTimeout, - "Download Timeout", - &format!("Could not fetch content within {} seconds.", FETCH_TIMEOUT.as_secs()), - None, - ) -} - -pub fn method_not_allowed() -> ContentHandler { - ContentHandler::error( - StatusCode::MethodNotAllowed, - "Method Not Allowed", - "Only GET requests are allowed.", - None, - ) -} diff --git a/dapps/src/handlers/fetch.rs b/dapps/src/handlers/fetch.rs deleted file mode 100644 index 3fee3b1fec..0000000000 --- a/dapps/src/handlers/fetch.rs +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Hyper Server Handler that fetches a file during a request (proxy). - -use std::{fmt, mem}; -use std::sync::Arc; -use std::sync::atomic::{AtomicBool, Ordering}; -use std::time::Instant; -use fetch::{self, Fetch}; -use futures::sync::oneshot; -use futures::{self, Future}; -use futures_cpupool::CpuPool; -use hyper; -use parking_lot::Mutex; - -use endpoint::{self, EndpointPath}; -use handlers::{ContentHandler, StreamingHandler, FETCH_TIMEOUT, errors}; -use page::local; - -pub enum ValidatorResponse { - Local(local::Dapp), - Streaming(StreamingHandler), -} - -pub trait ContentValidator: Sized + Send + 'static { - type Error: fmt::Debug + fmt::Display; - - fn validate_and_install(self, fetch::Response) -> Result; -} - -#[derive(Debug, Clone)] -pub struct FetchControl { - abort: Arc, - listeners: Arc>>>, - deadline: Instant, -} - -impl Default for FetchControl { - fn default() -> Self { - FetchControl { - abort: Arc::new(AtomicBool::new(false)), - listeners: Arc::new(Mutex::new(Vec::new())), - deadline: Instant::now() + FETCH_TIMEOUT, - } - } -} - -impl FetchControl { - pub fn is_deadline_reached(&self) -> bool { - self.deadline < Instant::now() - } - - pub fn abort(&self) { - self.abort.store(true, Ordering::SeqCst); - } - - pub fn to_response(&self, path: EndpointPath) -> endpoint::Response { - let (tx, receiver) = oneshot::channel(); - self.listeners.lock().push(tx); - - Box::new(WaitingHandler { - path, - state: WaitState::Waiting(receiver), - }) - } - - fn notify WaitResult>(&self, status: F) { - let mut listeners = self.listeners.lock(); - for sender in listeners.drain(..) { - trace!(target: "dapps", "Resuming request waiting for content..."); - if let Err(_) = sender.send(status()) { - trace!(target: "dapps", "Waiting listener notification failed."); - } - } - } - - fn set_status(&self, status: &FetchState) { - match *status { - FetchState::Error(ref handler) => self.notify(|| WaitResult::Error(handler.clone())), - FetchState::Done(ref endpoint, _) => self.notify(|| WaitResult::Done(endpoint.clone())), - FetchState::Streaming(_) => self.notify(|| WaitResult::NonAwaitable), - FetchState::InProgress(_) => {}, - FetchState::Empty => {}, - } - } -} - -enum WaitState { - Waiting(oneshot::Receiver), - Done(endpoint::Response), -} - -#[derive(Debug)] -enum WaitResult { - Error(ContentHandler), - Done(local::Dapp), - NonAwaitable, -} - -pub struct WaitingHandler { - path: EndpointPath, - state: WaitState, -} - -impl Future for WaitingHandler { - type Item = hyper::Response; - type Error = hyper::Error; - - fn poll(&mut self) -> futures::Poll { - loop { - let new_state = match self.state { - WaitState::Waiting(ref mut receiver) => { - let result = try_ready!(receiver.poll().map_err(|_| hyper::Error::Timeout)); - - match result { - WaitResult::Error(handler) => { - return Ok(futures::Async::Ready(handler.into())); - }, - WaitResult::NonAwaitable => { - return Ok(futures::Async::Ready(errors::streaming().into())); - }, - WaitResult::Done(endpoint) => { - WaitState::Done(endpoint.to_response(&self.path).into()) - }, - } - }, - WaitState::Done(ref mut response) => { - return response.poll() - }, - }; - - self.state = new_state; - } - } -} - -enum FetchState { - Error(ContentHandler), - InProgress(Box + Send>), - Streaming(hyper::Response), - Done(local::Dapp, endpoint::Response), - Empty, -} - -impl fmt::Debug for FetchState { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - use self::FetchState::*; - - write!(fmt, "FetchState(")?; - match *self { - Error(ref error) => write!(fmt, "error: {:?}", error), - InProgress(_) => write!(fmt, "in progress"), - Streaming(ref res) => write!(fmt, "streaming: {:?}", res), - Done(ref endpoint, _) => write!(fmt, "done: {:?}", endpoint), - Empty => write!(fmt, "?"), - }?; - write!(fmt, ")") - } -} - -#[derive(Debug)] -pub struct ContentFetcherHandler { - fetch_control: FetchControl, - status: FetchState, -} - -impl ContentFetcherHandler { - pub fn fetch_control(&self) -> FetchControl { - self.fetch_control.clone() - } - - pub fn new( - method: &hyper::Method, - url: &str, - path: EndpointPath, - installer: H, - fetch: F, - pool: CpuPool, - ) -> Self { - let fetch_control = FetchControl::default(); - - // Validation of method - let status = match *method { - // Start fetching content - hyper::Method::Get => { - trace!(target: "dapps", "Fetching content from: {:?}", url); - FetchState::InProgress(Self::fetch_content( - pool, - fetch, - url, - fetch_control.abort.clone(), - path, - installer, - )) - }, - // or return error - _ => FetchState::Error(errors::method_not_allowed()), - }; - - ContentFetcherHandler { - fetch_control, - status, - } - } - - fn fetch_content( - pool: CpuPool, - fetch: F, - url: &str, - abort: Arc, - path: EndpointPath, - installer: H, - ) -> Box + Send> { - // Start fetching the content - let pool2 = pool.clone(); - let future = fetch.get(url, abort.into()).then(move |result| { - trace!(target: "dapps", "Fetching content finished. Starting validation: {:?}", result); - Ok(match result { - Ok(response) => match installer.validate_and_install(response) { - Ok(ValidatorResponse::Local(endpoint)) => { - trace!(target: "dapps", "Validation OK. Returning response."); - let response = endpoint.to_response(&path); - FetchState::Done(endpoint, response) - }, - Ok(ValidatorResponse::Streaming(stream)) => { - trace!(target: "dapps", "Validation OK. Streaming response."); - let (reading, response) = stream.into_response(); - pool.spawn(reading).forget(); - FetchState::Streaming(response) - }, - Err(e) => { - trace!(target: "dapps", "Error while validating content: {:?}", e); - FetchState::Error(errors::invalid_content(e)) - }, - }, - Err(e) => { - warn!(target: "dapps", "Unable to fetch content: {:?}", e); - FetchState::Error(errors::download_error(e)) - }, - }) - }); - - // make sure to run within fetch thread pool. - Box::new(pool2.spawn(future)) - } -} - -impl Future for ContentFetcherHandler { - type Item = hyper::Response; - type Error = hyper::Error; - - fn poll(&mut self) -> futures::Poll { - loop { - trace!(target: "dapps", "Polling status: {:?}", self.status); - self.status = match mem::replace(&mut self.status, FetchState::Empty) { - FetchState::Error(error) => { - return Ok(futures::Async::Ready(error.into())); - }, - FetchState::Streaming(response) => { - return Ok(futures::Async::Ready(response)); - }, - any => any, - }; - - let status = match self.status { - // Request may time out - FetchState::InProgress(_) if self.fetch_control.is_deadline_reached() => { - trace!(target: "dapps", "Fetching dapp failed because of timeout."); - FetchState::Error(errors::timeout_error()) - }, - FetchState::InProgress(ref mut receiver) => { - // Check if there is a response - trace!(target: "dapps", "Polling streaming response."); - try_ready!(receiver.poll().map_err(|err| { - warn!(target: "dapps", "Error while fetching response: {:?}", err); - hyper::Error::Timeout - })) - }, - FetchState::Done(_, ref mut response) => { - return response.poll() - }, - FetchState::Empty => panic!("Future polled twice."), - _ => unreachable!(), - }; - - trace!(target: "dapps", "New status: {:?}", status); - self.fetch_control.set_status(&status); - self.status = status; - } - } -} diff --git a/dapps/src/handlers/mod.rs b/dapps/src/handlers/mod.rs deleted file mode 100644 index cb0eba0429..0000000000 --- a/dapps/src/handlers/mod.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Hyper handlers implementations. - -mod content; -mod echo; -mod fetch; -mod reader; -mod redirect; -mod streaming; -mod errors; - -pub use self::content::ContentHandler; -pub use self::echo::EchoHandler; -pub use self::fetch::{ContentFetcherHandler, ContentValidator, FetchControl, ValidatorResponse}; -pub use self::reader::Reader; -pub use self::redirect::Redirection; -pub use self::streaming::StreamingHandler; - -use hyper::header; -use std::time::Duration; - -const FETCH_TIMEOUT: Duration = Duration::from_secs(300); - -/// Adds security-related headers to the Response. -pub fn add_security_headers(headers: &mut header::Headers, allow_js_eval: bool) { - headers.set_raw("X-XSS-Protection", "1; mode=block"); - headers.set_raw("X-Content-Type-Options", "nosniff"); - headers.set_raw("X-Frame-Options", "SAMEORIGIN"); - - // Content Security Policy headers - headers.set_raw("Content-Security-Policy", String::new() - // Restrict everything to the same origin by default. - + "default-src 'self';" - // Allow connecting to WS servers and HTTP(S) servers. - // We could be more restrictive and allow only RPC server URL. - + "connect-src http: https: ws: wss:;" - // Allow framing any content from HTTP(S). - // Again we could only allow embedding from RPC server URL. - // (deprecated) - + "frame-src 'self' http: https:;" - // Allow framing and web workers from HTTP(S). - + "child-src 'self' http: https:;" - // We allow data: blob: and HTTP(s) images. - // We could get rid of wildcarding HTTP and only allow RPC server URL. - // (http required for local dapps icons) - + "img-src 'self' 'unsafe-inline' data: blob: http: https:;" - // Allow style from data: blob: and HTTPS. - + "style-src 'self' 'unsafe-inline' data: blob: https:;" - // Allow fonts from data: and HTTPS. - + "font-src 'self' data: https:;" - // Disallow objects - + "object-src 'none';" - // Allow scripts - + { - let script_src = ""; - let eval = if allow_js_eval { " 'unsafe-eval'" } else { "" }; - - &format!( - "script-src 'self' {}{};", - script_src, - eval - ) - } - // Same restrictions as script-src with additional - // blob: that is required for camera access (worker) - + "worker-src 'self' https: blob:;" - // Run in sandbox mode (although it's not fully safe since we allow same-origin and script) - + "sandbox allow-same-origin allow-forms allow-modals allow-popups allow-presentation allow-scripts;" - // Disallow submitting forms from any dapps - + "form-action 'none';" - // Never allow mixed content - + "block-all-mixed-content;" - // Specify if the site can be embedded. - + "frame-ancestors 'self';" - ); -} diff --git a/dapps/src/handlers/reader.rs b/dapps/src/handlers/reader.rs deleted file mode 100644 index 3b0aa5449b..0000000000 --- a/dapps/src/handlers/reader.rs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2015-2018 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 . - -//! A chunk-producing io::Read wrapper. - -use std::io::{self, Read}; - -use futures::{self, sink, Sink, Future}; -use futures::sync::mpsc; -use hyper; - -type Sender = mpsc::Sender>; - -const MAX_CHUNK_SIZE: usize = 32 * 1024; - -/// A Reader is essentially a stream of `hyper::Chunks`. -/// The chunks are read from given `io::Read` instance. -/// -/// Unfortunately `hyper` doesn't allow you to pass `Stream` -/// directly to the response, so you need to create -/// a `Body::pair()` and send over chunks using `sink::Send`. -/// Also `Chunks` need to take `Vec` by value, so we need -/// to allocate it for each chunk being sent. -pub struct Reader { - buffer: [u8; MAX_CHUNK_SIZE], - content: io::BufReader, - sending: sink::Send, -} - -impl Reader { - pub fn pair(content: R, initial: Vec) -> (Self, hyper::Body) { - let (tx, rx) = hyper::Body::pair(); - let reader = Reader { - buffer: [0; MAX_CHUNK_SIZE], - content: io::BufReader::new(content), - sending: tx.send(Ok(initial.into())), - }; - - (reader, rx) - } -} - -impl Future for Reader { - type Item = (); - type Error = (); - - fn poll(&mut self) -> futures::Poll { - loop { - let next = try_ready!(self.sending.poll().map_err(|err| { - warn!(target: "dapps", "Unable to send next chunk: {:?}", err); - })); - - self.sending = match self.content.read(&mut self.buffer) { - Ok(0) => return Ok(futures::Async::Ready(())), - Ok(read) => next.send(Ok(self.buffer[..read].to_vec().into())), - Err(err) => next.send(Err(hyper::Error::Io(err))), - } - } - } -} diff --git a/dapps/src/handlers/redirect.rs b/dapps/src/handlers/redirect.rs deleted file mode 100644 index c8bf837d85..0000000000 --- a/dapps/src/handlers/redirect.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2015-2018 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 . - -//! HTTP Redirection hyper handler - -use hyper::{self, header, StatusCode}; - -#[derive(Clone)] -pub struct Redirection { - to_url: String -} - -impl Redirection { - pub fn new>(url: T) -> Self { - Redirection { - to_url: url.into() - } - } -} - -impl Into for Redirection { - fn into(self) -> hyper::Response { - // Don't use `MovedPermanently` here to prevent browser from caching the redirections. - hyper::Response::new() - .with_status(StatusCode::Found) - .with_header(header::Location::new(self.to_url)) - } -} diff --git a/dapps/src/handlers/streaming.rs b/dapps/src/handlers/streaming.rs deleted file mode 100644 index b6feaa6382..0000000000 --- a/dapps/src/handlers/streaming.rs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Content Stream Response - -use std::io; -use hyper::{self, header, mime, StatusCode}; - -use handlers::{add_security_headers, Reader}; - -pub struct StreamingHandler { - initial: Vec, - content: R, - status: StatusCode, - mimetype: mime::Mime, -} - -impl StreamingHandler { - pub fn new(content: R, status: StatusCode, mimetype: mime::Mime) -> Self { - StreamingHandler { - initial: Vec::new(), - content, - status, - mimetype, - } - } - - pub fn set_initial_content(&mut self, content: &str) { - self.initial = content.as_bytes().to_vec(); - } - - pub fn into_response(self) -> (Reader, hyper::Response) { - let (reader, body) = Reader::pair(self.content, self.initial); - let mut res = hyper::Response::new() - .with_status(self.status) - .with_header(header::ContentType(self.mimetype)) - .with_body(body); - add_security_headers(&mut res.headers_mut(), false); - - (reader, res) - } -} diff --git a/dapps/src/lib.rs b/dapps/src/lib.rs deleted file mode 100644 index 4fcf9740d7..0000000000 --- a/dapps/src/lib.rs +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Ethcore Webapplications for Parity -#![warn(missing_docs)] - -extern crate base32; -extern crate futures_cpupool; -extern crate itertools; -extern crate linked_hash_map; -extern crate mime_guess; -extern crate parking_lot; -extern crate rand; -extern crate rustc_hex; -extern crate serde; -extern crate serde_json; -extern crate unicase; -extern crate zip; - -extern crate jsonrpc_http_server; - -extern crate parity_bytes as bytes; -extern crate ethereum_types; -extern crate fetch; -extern crate node_health; -extern crate parity_dapps_glue as parity_dapps; -extern crate parity_hash_fetch as hash_fetch; -extern crate keccak_hash as hash; -extern crate parity_version; -extern crate registrar; - -#[macro_use] -extern crate futures; -#[macro_use] -extern crate log; -#[macro_use] -extern crate serde_derive; - -#[cfg(test)] -extern crate env_logger; -#[cfg(test)] -extern crate ethcore_devtools as devtools; -#[cfg(test)] -extern crate jsonrpc_core; -#[cfg(test)] -extern crate parity_reactor; - -mod endpoint; -mod apps; -mod page; -mod router; -mod handlers; -mod api; -mod proxypac; -mod web; -#[cfg(test)] -mod tests; - -use std::collections::HashMap; -use std::mem; -use std::path::PathBuf; -use std::sync::Arc; -use futures_cpupool::CpuPool; -use jsonrpc_http_server::{self as http, hyper, Origin}; -use parking_lot::RwLock; - -use fetch::Fetch; -use node_health::NodeHealth; - -pub use registrar::{RegistrarClient, Asynchronous}; -pub use node_health::SyncStatus; -pub use page::builtin::Dapp; - -/// Validates Web Proxy tokens -pub trait WebProxyTokens: Send + Sync { - /// Should return a domain allowed to be accessed by this token or `None` if the token is not valid - fn domain(&self, token: &str) -> Option; -} - -impl WebProxyTokens for F where F: Fn(String) -> Option + Send + Sync { - fn domain(&self, token: &str) -> Option { self(token.to_owned()) } -} - -/// Current supported endpoints. -#[derive(Default, Clone)] -pub struct Endpoints { - local_endpoints: Arc>>, - endpoints: Arc>, - dapps_path: PathBuf, - pool: Option, -} - -impl Endpoints { - /// Returns a current list of app endpoints. - pub fn list(&self) -> Vec { - self.endpoints.read().iter().filter_map(|(ref k, ref e)| { - e.info().map(|ref info| info.with_id(k)) - }).collect() - } - - /// Check for any changes in the local dapps folder and update. - pub fn refresh_local_dapps(&self) { - let pool = match self.pool.as_ref() { - None => return, - Some(pool) => pool, - }; - let new_local = apps::fs::local_endpoints(&self.dapps_path, pool.clone()); - let old_local = mem::replace(&mut *self.local_endpoints.write(), new_local.keys().cloned().collect()); - let (_, to_remove): (_, Vec<_>) = old_local - .into_iter() - .partition(|k| new_local.contains_key(&k.clone())); - - let mut endpoints = self.endpoints.write(); - // remove the dead dapps - for k in to_remove { - endpoints.remove(&k); - } - // new dapps to be added - for (k, v) in new_local { - if !endpoints.contains_key(&k) { - endpoints.insert(k, v); - } - } - } -} - -/// Dapps server as `jsonrpc-http-server` request middleware. -pub struct Middleware { - endpoints: Endpoints, - router: router::Router, -} - -impl Middleware { - /// Get local endpoints handle. - pub fn endpoints(&self) -> &Endpoints { - &self.endpoints - } - - /// Creates new Dapps server middleware. - pub fn dapps( - pool: CpuPool, - health: NodeHealth, - dapps_path: PathBuf, - extra_dapps: Vec, - dapps_domain: &str, - registrar: Arc>, - sync_status: Arc, - web_proxy_tokens: Arc, - fetch: F, - ) -> Self { - let content_fetcher = Arc::new(apps::fetcher::ContentFetcher::new( - hash_fetch::urlhint::URLHintContract::new(registrar), - sync_status.clone(), - fetch.clone(), - pool.clone(), - ).allow_dapps(true)); - let (local_endpoints, endpoints) = apps::all_endpoints( - dapps_path.clone(), - extra_dapps, - dapps_domain, - web_proxy_tokens, - fetch.clone(), - pool.clone(), - ); - let endpoints = Endpoints { - endpoints: Arc::new(RwLock::new(endpoints)), - dapps_path, - local_endpoints: Arc::new(RwLock::new(local_endpoints)), - pool: Some(pool.clone()), - }; - - let special = special_endpoints( - health, - content_fetcher.clone(), - ); - - let router = router::Router::new( - content_fetcher, - Some(endpoints.clone()), - special, - dapps_domain.to_owned(), - ); - - Middleware { - endpoints, - router, - } - } -} - -impl http::RequestMiddleware for Middleware { - fn on_request(&self, req: hyper::Request) -> http::RequestMiddlewareAction { - self.router.on_request(req) - } -} - -fn special_endpoints( - health: NodeHealth, - content_fetcher: Arc, -) -> HashMap>> { - let mut special = HashMap::new(); - special.insert(router::SpecialEndpoint::Rpc, None); - special.insert(router::SpecialEndpoint::Api, Some(api::RestApi::new( - content_fetcher, - health, - ))); - special -} - -/// Random filename -fn random_filename() -> String { - use ::rand::Rng; - let mut rng = ::rand::OsRng::new().unwrap(); - rng.gen_ascii_chars().take(12).collect() -} diff --git a/dapps/src/page/builtin.rs b/dapps/src/page/builtin.rs deleted file mode 100644 index 685b1401d1..0000000000 --- a/dapps/src/page/builtin.rs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2015-2018 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::io; -use futures::future; -use futures_cpupool::CpuPool; -use hyper::mime::{self, Mime}; -use itertools::Itertools; -use parity_dapps::{WebApp, Info}; - -use endpoint::{Endpoint, EndpointInfo, EndpointPath, Request, Response}; -use page::{handler, PageCache}; - -/// Represents a builtin Dapp. -pub struct Dapp { - /// futures cpu pool - pool: CpuPool, - /// Content of the files - app: T, - info: EndpointInfo, - fallback_to_index_html: bool, -} - -impl Dapp { - /// Creates new `Dapp` for builtin (compile time) Dapp. - pub fn new(pool: CpuPool, app: T) -> Self { - let info = app.info(); - Dapp { - pool, - app, - info: EndpointInfo::from(info), - fallback_to_index_html: false, - } - } - - /// Creates a new `Dapp` for builtin (compile time) Dapp. - /// Instead of returning 404 this endpoint will always server index.html. - pub fn with_fallback_to_index(pool: CpuPool, app: T) -> Self { - let info = app.info(); - Dapp { - pool, - app, - info: EndpointInfo::from(info), - fallback_to_index_html: true, - } - } - - /// Allow the dapp to use `unsafe-eval` to run JS. - pub fn allow_js_eval(&mut self) { - self.info.allow_js_eval = Some(true); - } -} - -impl Endpoint for Dapp { - fn info(&self) -> Option<&EndpointInfo> { - Some(&self.info) - } - - fn respond(&self, path: EndpointPath, _req: Request) -> Response { - trace!(target: "dapps", "Builtin file path: {:?}", path); - let file_path = if path.has_no_params() { - "index.html".to_owned() - } else { - path.app_params.into_iter().filter(|x| !x.is_empty()).join("/") - }; - trace!(target: "dapps", "Builtin file: {:?}", file_path); - - let file = { - let file = |path| self.app.file(path).map(|file| { - let content_type = match file.content_type.parse() { - Ok(mime) => mime, - Err(_) => { - warn!(target: "dapps", "invalid MIME type: {}", file.content_type); - mime::TEXT_HTML - }, - }; - BuiltinFile { - content_type, - content: io::Cursor::new(file.content), - } - }); - let res = file(&file_path); - if self.fallback_to_index_html { - res.or_else(|| file("index.html")) - } else { - res - } - }; - - let (reader, response) = handler::PageHandler { - file, - cache: PageCache::Disabled, - allow_js_eval: self.info.allow_js_eval.clone().unwrap_or(false), - }.into_response(); - - self.pool.spawn(reader).forget(); - - Box::new(future::ok(response)) - } -} - -impl From for EndpointInfo { - fn from(info: Info) -> Self { - EndpointInfo { - id: None, - name: info.name.into(), - description: info.description.into(), - author: info.author.into(), - icon_url: info.icon_url.into(), - local_url: None, - version: info.version.into(), - allow_js_eval: None, - } - } -} - -struct BuiltinFile { - content_type: Mime, - content: io::Cursor<&'static [u8]>, -} - -impl handler::DappFile for BuiltinFile { - type Reader = io::Cursor<&'static [u8]>; - - fn content_type(&self) -> &Mime { - &self.content_type - } - - fn into_reader(self) -> Self::Reader { - self.content - } -} diff --git a/dapps/src/page/handler.rs b/dapps/src/page/handler.rs deleted file mode 100644 index d7fcefa7f0..0000000000 --- a/dapps/src/page/handler.rs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2015-2018 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::io; -use std::time::{Duration, SystemTime}; -use hyper::{self, header, StatusCode}; -use hyper::mime::{Mime}; - -use handlers::{Reader, ContentHandler, add_security_headers}; - -/// Represents a file that can be sent to client. -/// Implementation should keep track of bytes already sent internally. -pub trait DappFile { - /// A reader type returned by this file. - type Reader: io::Read; - - /// Returns a content-type of this file. - fn content_type(&self) -> &Mime; - - /// Convert this file into io::Read instance. - fn into_reader(self) -> Self::Reader where Self: Sized; -} - -/// Defines what cache headers should be appended to returned resources. -#[derive(Debug, Copy, Clone, PartialEq)] -pub enum PageCache { - Enabled, - Disabled, -} - -impl Default for PageCache { - fn default() -> Self { - PageCache::Disabled - } -} - -/// A handler for a single webapp. -/// Resolves correct paths and serves as a plumbing code between -/// hyper server and dapp. -pub struct PageHandler { - /// File currently being served - pub file: Option, - /// Cache settings for this page. - pub cache: PageCache, - /// Allow JS unsafe-eval. - pub allow_js_eval: bool, -} - -impl PageHandler { - pub fn into_response(self) -> (Option>, hyper::Response) { - let file = match self.file { - None => return (None, ContentHandler::error( - StatusCode::NotFound, - "File not found", - "Requested file has not been found.", - None, - ).into()), - Some(file) => file, - }; - - let mut res = hyper::Response::new() - .with_status(StatusCode::Ok); - - // headers - { - let mut headers = res.headers_mut(); - - if let PageCache::Enabled = self.cache { - let validity_secs = 365u32 * 24 * 3600; - let validity = Duration::from_secs(validity_secs as u64); - headers.set(header::CacheControl(vec![ - header::CacheDirective::Public, - header::CacheDirective::MaxAge(validity_secs), - ])); - headers.set(header::Expires(header::HttpDate::from(SystemTime::now() + validity))); - } - - headers.set(header::ContentType(file.content_type().to_owned())); - - add_security_headers(&mut headers, self.allow_js_eval); - } - - let (reader, body) = Reader::pair(file.into_reader(), Vec::new()); - res.set_body(body); - (Some(reader), res) - } -} diff --git a/dapps/src/page/local.rs b/dapps/src/page/local.rs deleted file mode 100644 index a43735d768..0000000000 --- a/dapps/src/page/local.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2015-2018 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 mime_guess; -use std::{fs, fmt}; -use std::path::{Path, PathBuf}; -use futures::{future}; -use futures_cpupool::CpuPool; -use page::handler::{self, PageCache}; -use endpoint::{Endpoint, EndpointInfo, EndpointPath, Request, Response}; -use hyper::mime::Mime; - -#[derive(Clone)] -pub struct Dapp { - pool: CpuPool, - path: PathBuf, - mime: Option, - info: Option, - cache: PageCache, -} - -impl fmt::Debug for Dapp { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - fmt.debug_struct("Dapp") - .field("path", &self.path) - .field("mime", &self.mime) - .field("info", &self.info) - .field("cache", &self.cache) - .finish() - } -} - -impl Dapp { - pub fn new(pool: CpuPool, path: PathBuf, info: EndpointInfo, cache: PageCache) -> Self { - Dapp { - pool, - path, - mime: None, - info: Some(info), - cache, - } - } - - pub fn single_file(pool: CpuPool, path: PathBuf, mime: Mime, cache: PageCache) -> Self { - Dapp { - pool, - path, - mime: Some(mime), - info: None, - cache, - } - } - - pub fn path(&self) -> PathBuf { - self.path.clone() - } - - fn get_file(&self, path: &EndpointPath) -> Option { - if let Some(ref mime) = self.mime { - return LocalFile::from_path(&self.path, mime.to_owned()); - } - - let mut file_path = self.path.to_owned(); - - if path.has_no_params() { - file_path.push("index.html"); - } else { - for part in &path.app_params { - file_path.push(part); - } - } - - let mime = mime_guess::guess_mime_type(&file_path); - LocalFile::from_path(&file_path, mime) - } - - pub fn to_response(&self, path: &EndpointPath) -> Response { - let (reader, response) = handler::PageHandler { - file: self.get_file(path), - cache: self.cache, - allow_js_eval: self.info.as_ref().and_then(|x| x.allow_js_eval).unwrap_or(false), - }.into_response(); - - self.pool.spawn(reader).forget(); - - Box::new(future::ok(response)) - } -} - -impl Endpoint for Dapp { - fn info(&self) -> Option<&EndpointInfo> { - self.info.as_ref() - } - - fn respond(&self, path: EndpointPath, _req: Request) -> Response { - self.to_response(&path) - } -} - -struct LocalFile { - content_type: Mime, - file: fs::File, -} - -impl LocalFile { - fn from_path>(path: P, content_type: Mime) -> Option { - trace!(target: "dapps", "Local file: {:?}", path.as_ref()); - // Check if file exists - fs::File::open(&path).ok().map(|file| { - LocalFile { - content_type, - file, - } - }) - } -} - -impl handler::DappFile for LocalFile { - type Reader = fs::File; - - fn content_type(&self) -> &Mime { - &self.content_type - } - - fn into_reader(self) -> Self::Reader { - self.file - } -} diff --git a/dapps/src/page/mod.rs b/dapps/src/page/mod.rs deleted file mode 100644 index 65385320c4..0000000000 --- a/dapps/src/page/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015-2018 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 builtin; -pub mod local; -mod handler; - -pub use self::handler::PageCache; diff --git a/dapps/src/proxypac.rs b/dapps/src/proxypac.rs deleted file mode 100644 index 1acd7b1b9e..0000000000 --- a/dapps/src/proxypac.rs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Serving ProxyPac file - -use apps::HOME_PAGE; -use endpoint::{Endpoint, Request, Response, EndpointPath}; -use futures::future; -use handlers::ContentHandler; -use hyper::mime; - -pub struct ProxyPac { - dapps_domain: String, -} - -impl ProxyPac { - pub fn boxed(dapps_domain: String) -> Box { - Box::new(ProxyPac { dapps_domain }) - } -} - -impl Endpoint for ProxyPac { - fn respond(&self, path: EndpointPath, _req: Request) -> Response { - let ui = format!("{}:{}", path.host, path.port); - - let content = format!( -r#" -function FindProxyForURL(url, host) {{ - if (shExpMatch(host, "{0}.{1}")) - {{ - return "PROXY {4}"; - }} - - if (shExpMatch(host, "*.{1}")) - {{ - return "PROXY {2}:{3}"; - }} - - return "DIRECT"; -}} -"#, - HOME_PAGE, self.dapps_domain, path.host, path.port, ui); - - Box::new(future::ok( - ContentHandler::ok(content, mime::TEXT_JAVASCRIPT).into() - )) - } -} diff --git a/dapps/src/router.rs b/dapps/src/router.rs deleted file mode 100644 index 28a3e24c3f..0000000000 --- a/dapps/src/router.rs +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Router implementation -//! Dispatch requests to proper application. - -use std::sync::Arc; -use std::collections::HashMap; - -use futures::future; -use hyper::{self, header, Uri}; -use jsonrpc_http_server as http; - -use apps; -use apps::fetcher::Fetcher; -use endpoint::{self, Endpoint, EndpointPath}; -use Endpoints; -use handlers; - -/// Special endpoints are accessible on every domain (every dapp) -#[derive(Debug, PartialEq, Hash, Eq)] -pub enum SpecialEndpoint { - Rpc, - Api, - Home, - None, -} - -enum Response { - Some(endpoint::Response), - None(hyper::Request), -} - -/// An endpoint router. -/// Dispatches the request to particular Endpoint by requested uri/path. -pub struct Router { - endpoints: Option, - fetch: Arc, - special: HashMap>>, - dapps_domain: String, -} - -impl Router { - fn resolve_request(&self, req: hyper::Request, refresh_dapps: bool) -> Response { - // Choose proper handler depending on path / domain - let endpoint = extract_endpoint(req.uri(), req.headers().get(), &self.dapps_domain); - let referer = extract_referer_endpoint(&req, &self.dapps_domain); - let is_get_request = *req.method() == hyper::Method::Get; - let is_head_request = *req.method() == hyper::Method::Head; - let has_dapp = |dapp: &str| self.endpoints - .as_ref() - .map_or(false, |endpoints| endpoints.endpoints.read().contains_key(dapp)); - - trace!(target: "dapps", "Routing request to {:?}. Details: {:?}", req.uri(), req); - debug!(target: "dapps", "Handling endpoint request: {:?}, referer: {:?}", endpoint, referer); - - match (endpoint.0, endpoint.1, referer) { - // Handle invalid web requests that we can recover from - (ref path, SpecialEndpoint::None, Some(ref referer)) - if referer.app_id == apps::WEB_PATH - && has_dapp(apps::WEB_PATH) - && !is_web_endpoint(path) - => - { - let token = referer.app_params.get(0).map(String::as_str).unwrap_or(""); - let requested = req.uri().path(); - let query = req.uri().query().map_or_else(String::new, |query| format!("?{}", query)); - let redirect_url = format!("/{}/{}{}{}", apps::WEB_PATH, token, requested, query); - trace!(target: "dapps", "Redirecting to correct web request: {:?}", redirect_url); - Response::Some(Box::new(future::ok( - handlers::Redirection::new(redirect_url).into() - ))) - }, - // First check special endpoints - (ref path, ref endpoint, _) if self.special.contains_key(endpoint) => { - trace!(target: "dapps", "Resolving to special endpoint."); - let special = self.special.get(endpoint).expect("special known to contain key; qed"); - match *special { - Some(ref special) => Response::Some(special.respond(path.clone().unwrap_or_default(), req)), - None => Response::None(req), - } - }, - // Then delegate to dapp - (Some(ref path), _, _) if has_dapp(&path.app_id) => { - trace!(target: "dapps", "Resolving to local/builtin dapp."); - Response::Some(self.endpoints - .as_ref() - .expect("endpoints known to be set; qed") - .endpoints - .read() - .get(&path.app_id) - .expect("endpoints known to contain key; qed") - .respond(path.clone(), req)) - }, - // Try to resolve and fetch the dapp - (Some(ref path), _, _) if self.fetch.contains(&path.app_id) => { - trace!(target: "dapps", "Resolving to fetchable content."); - Response::Some(self.fetch.respond(path.clone(), req)) - }, - // 404 for non-existent content (only if serving endpoints and not homepage) - (Some(ref path), _, _) - if (is_get_request || is_head_request) - && self.endpoints.is_some() - && path.app_id != apps::HOME_PAGE - => - { - trace!(target: "dapps", "Resolving to 404."); - if refresh_dapps { - debug!(target: "dapps", "Refreshing dapps and re-trying."); - self.endpoints.as_ref().map(|endpoints| endpoints.refresh_local_dapps()); - return self.resolve_request(req, false); - } else { - Response::Some(Box::new(future::ok(handlers::ContentHandler::error( - hyper::StatusCode::NotFound, - "404 Not Found", - "Requested content was not found.", - None, - ).into()))) - } - }, - // Any other GET|HEAD requests to home page. - _ if (is_get_request || is_head_request) && self.special.contains_key(&SpecialEndpoint::Home) => { - trace!(target: "dapps", "Resolving to home page."); - let special = self.special.get(&SpecialEndpoint::Home).expect("special known to contain key; qed"); - match *special { - Some(ref special) => { - let mut endpoint = EndpointPath::default(); - endpoint.app_params = req.uri().path().split('/').map(str::to_owned).collect(); - Response::Some(special.respond(endpoint, req)) - }, - None => Response::None(req), - } - }, - // RPC by default - _ if self.special.contains_key(&SpecialEndpoint::Rpc) => { - trace!(target: "dapps", "Resolving to RPC call."); - Response::None(req) - }, - // 404 otherwise - _ => { - Response::Some(Box::new(future::ok(handlers::ContentHandler::error( - hyper::StatusCode::NotFound, - "404 Not Found", - "Requested content was not found.", - None, - ).into()))) - }, - } - } -} - -impl http::RequestMiddleware for Router { - fn on_request(&self, req: hyper::Request) -> http::RequestMiddlewareAction { - let is_origin_set = req.headers().get::().is_some(); - let response = self.resolve_request(req, self.endpoints.is_some()); - match response { - Response::Some(response) => http::RequestMiddlewareAction::Respond { - should_validate_hosts: true, - response, - }, - Response::None(request) => http::RequestMiddlewareAction::Proceed { - should_continue_on_invalid_cors: !is_origin_set, - request, - }, - } - } -} - -impl Router { - pub fn new( - content_fetcher: Arc, - endpoints: Option, - special: HashMap>>, - dapps_domain: String, - ) -> Self { - Router { - endpoints: endpoints, - fetch: content_fetcher, - special: special, - dapps_domain: format!(".{}", dapps_domain), - } - } -} - -fn is_web_endpoint(path: &Option) -> bool { - match *path { - Some(ref path) if path.app_id == apps::WEB_PATH => true, - _ => false, - } -} - -fn extract_referer_endpoint(req: &hyper::Request, dapps_domain: &str) -> Option { - let referer = req.headers().get::(); - - let url = referer.and_then(|referer| referer.parse().ok()); - url.and_then(|url| { - extract_url_referer_endpoint(&url, dapps_domain).or_else(|| { - extract_endpoint(&url, None, dapps_domain).0 - }) - }) -} - -fn extract_url_referer_endpoint(url: &Uri, dapps_domain: &str) -> Option { - let query = url.query(); - match query { - Some(query) if query.starts_with(apps::URL_REFERER) => { - let scheme = url.scheme().unwrap_or("http"); - let host = url.host().unwrap_or("unknown"); - let port = default_port(url, None); - let referer_url = format!("{}://{}:{}/{}", scheme, host, port, &query[apps::URL_REFERER.len()..]); - debug!(target: "dapps", "Recovering referer from query parameter: {}", referer_url); - - if let Some(referer_url) = referer_url.parse().ok() { - extract_endpoint(&referer_url, None, dapps_domain).0 - } else { - None - } - }, - _ => None, - } -} - -fn extract_endpoint(url: &Uri, extra_host: Option<&header::Host>, dapps_domain: &str) -> (Option, SpecialEndpoint) { - fn special_endpoint(path: &[&str]) -> SpecialEndpoint { - if path.len() <= 1 { - return SpecialEndpoint::None; - } - - match path[0].as_ref() { - apps::RPC_PATH => SpecialEndpoint::Rpc, - apps::API_PATH => SpecialEndpoint::Api, - apps::HOME_PAGE => SpecialEndpoint::Home, - _ => SpecialEndpoint::None, - } - } - - let port = default_port(url, extra_host.as_ref().and_then(|h| h.port())); - let host = url.host().or_else(|| extra_host.as_ref().map(|h| h.hostname())); - let query = url.query().map(str::to_owned); - let mut path_segments = url.path().split('/').skip(1).collect::>(); - trace!( - target: "dapps", - "Extracting endpoint from: {:?} (dapps: {}). Got host {:?}:{} with path {:?}", - url, dapps_domain, host, port, path_segments - ); - match host { - Some(host) if host.ends_with(dapps_domain) => { - let id = &host[0..(host.len() - dapps_domain.len())]; - let special = special_endpoint(&path_segments); - - // remove special endpoint id from params - if special != SpecialEndpoint::None { - path_segments.remove(0); - } - - let (app_id, app_params) = if let Some(split) = id.rfind('.') { - let (params, id) = id.split_at(split); - path_segments.insert(0, params); - (id[1..].to_owned(), path_segments) - } else { - (id.to_owned(), path_segments) - }; - - (Some(EndpointPath { - app_id, - app_params: app_params.into_iter().map(Into::into).collect(), - query, - host: host.to_owned(), - port, - using_dapps_domains: true, - }), special) - }, - Some(host) if path_segments.len() > 1 => { - let special = special_endpoint(&path_segments); - let id = path_segments.remove(0); - (Some(EndpointPath { - app_id: id.to_owned(), - app_params: path_segments.into_iter().map(Into::into).collect(), - query, - host: host.to_owned(), - port, - using_dapps_domains: false, - }), special) - }, - _ => (None, special_endpoint(&path_segments)), - } -} - -fn default_port(url: &Uri, extra_port: Option) -> u16 { - let scheme = url.scheme().unwrap_or("http"); - url.port().or(extra_port).unwrap_or_else(|| match scheme { - "http" => 80, - "https" => 443, - _ => 80, - }) -} - -#[cfg(test)] -mod tests { - use super::{SpecialEndpoint, EndpointPath, extract_endpoint}; - - #[test] - fn should_extract_endpoint() { - let dapps_domain = ".web3.site"; - - // With path prefix - assert_eq!( - extract_endpoint(&"http://localhost:8080/status/index.html?q=1".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "status".to_owned(), - app_params: vec!["index.html".to_owned()], - query: Some("q=1".into()), - host: "localhost".to_owned(), - port: 8080, - using_dapps_domains: false, - }), SpecialEndpoint::None) - ); - - // With path prefix - assert_eq!( - extract_endpoint(&"http://localhost:8080/rpc/".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "rpc".to_owned(), - app_params: vec!["".to_owned()], - query: None, - host: "localhost".to_owned(), - port: 8080, - using_dapps_domains: false, - }), SpecialEndpoint::Rpc) - ); - - // By Subdomain - assert_eq!( - extract_endpoint(&"http://status.web3.site/test.html".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "status".to_owned(), - app_params: vec!["test.html".to_owned()], - query: None, - host: "status.web3.site".to_owned(), - port: 80, - using_dapps_domains: true, - }), SpecialEndpoint::None) - ); - - // RPC by subdomain - assert_eq!( - extract_endpoint(&"http://my.status.web3.site/rpc/".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "status".to_owned(), - app_params: vec!["my".into(), "".into()], - query: None, - host: "my.status.web3.site".to_owned(), - port: 80, - using_dapps_domains: true, - }), SpecialEndpoint::Rpc) - ); - - // API by subdomain - assert_eq!( - extract_endpoint(&"http://my.status.web3.site/api/".parse().unwrap(), None, dapps_domain), - (Some(EndpointPath { - app_id: "status".to_owned(), - app_params: vec!["my".into(), "".into()], - query: None, - host: "my.status.web3.site".to_owned(), - port: 80, - using_dapps_domains: true, - }), SpecialEndpoint::Api) - ); - } -} diff --git a/dapps/src/tests/api.rs b/dapps/src/tests/api.rs deleted file mode 100644 index d31f796d57..0000000000 --- a/dapps/src/tests/api.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2015-2018 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 tests::helpers::{serve, serve_with_registrar, request, assert_security_headers}; - -#[test] -fn should_return_error() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - GET /api/empty HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 404 Not Found"); - response.assert_header("Content-Type", "application/json"); - assert_eq!(response.body, format!("58\n{}\n0\n\n", r#"{"code":"404","title":"Not Found","detail":"Resource you requested has not been found."}"#)); - assert_security_headers(&response.headers); -} - -#[test] -fn should_handle_ping() { - // given - let server = serve(); - - // when - let response = request(server, - "\ - POST /api/ping HTTP/1.1\r\n\ - Host: home.parity\r\n\ - Content-Type: application/json\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - response.assert_header("Content-Type", "application/json"); - assert_eq!(response.body, "0\n\n".to_owned()); - assert_security_headers(&response.headers); -} - -#[test] -fn should_try_to_resolve_dapp() { - // given - let (server, registrar) = serve_with_registrar(); - - // when - let response = request(server, - "\ - GET /api/content/1472a9e190620cdf6b31f383373e45efcfe869a820c91f9ccd7eb9fb45e4985d HTTP/1.1\r\n\ - Host: home.parity\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 404 Not Found"); - assert_eq!(registrar.calls.lock().len(), 2); - assert_security_headers(&response.headers); -} diff --git a/dapps/src/tests/fetch.rs b/dapps/src/tests/fetch.rs deleted file mode 100644 index 444d5b656a..0000000000 --- a/dapps/src/tests/fetch.rs +++ /dev/null @@ -1,544 +0,0 @@ -// Copyright 2015-2018 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 devtools::http_client; -use rustc_hex::FromHex; -use tests::helpers::{ - serve_with_registrar, serve_with_registrar_and_sync, serve_with_fetch, - serve_with_registrar_and_fetch, - request, assert_security_headers -}; - -#[test] -fn should_resolve_dapp() { - // given - let (server, registrar) = serve_with_registrar(); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 1472a9e190620cdf6b31f383373e45efcfe869a820c91f9ccd7eb9fb45e4985d.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 404 Not Found"); - assert_eq!(registrar.calls.lock().len(), 4); - assert_security_headers(&response.headers); -} - -#[test] -fn should_return_503_when_syncing_but_should_make_the_calls() { - // given - let (server, registrar) = serve_with_registrar_and_sync(); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 1472a9e190620cdf6b31f383373e45efcfe869a820c91f9ccd7eb9fb45e4985d.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 503 Service Unavailable"); - assert_eq!(registrar.calls.lock().len(), 2); - assert_security_headers(&response.headers); -} - -const GAVCOIN_DAPP: &'static str = "00000000000000000000000000000000000000000000000000000000000000609faf32e1e3845e237cc6efd27187cee13b3b99db000000000000000000000000000000000000000000000000d8bd350823e28ff75e74a34215faefdc8a52fd8e00000000000000000000000000000000000000000000000000000000000000116761766f66796f726b2f676176636f696e000000000000000000000000000000"; -const GAVCOIN_ICON: &'static str = "00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8bd350823e28ff75e74a34215faefdc8a52fd8e000000000000000000000000000000000000000000000000000000000000007768747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f657468636f72652f646170702d6173736574732f623838653938336162616131613661363334356238643934343863313562313137646462353430652f746f6b656e732f676176636f696e2d36347836342e706e67000000000000000000"; - -#[test] -fn should_return_502_on_hash_mismatch() { - // given - let (server, fetch, registrar) = serve_with_registrar_and_fetch(); - let gavcoin = GAVCOIN_DAPP.from_hex().unwrap(); - registrar.set_result( - "94f093625c06887d94d9fee0d5f9cc4aaa46f33d24d1c7e4b5237e7c37d547dd".parse().unwrap(), - Ok(gavcoin.clone()) - ); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 94f093625c06887d94d9fee0d5f9cc4aaa46f33d24d1c7e4b5237e7c37d547dd.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - assert_eq!(registrar.calls.lock().len(), 4); - - fetch.assert_requested("https://codeload.github.com/gavofyork/gavcoin/zip/9faf32e1e3845e237cc6efd27187cee13b3b99db"); - fetch.assert_no_more_requests(); - - response.assert_status("HTTP/1.1 502 Bad Gateway"); - assert!(response.body.contains("HashMismatch"), "Expected hash mismatch response, got: {:?}", response.body); - assert_security_headers(&response.headers); -} - -#[test] -fn should_return_error_for_invalid_dapp_zip() { - // given - let (server, fetch, registrar) = serve_with_registrar_and_fetch(); - let gavcoin = GAVCOIN_DAPP.from_hex().unwrap(); - registrar.set_result( - "2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e".parse().unwrap(), - Ok(gavcoin.clone()) - ); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - assert_eq!(registrar.calls.lock().len(), 4); - - fetch.assert_requested("https://codeload.github.com/gavofyork/gavcoin/zip/9faf32e1e3845e237cc6efd27187cee13b3b99db"); - fetch.assert_no_more_requests(); - - response.assert_status("HTTP/1.1 502 Bad Gateway"); - assert!(response.body.contains("InvalidArchive"), "Expected invalid zip response, got: {:?}", response.body); - assert_security_headers(&response.headers); -} - -#[test] -fn should_return_fetched_dapp_content() { - // given - let (server, fetch, registrar) = serve_with_registrar_and_fetch(); - let gavcoin = GAVCOIN_DAPP.from_hex().unwrap(); - registrar.set_result( - "9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a".parse().unwrap(), - Ok(gavcoin.clone()) - ); - fetch.set_response(include_bytes!("../../res/gavcoin.zip")); - - // when - let response1 = http_client::request(server.addr(), - "\ - GET /index.html HTTP/1.1\r\n\ - Host: 9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - let response2 = http_client::request(server.addr(), - "\ - GET /manifest.json HTTP/1.1\r\n\ - Host: 9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - assert_eq!(registrar.calls.lock().len(), 4); - - fetch.assert_requested("https://codeload.github.com/gavofyork/gavcoin/zip/9faf32e1e3845e237cc6efd27187cee13b3b99db"); - fetch.assert_no_more_requests(); - - response1.assert_status("HTTP/1.1 200 OK"); - assert_security_headers(&response1.headers); - assert!( - response1.body.contains(r#"18 -

Hello Gavcoin!

- -0 - -"#), - "Expected Gavcoin body: {}", - response1.body - ); - - response2.assert_status("HTTP/1.1 200 OK"); - assert_security_headers(&response2.headers); - assert_eq!( - response2.body, - r#"EA -{ - "id": "9c94e154dab8acf859b30ee80fc828fb1d38359d938751b65db71d460588d82a", - "name": "Gavcoin", - "description": "Gavcoin", - "version": "1.0.0", - "author": "", - "iconUrl": "icon.png", - "localUrl": null, - "allowJsEval": false -} -0 - -"# - ); -} - -#[test] -fn should_return_fetched_content() { - // given - let (server, fetch, registrar) = serve_with_registrar_and_fetch(); - let gavcoin = GAVCOIN_ICON.from_hex().unwrap(); - registrar.set_result( - "2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e".parse().unwrap(), - Ok(gavcoin.clone()) - ); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - assert_eq!(registrar.calls.lock().len(), 4); - - fetch.assert_requested("https://raw.githubusercontent.com/ethcore/dapp-assets/b88e983abaa1a6a6345b8d9448c15b117ddb540e/tokens/gavcoin-64x64.png"); - fetch.assert_no_more_requests(); - - response.assert_status("HTTP/1.1 200 OK"); - response.assert_security_headers_present(None); -} - -#[test] -fn should_cache_content() { - // given - let (server, fetch, registrar) = serve_with_registrar_and_fetch(); - let gavcoin = GAVCOIN_ICON.from_hex().unwrap(); - registrar.set_result( - "2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e".parse().unwrap(), - Ok(gavcoin.clone()) - ); - let request_str = "\ - GET / HTTP/1.1\r\n\ - Host: 2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - "; - - let response = http_client::request(server.addr(), request_str); - fetch.assert_requested("https://raw.githubusercontent.com/ethcore/dapp-assets/b88e983abaa1a6a6345b8d9448c15b117ddb540e/tokens/gavcoin-64x64.png"); - fetch.assert_no_more_requests(); - response.assert_status("HTTP/1.1 200 OK"); - - // when - let response = http_client::request(server.addr(), request_str); - - // then - fetch.assert_no_more_requests(); - response.assert_status("HTTP/1.1 200 OK"); -} - -#[test] -fn should_not_request_content_twice() { - use std::thread; - - // given - let (server, fetch, registrar) = serve_with_registrar_and_fetch(); - let gavcoin = GAVCOIN_ICON.from_hex().unwrap(); - registrar.set_result( - "2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e".parse().unwrap(), - Ok(gavcoin.clone()) - ); - let request_str = "\ - GET / HTTP/1.1\r\n\ - Host: 2be00befcf008bc0e7d9cdefc194db9c75352e8632f48498b5a6bfce9f02c88e.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - "; - let fire_request = || { - let addr = server.addr().to_owned(); - let req = request_str.to_owned(); - thread::spawn(move || { - http_client::request(&addr, &req) - }) - }; - let control = fetch.manual(); - - // when - - // Fire two requests at the same time - let r1 = fire_request(); - let r2 = fire_request(); - - // wait for single request in fetch, the second one should go into waiting state. - control.wait_for_requests(1); - control.respond(); - - let response1 = r1.join().unwrap(); - let response2 = r2.join().unwrap(); - - // then - fetch.assert_requested("https://raw.githubusercontent.com/ethcore/dapp-assets/b88e983abaa1a6a6345b8d9448c15b117ddb540e/tokens/gavcoin-64x64.png"); - fetch.assert_no_more_requests(); - response1.assert_status("HTTP/1.1 200 OK"); - response2.assert_status("HTTP/1.1 200 OK"); -} - -#[test] -fn should_encode_and_decode_base32() { - use base32; - - let encoded = base32::encode(base32::Alphabet::Crockford, "token+https://parity.io".as_bytes()); - assert_eq!("EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY", &encoded); - - let data = base32::decode(base32::Alphabet::Crockford, "EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY").unwrap(); - assert_eq!("token+https://parity.io", &String::from_utf8(data).unwrap()); -} - -#[test] -fn should_stream_web_content() { - // given - let (server, fetch) = serve_with_fetch("token", "https://parity.io"); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY.web.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers(&response.headers); - - fetch.assert_requested("https://parity.io/"); - fetch.assert_no_more_requests(); -} - -#[test] -fn should_support_base32_encoded_web_urls() { - // given - let (server, fetch) = serve_with_fetch("token", "https://parity.io"); - - // when - let response = request(server, - "\ - GET /styles.css?test=123 HTTP/1.1\r\n\ - Host: EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY.web.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers(&response.headers); - - fetch.assert_requested("https://parity.io/styles.css?test=123"); - fetch.assert_no_more_requests(); -} - -#[test] -fn should_correctly_handle_long_label_when_splitted() { - // given - let (server, fetch) = serve_with_fetch("xolrg9fePeQyKLnL", "https://contribution.melonport.com"); - - // when - let response = request(server, - "\ - GET /styles.css?test=123 HTTP/1.1\r\n\ - Host: f1qprwk775k6am35a5wmpk3e9gnpgx3me1sk.mbsfcdqpwx3jd5h7ax39dxq2wvb5dhqpww3fe9t2wrvfdm.web.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers(&response.headers); - - fetch.assert_requested("https://contribution.melonport.com/styles.css?test=123"); - fetch.assert_no_more_requests(); -} - -#[test] -fn should_support_base32_encoded_web_urls_as_path() { - // given - let (server, fetch) = serve_with_fetch("token", "https://parity.io"); - - // when - let response = request(server, - "\ - GET /web/EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY/styles.css?test=123 HTTP/1.1\r\n\ - Host: localhost:8080\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_security_headers(&response.headers); - - fetch.assert_requested("https://parity.io/styles.css?test=123"); - fetch.assert_no_more_requests(); -} - -#[test] -fn should_return_error_on_non_whitelisted_domain() { - // given - let (server, fetch) = serve_with_fetch("token", "https://ethcore.io"); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY.web.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 400 Bad Request"); - assert_security_headers(&response.headers); - - fetch.assert_no_more_requests(); -} - -#[test] -fn should_return_error_on_invalid_token() { - // given - let (server, fetch) = serve_with_fetch("test", "https://parity.io"); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY.web.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 400 Bad Request"); - assert_security_headers(&response.headers); - - fetch.assert_no_more_requests(); -} - -#[test] -fn should_return_error_on_invalid_protocol() { - // given - let (server, fetch) = serve_with_fetch("token", "ftp://parity.io"); - - // when - let response = request(server, - "\ - GET /web/token/ftp/parity.io/ HTTP/1.1\r\n\ - Host: localhost:8080\r\n\ - Connection: close\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 400 Bad Request"); - assert_security_headers(&response.headers); - - fetch.assert_no_more_requests(); -} - -#[test] -fn should_disallow_non_get_requests() { - // given - let (server, fetch) = serve_with_fetch("token", "https://parity.io"); - - // when - let response = request(server, - "\ - POST / HTTP/1.1\r\n\ - Host: EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY.web.web3.site\r\n\ - Content-Type: application/json\r\n\ - Connection: close\r\n\ - \r\n\ - 123\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 405 Method Not Allowed"); - assert_security_headers(&response.headers); - - fetch.assert_no_more_requests(); -} - -#[test] -fn should_fix_absolute_requests_based_on_referer() { - // given - let (server, fetch) = serve_with_fetch("token", "https://parity.io"); - - // when - let response = request(server, - "\ - GET /styles.css HTTP/1.1\r\n\ - Host: localhost:8080\r\n\ - Connection: close\r\n\ - Referer: http://localhost:8080/web/EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY/\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 302 Found"); - response.assert_header("Location", "/web/EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY/styles.css"); - - fetch.assert_no_more_requests(); -} - -#[test] -fn should_fix_absolute_requests_based_on_referer_in_url() { - // given - let (server, fetch) = serve_with_fetch("token", "https://parity.io"); - - // when - let response = request(server, - "\ - GET /styles.css HTTP/1.1\r\n\ - Host: localhost:8080\r\n\ - Connection: close\r\n\ - Referer: http://localhost:8080/?__referer=web/EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY/\r\n\ - \r\n\ - " - ); - - // then - response.assert_status("HTTP/1.1 302 Found"); - response.assert_header("Location", "/web/EHQPPSBE5DM78X3GECX2YBVGC5S6JX3S5SMPY/styles.css"); - - fetch.assert_no_more_requests(); -} diff --git a/dapps/src/tests/helpers/fetch.rs b/dapps/src/tests/helpers/fetch.rs deleted file mode 100644 index 4affffe6ef..0000000000 --- a/dapps/src/tests/helpers/fetch.rs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2015-2018 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::{thread, time}; -use std::sync::{atomic, mpsc, Arc}; -use parking_lot::Mutex; -use hyper; - -use futures::{self, future, Future}; -use fetch::{self, Fetch, Url, Request, Abort}; - -pub struct FetchControl { - sender: mpsc::Sender<()>, - fetch: FakeFetch, -} - -impl FetchControl { - pub fn respond(self) { - self.sender.send(()) - .expect("Fetch cannot be finished without sending a response at least once."); - } - - pub fn wait_for_requests(&self, len: usize) { - const MAX_TIMEOUT: time::Duration = time::Duration::from_millis(5000); - const ATTEMPTS: u32 = 10; - let mut attempts_left = ATTEMPTS; - loop { - let current = self.fetch.requested.lock().len(); - - if current == len { - break; - } else if attempts_left == 0 { - panic!( - "Timeout reached when waiting for pending requests. Expected: {}, current: {}", - len, current - ); - } else { - attempts_left -= 1; - // Should we handle spurious timeouts better? - thread::park_timeout(MAX_TIMEOUT / ATTEMPTS); - } - } - } -} - -#[derive(Clone, Default)] -pub struct FakeFetch { - manual: Arc>>>, - response: Arc>>, - asserted: Arc, - requested: Arc>>, -} - -impl FakeFetch { - pub fn set_response(&self, data: &'static [u8]) { - *self.response.lock() = Some(data); - } - - pub fn manual(&self) -> FetchControl { - assert!(self.manual.lock().is_none(), "Only one manual control may be active."); - let (tx, rx) = mpsc::channel(); - *self.manual.lock() = Some(rx); - - FetchControl { - sender: tx, - fetch: self.clone(), - } - } - - pub fn assert_requested(&self, url: &str) { - let requests = self.requested.lock(); - let idx = self.asserted.fetch_add(1, atomic::Ordering::SeqCst); - - assert_eq!(requests.get(idx), Some(&url.to_owned()), "Expected fetch from specific URL."); - } - - pub fn assert_no_more_requests(&self) { - let requests = self.requested.lock(); - let len = self.asserted.load(atomic::Ordering::SeqCst); - assert_eq!(requests.len(), len, "Didn't expect any more requests, got: {:?}", &requests[len..]); - } -} - -impl Fetch for FakeFetch { - type Result = Box + Send>; - - fn fetch(&self, request: Request, abort: fetch::Abort) -> Self::Result { - let u = request.url().clone(); - self.requested.lock().push(u.as_str().into()); - let manual = self.manual.clone(); - let response = self.response.clone(); - - let (tx, rx) = futures::oneshot(); - thread::spawn(move || { - if let Some(rx) = manual.lock().take() { - // wait for manual resume - let _ = rx.recv(); - } - let data = response.lock().take().unwrap_or(b"Some content"); - tx.send(fetch::Response::new(u, hyper::Response::new().with_body(data), abort)).unwrap(); - }); - - Box::new(rx.map_err(|_| fetch::Error::Aborted)) - } - - fn get(&self, url: &str, abort: Abort) -> Self::Result { - let url: Url = match url.parse() { - Ok(u) => u, - Err(e) => return Box::new(future::err(e.into())) - }; - self.fetch(Request::get(url), abort) - } - - fn post(&self, url: &str, abort: Abort) -> Self::Result { - let url: Url = match url.parse() { - Ok(u) => u, - Err(e) => return Box::new(future::err(e.into())) - }; - self.fetch(Request::post(url), abort) - } -} diff --git a/dapps/src/tests/helpers/mod.rs b/dapps/src/tests/helpers/mod.rs deleted file mode 100644 index 58ec71d733..0000000000 --- a/dapps/src/tests/helpers/mod.rs +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright 2015-2018 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::{env, io, str}; -use std::net::SocketAddr; -use std::path::{Path, PathBuf}; -use std::sync::Arc; -use env_logger::LogBuilder; -use jsonrpc_core::IoHandler; -use jsonrpc_http_server::{self as http, Host, DomainsValidation}; -use parity_reactor::Remote; - -use devtools::http_client; -use registrar::{RegistrarClient, Asynchronous}; -use fetch::{Fetch, Client as FetchClient}; -use node_health::{NodeHealth, TimeChecker, CpuPool}; - -use {Middleware, SyncStatus, WebProxyTokens}; - -mod registrar; -mod fetch; - -use self::registrar::FakeRegistrar; -use self::fetch::FakeFetch; - -#[derive(Debug)] -struct FakeSync(bool); -impl SyncStatus for FakeSync { - fn is_major_importing(&self) -> bool { self.0 } - fn peers(&self) -> (usize, usize) { (0, 5) } -} - -fn init_logger() { - // Initialize logger - if let Ok(log) = env::var("RUST_LOG") { - let mut builder = LogBuilder::new(); - builder.parse(&log); - let _ = builder.init(); // ignore errors since ./test.sh will call this multiple times. - } -} - -pub fn init_server(process: F, io: IoHandler) -> (Server, Arc) where - F: FnOnce(ServerBuilder) -> ServerBuilder, - B: Fetch, -{ - init_logger(); - let registrar = Arc::new(FakeRegistrar::new()); - let mut dapps_path = env::temp_dir(); - dapps_path.push("non-existent-dir-to-prevent-fs-files-from-loading"); - - let builder = ServerBuilder::new(FetchClient::new().unwrap(), &dapps_path, registrar.clone()); - let server = process(builder).start_unsecured_http(&"127.0.0.1:0".parse().unwrap(), io).unwrap(); - ( - server, - registrar, - ) -} - -pub fn serve_with_rpc(io: IoHandler) -> Server { - init_server(|builder| builder, io).0 -} - -pub fn serve_hosts(hosts: Option>) -> Server { - let hosts = hosts.map(|hosts| hosts.into_iter().map(Into::into).collect()); - init_server(|mut builder| { - builder.allowed_hosts = hosts.into(); - builder - }, Default::default()).0 -} - -pub fn serve_with_registrar() -> (Server, Arc) { - init_server(|builder| builder, Default::default()) -} - -pub fn serve_with_registrar_and_sync() -> (Server, Arc) { - init_server(|mut builder| { - builder.sync_status = Arc::new(FakeSync(true)); - builder - }, Default::default()) -} - -pub fn serve_with_registrar_and_fetch() -> (Server, FakeFetch, Arc) { - let fetch = FakeFetch::default(); - let f = fetch.clone(); - let (server, reg) = init_server(move |builder| { - builder.fetch(f.clone()) - }, Default::default()); - - (server, fetch, reg) -} - -pub fn serve_with_fetch(web_token: &'static str, domain: &'static str) -> (Server, FakeFetch) { - let fetch = FakeFetch::default(); - let f = fetch.clone(); - let (server, _) = init_server(move |mut builder| { - builder.web_proxy_tokens = Arc::new(move |token| { - if &token == web_token { Some(domain.into()) } else { None } - }); - builder.fetch(f.clone()) - }, Default::default()); - - (server, fetch) -} - -pub fn serve() -> Server { - init_server(|builder| builder, Default::default()).0 -} - -pub fn request(server: Server, request: &str) -> http_client::Response { - http_client::request(server.addr(), request) -} - -pub fn assert_security_headers(headers: &[String]) { - http_client::assert_security_headers_present(headers, None) -} - -/// Webapps HTTP+RPC server build. -pub struct ServerBuilder { - dapps_path: PathBuf, - registrar: Arc>, - sync_status: Arc, - web_proxy_tokens: Arc, - allowed_hosts: DomainsValidation, - fetch: T, -} - -impl ServerBuilder { - /// Construct new dapps server - pub fn new>(fetch: FetchClient, dapps_path: P, registrar: Arc>) -> Self { - ServerBuilder { - dapps_path: dapps_path.as_ref().to_owned(), - registrar: registrar, - sync_status: Arc::new(FakeSync(false)), - web_proxy_tokens: Arc::new(|_| None), - allowed_hosts: DomainsValidation::Disabled, - fetch: fetch, - } - } -} - -impl ServerBuilder { - /// Set a fetch client to use. - pub fn fetch(self, fetch: X) -> ServerBuilder { - ServerBuilder { - dapps_path: self.dapps_path, - registrar: self.registrar, - sync_status: self.sync_status, - web_proxy_tokens: self.web_proxy_tokens, - allowed_hosts: self.allowed_hosts, - fetch: fetch, - } - } - - /// Asynchronously start server with no authentication, - /// returns result with `Server` handle on success or an error. - pub fn start_unsecured_http(self, addr: &SocketAddr, io: IoHandler) -> io::Result { - Server::start_http( - addr, - io, - self.allowed_hosts, - self.dapps_path, - vec![], - self.registrar, - self.sync_status, - self.web_proxy_tokens, - Remote::new_sync(), - self.fetch, - ) - } -} - -const DAPPS_DOMAIN: &'static str = "web3.site"; - -/// Webapps HTTP server. -pub struct Server { - server: Option, -} - -impl Server { - fn start_http( - addr: &SocketAddr, - io: IoHandler, - allowed_hosts: DomainsValidation, - dapps_path: PathBuf, - extra_dapps: Vec, - registrar: Arc>, - sync_status: Arc, - web_proxy_tokens: Arc, - remote: Remote, - fetch: F, - ) -> io::Result { - let health = NodeHealth::new( - sync_status.clone(), - TimeChecker::new::(&[], CpuPool::new(1)), - remote.clone(), - ); - let pool = ::futures_cpupool::CpuPool::new(1); - let middleware = - Middleware::dapps( - pool, - health, - dapps_path, - extra_dapps, - DAPPS_DOMAIN.into(), - registrar, - sync_status, - web_proxy_tokens, - fetch, - ); - - let mut allowed_hosts: Option> = allowed_hosts.into(); - allowed_hosts.as_mut().map(|hosts| { - hosts.push(format!("http://*.{}:*", DAPPS_DOMAIN).into()); - hosts.push(format!("http://*.{}", DAPPS_DOMAIN).into()); - }); - - http::ServerBuilder::new(io) - .request_middleware(middleware) - .allowed_hosts(allowed_hosts.into()) - .cors(http::DomainsValidation::Disabled) - .start_http(addr) - .map(|server| Server { - server: Some(server), - }) - } - - /// Returns address that this server is bound to. - pub fn addr(&self) -> &SocketAddr { - self.server.as_ref() - .expect("server is always Some at the start; it's consumed only when object is dropped; qed") - .address() - } -} - -impl Drop for Server { - fn drop(&mut self) { - self.server.take().unwrap().close() - } -} diff --git a/dapps/src/tests/helpers/registrar.rs b/dapps/src/tests/helpers/registrar.rs deleted file mode 100644 index b9acb1afc3..0000000000 --- a/dapps/src/tests/helpers/registrar.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2015-2018 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::str; -use std::sync::Arc; -use std::collections::HashMap; - -use ethereum_types::{H256, Address}; -use bytes::{Bytes, ToPretty}; -use registrar::{RegistrarClient, Asynchronous}; -use parking_lot::Mutex; -use rustc_hex::FromHex; - -const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2"; -const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000"; -const URLHINT_RESOLVE: &'static str = "267b6922"; -const DEFAULT_HASH: &'static str = "1472a9e190620cdf6b31f383373e45efcfe869a820c91f9ccd7eb9fb45e4985d"; - -pub struct FakeRegistrar { - pub calls: Arc>>, - pub responses: Mutex>>, -} - -impl FakeRegistrar { - pub fn new() -> Self { - FakeRegistrar { - calls: Arc::new(Mutex::new(Vec::new())), - responses: Mutex::new({ - let mut map = HashMap::new(); - map.insert( - (REGISTRAR.into(), "6795dbcd058740ee9a5a3fb9f1cfa10752baec87e09cc45cd7027fd54708271aca300c75000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000014100000000000000000000000000000000000000000000000000000000000000".into()), - Ok(format!("000000000000000000000000{}", URLHINT).from_hex().unwrap()), - ); - map.insert( - (URLHINT.into(), format!("{}{}", URLHINT_RESOLVE, DEFAULT_HASH)), - Ok(vec![]) - ); - map - }), - } - } - - pub fn set_result(&self, hash: H256, result: Result) { - self.responses.lock().insert( - (URLHINT.into(), format!("{}{:x}", URLHINT_RESOLVE, hash)), - result - ); - } -} - -impl RegistrarClient for FakeRegistrar { - type Call = Asynchronous; - - fn registrar_address(&self) -> Result { - Ok(REGISTRAR.parse().unwrap()) - } - - fn call_contract(&self, address: Address, data: Bytes) -> Self::Call { - let call = (address.to_hex(), data.to_hex()); - self.calls.lock().push(call.clone()); - let res = self.responses.lock().get(&call).cloned().expect(&format!("No response for call: {:?}", call)); - Box::new(::futures::future::done(res)) - } -} diff --git a/dapps/src/tests/mod.rs b/dapps/src/tests/mod.rs deleted file mode 100644 index c4d88cf9f1..0000000000 --- a/dapps/src/tests/mod.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Dapps server test suite - -mod helpers; - -mod api; -mod fetch; -mod rpc; -mod validation; diff --git a/dapps/src/tests/rpc.rs b/dapps/src/tests/rpc.rs deleted file mode 100644 index 326fcd72a6..0000000000 --- a/dapps/src/tests/rpc.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2015-2018 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 jsonrpc_core::{IoHandler, Value}; - -use tests::helpers::{serve_with_rpc, request}; - -#[test] -fn should_serve_rpc() { - // given - let mut io = IoHandler::default(); - io.add_method("rpc_test", |_| { - Ok(Value::String("Hello World!".into())) - }); - let server = serve_with_rpc(io); - - // when - let req = r#"{"jsonrpc":"2.0","id":1,"method":"rpc_test","params":[]}"#; - let response = request(server, &format!( - "\ - POST /rpc/ HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - Content-Type: application/json\r\n\ - Content-Length: {}\r\n\ - \r\n\ - {}\r\n\ - ", - req.as_bytes().len(), - req, - )); - - // then - response.assert_status("HTTP/1.1 200 OK"); - assert_eq!(response.body, "31\n{\"jsonrpc\":\"2.0\",\"result\":\"Hello World!\",\"id\":1}\n\n0\n\n".to_owned()); -} diff --git a/dapps/src/tests/validation.rs b/dapps/src/tests/validation.rs deleted file mode 100644 index f9d22f802d..0000000000 --- a/dapps/src/tests/validation.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2015-2018 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 tests::helpers::{serve_hosts, request}; - -#[test] -fn should_reject_invalid_host() { - // given - let server = serve_hosts(Some(vec!["localhost:8080".into()])); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: 127.0.0.1:8080\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 403 Forbidden"); - assert!(response.body.contains("Provided Host header is not whitelisted."), response.body); -} - -#[test] -fn should_serve_dapps_domains() { - // given - let server = serve_hosts(Some(vec!["localhost:8080".into()])); - - // when - let response = request(server, - "\ - GET / HTTP/1.1\r\n\ - Host: proxy.web3.site\r\n\ - Connection: close\r\n\ - \r\n\ - {} - " - ); - - // then - response.assert_status("HTTP/1.1 200 OK"); -} diff --git a/dapps/src/web.rs b/dapps/src/web.rs deleted file mode 100644 index fac0dca1af..0000000000 --- a/dapps/src/web.rs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Serving web-based content (proxying) - -use std::sync::Arc; - -use base32; -use fetch::{self, Fetch}; -use hyper::{mime, StatusCode}; - -use apps; -use endpoint::{Endpoint, EndpointPath, Request, Response}; -use futures::future; -use futures_cpupool::CpuPool; -use handlers::{ - ContentFetcherHandler, ContentHandler, ContentValidator, ValidatorResponse, - StreamingHandler, -}; -use WebProxyTokens; - -pub struct Web { - web_proxy_tokens: Arc, - fetch: F, - pool: CpuPool, -} - -impl Web { - pub fn boxed( - web_proxy_tokens: Arc, - fetch: F, - pool: CpuPool, - ) -> Box { - Box::new(Web { - web_proxy_tokens, - fetch, - pool, - }) - } - - fn extract_target_url(&self, path: &EndpointPath) -> Result { - let token_and_url = path.app_params.get(0) - .map(|encoded| encoded.replace('.', "")) - .and_then(|encoded| base32::decode(base32::Alphabet::Crockford, &encoded.to_uppercase())) - .and_then(|data| String::from_utf8(data).ok()) - .ok_or_else(|| ContentHandler::error( - StatusCode::BadRequest, - "Invalid parameter", - "Couldn't parse given parameter:", - path.app_params.get(0).map(String::as_str), - ))?; - - let mut token_it = token_and_url.split('+'); - let token = token_it.next(); - let target_url = token_it.next(); - - // Check if token supplied in URL is correct. - let domain = match token.and_then(|token| self.web_proxy_tokens.domain(token)) { - Some(domain) => domain, - _ => { - return Err(ContentHandler::error( - StatusCode::BadRequest, "Invalid Access Token", "Invalid or old web proxy access token supplied.", Some("Try refreshing the page."), - )); - } - }; - - // Validate protocol - let mut target_url = match target_url { - Some(url) if url.starts_with("http://") || url.starts_with("https://") => url.to_owned(), - _ => { - return Err(ContentHandler::error( - StatusCode::BadRequest, "Invalid Protocol", "Invalid protocol used.", None, - )); - } - }; - - if !target_url.starts_with(&*domain) { - return Err(ContentHandler::error( - StatusCode::BadRequest, "Invalid Domain", "Dapp attempted to access invalid domain.", Some(&target_url), - )); - } - - if !target_url.ends_with("/") { - target_url = format!("{}/", target_url); - } - - // Skip the token - let query = path.query.as_ref().map_or_else(String::new, |query| format!("?{}", query)); - let path = path.app_params[1..].join("/"); - - Ok(format!("{}{}{}", target_url, path, query)) - } -} - -impl Endpoint for Web { - fn respond(&self, path: EndpointPath, req: Request) -> Response { - // First extract the URL (reject invalid URLs) - let target_url = match self.extract_target_url(&path) { - Ok(url) => url, - Err(response) => { - return Box::new(future::ok(response.into())); - } - }; - - let token = path.app_params.get(0) - .expect("`target_url` is valid; app_params is not empty;qed") - .to_owned(); - - Box::new(ContentFetcherHandler::new( - req.method(), - &target_url, - path, - WebInstaller { - token, - }, - self.fetch.clone(), - self.pool.clone(), - )) - } -} - -struct WebInstaller { - token: String, -} - -impl ContentValidator for WebInstaller { - type Error = String; - - fn validate_and_install(self, response: fetch::Response) -> Result { - let status = response.status(); - let is_html = response.is_html(); - let mime = response.content_type().unwrap_or(mime::TEXT_HTML); - let mut handler = StreamingHandler::new( - fetch::BodyReader::new(response), - status, - mime, - ); - if is_html { - handler.set_initial_content(&format!( - r#""#, - apps::URL_REFERER, - apps::WEB_PATH, - &self.token, - )); - } - Ok(ValidatorResponse::Streaming(handler)) - } -} diff --git a/dapps/node-health/Cargo.toml b/node-health/Cargo.toml similarity index 86% rename from dapps/node-health/Cargo.toml rename to node-health/Cargo.toml index 0ac3f62ae4..22432a5f39 100644 --- a/dapps/node-health/Cargo.toml +++ b/node-health/Cargo.toml @@ -15,4 +15,4 @@ serde = "1.0" serde_derive = "1.0" time = "0.1.35" -parity-reactor = { path = "../../util/reactor" } +parity-reactor = { path = "../util/reactor" } diff --git a/dapps/node-health/src/health.rs b/node-health/src/health.rs similarity index 100% rename from dapps/node-health/src/health.rs rename to node-health/src/health.rs diff --git a/dapps/node-health/src/lib.rs b/node-health/src/lib.rs similarity index 100% rename from dapps/node-health/src/lib.rs rename to node-health/src/lib.rs diff --git a/dapps/node-health/src/time.rs b/node-health/src/time.rs similarity index 100% rename from dapps/node-health/src/time.rs rename to node-health/src/time.rs diff --git a/dapps/node-health/src/types.rs b/node-health/src/types.rs similarity index 100% rename from dapps/node-health/src/types.rs rename to node-health/src/types.rs diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 1ea64b67bb..21af2968ef 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -184,7 +184,7 @@ fn execute_import_light(cmd: ImportBlockchain) -> Result<(), String> { execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, &cmd.compaction)?; // create dirs used by parity - cmd.dirs.create_dirs(false, false, false)?; + cmd.dirs.create_dirs(false, false)?; let cache = Arc::new(Mutex::new( LightDataCache::new(Default::default(), Duration::new(0, 0)) @@ -337,7 +337,7 @@ fn execute_import(cmd: ImportBlockchain) -> Result<(), String> { execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, &cmd.compaction)?; // create dirs used by parity - cmd.dirs.create_dirs(false, false, false)?; + cmd.dirs.create_dirs(false, false)?; // prepare client config let mut client_config = to_client_config( @@ -528,7 +528,7 @@ fn start_client( execute_upgrades(&dirs.base, &db_dirs, algorithm, &compaction)?; // create dirs used by parity - dirs.create_dirs(false, false, false)?; + dirs.create_dirs(false, false)?; // prepare client config let client_config = to_client_config( diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 29a265757c..460a78d9b1 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -26,15 +26,6 @@ usage! { // Arguments must start with arg_ // Flags must start with flag_ - CMD cmd_dapp - { - "Manage dapps", - - ARG arg_dapp_path: (Option) = None, - "", - "Path to the dapps", - } - CMD cmd_daemon { "Use Parity as a daemon", @@ -232,6 +223,17 @@ usage! { { "Print the hashed light clients headers of the given --chain (default: mainnet) in a JSON format. To be used as hardcoded headers in a genesis file.", } + + // CMD removed in 2.0 + + CMD cmd_dapp + { + "Manage dapps", + + ARG arg_dapp_path: (Option) = None, + "", + "Path to the dapps", + } } { // Global flags and arguments @@ -539,15 +541,6 @@ usage! { "--ipc-apis=[APIS]", "Specify custom API set available via JSON-RPC over IPC using a comma-delimited list of API names. Possible names are: all, safe, web3, net, eth, pubsub, personal, signer, parity, parity_pubsub, parity_accounts, parity_set, traces, rpc, secretstore, shh, shh_pubsub. You can also disable a specific API by putting '-' in the front, example: all,-personal. 'safe' enables the following APIs: web3, net, eth, pubsub, parity, parity_pubsub, traces, rpc, shh, shh_pubsub", - ["API and Console Options – Dapps"] - FLAG flag_no_dapps: (bool) = false, or |c: &Config| c.dapps.as_ref()?.disable.clone(), - "--no-dapps", - "Disable the Dapps server (e.g. status page).", - - ARG arg_dapps_path: (String) = "$BASE/dapps", or |c: &Config| c.dapps.as_ref()?.path.clone(), - "--dapps-path=[PATH]", - "Specify directory where dapps should be installed.", - ["API and Console Options – IPFS"] FLAG flag_ipfs_api: (bool) = false, or |c: &Config| c.ipfs.as_ref()?.enable.clone(), "--ipfs-api", @@ -969,6 +962,10 @@ usage! { "--fast-and-loose", "Does nothing; DB WAL is always activated.", + FLAG flag_no_dapps: (bool) = false, or |c: &Config| c.dapps.as_ref()?._legacy_disable.clone(), + "--no-dapps", + "Disable the Dapps server (e.g. status page).", + // ARG Removed in 1.6 or before. ARG arg_etherbase: (Option) = None, or |_| None, @@ -1029,27 +1026,27 @@ usage! { // ARG Removed in 1.7. - ARG arg_dapps_port: (Option) = None, or |c: &Config| c.dapps.as_ref()?.port.clone(), + ARG arg_dapps_port: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_port.clone(), "--dapps-port=[PORT]", "Does nothing; dapps server has been removed.", - ARG arg_dapps_interface: (Option) = None, or |c: &Config| c.dapps.as_ref()?.interface.clone(), + ARG arg_dapps_interface: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_interface.clone(), "--dapps-interface=[IP]", "Does nothing; dapps server has been removed.", - ARG arg_dapps_hosts: (Option) = None, or |c: &Config| c.dapps.as_ref()?.hosts.as_ref().map(|vec| vec.join(",")), + ARG arg_dapps_hosts: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_hosts.as_ref().map(|vec| vec.join(",")), "--dapps-hosts=[HOSTS]", "Does nothing; dapps server has been removed.", - ARG arg_dapps_cors: (Option) = None, or |c: &Config| c.dapps.as_ref()?.cors.clone(), + ARG arg_dapps_cors: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_cors.clone(), "--dapps-cors=[URL]", "Does nothing; dapps server has been removed.", - ARG arg_dapps_user: (Option) = None, or |c: &Config| c.dapps.as_ref()?.user.clone(), + ARG arg_dapps_user: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_user.clone(), "--dapps-user=[USERNAME]", "Dapps server authentication has been removed.", - ARG arg_dapps_pass: (Option) = None, or |c: &Config| c.dapps.as_ref()?.pass.clone(), + ARG arg_dapps_pass: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_pass.clone(), "--dapps-pass=[PASSWORD]", "Dapps server authentication has been removed.", @@ -1074,6 +1071,12 @@ usage! { ARG arg_tx_queue_ban_time: (Option) = None, or |c: &Config| c.mining.as_ref()?.tx_queue_ban_time.clone(), "--tx-queue-ban-time=[SEC]", "Not supported.", + + // ARG removed in 2.0. + + ARG arg_dapps_path: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_path.clone(), + "--dapps-path=[PATH]", + "Specify directory where dapps should be installed.", } } @@ -1223,14 +1226,22 @@ struct Ipc { #[derive(Default, Debug, PartialEq, Deserialize)] #[serde(deny_unknown_fields)] struct Dapps { - disable: Option, - port: Option, - interface: Option, - hosts: Option>, - cors: Option, - path: Option, - user: Option, - pass: Option, + #[serde(rename="disable")] + _legacy_disable: Option, + #[serde(rename="port")] + _legacy_port: Option, + #[serde(rename="interface")] + _legacy_interface: Option, + #[serde(rename="hosts")] + _legacy_hosts: Option>, + #[serde(rename="cors")] + _legacy_cors: Option, + #[serde(rename="path")] + _legacy_path: Option, + #[serde(rename="user")] + _legacy_user: Option, + #[serde(rename="pass")] + _legacy_pass: Option, } #[derive(Default, Debug, PartialEq, Deserialize)] @@ -1663,7 +1674,7 @@ mod tests { arg_ipc_apis: "web3,eth,net,parity,parity_accounts,personal,traces,rpc,secretstore".into(), // DAPPS - arg_dapps_path: "$HOME/.parity/dapps".into(), + arg_dapps_path: Some("$HOME/.parity/dapps".into()), flag_no_dapps: false, // SECRETSTORE @@ -1922,14 +1933,14 @@ mod tests { apis: Some(vec!["rpc".into(), "eth".into()]), }), dapps: Some(Dapps { - disable: None, - port: Some(8080), - path: None, - interface: None, - hosts: None, - cors: None, - user: Some("username".into()), - pass: Some("password".into()) + _legacy_disable: None, + _legacy_port: Some(8080), + _legacy_path: None, + _legacy_interface: None, + _legacy_hosts: None, + _legacy_cors: None, + _legacy_user: Some("username".into()), + _legacy_pass: Some("password".into()) }), secretstore: Some(SecretStore { disable: None, diff --git a/parity/configuration.rs b/parity/configuration.rs index e3fdcce940..6f6951e2fc 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -17,7 +17,7 @@ use std::time::Duration; use std::io::Read; use std::net::SocketAddr; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::collections::BTreeMap; use std::cmp; use cli::{Args, ArgsError}; @@ -41,7 +41,6 @@ use dir::helpers::{replace_home, replace_home_and_local}; use params::{ResealPolicy, AccountsConfig, GasPricerConfig, MinerExtras, SpecType}; use ethcore_logger::Config as LogConfig; use dir::{self, Directories, default_hypervisor_path, default_local_path, default_data_path}; -use dapps::Configuration as DappsConfiguration; use ipfs::Configuration as IpfsConfiguration; use ethcore_private_tx::{ProviderConfig, EncryptorConfig}; use secretstore::{NodeSecretKey, Configuration as SecretStoreConfiguration, ContractAddress as SecretStoreContractAddress}; @@ -136,7 +135,6 @@ impl Configuration { let compaction = self.args.arg_db_compaction.parse()?; let warp_sync = !self.args.flag_no_warp; let geth_compatibility = self.args.flag_geth; - let dapps_conf = self.dapps_config(); let ipfs_conf = self.ipfs_config(); let secretstore_conf = self.secretstore_config()?; let format = self.format()?; @@ -370,13 +368,11 @@ impl Configuration { warp_barrier: self.args.arg_warp_barrier, geth_compatibility: geth_compatibility, net_settings: self.network_settings()?, - dapps_conf: dapps_conf, ipfs_conf: ipfs_conf, secretstore_conf: secretstore_conf, private_provider_conf: private_provider_conf, private_encryptor_conf: private_enc_conf, private_tx_enabled, - dapp: self.dapp_to_open()?, name: self.args.arg_identity, custom_bootnodes: self.args.arg_bootnodes.is_some(), no_periodic_snapshot: self.args.flag_no_periodic_snapshot, @@ -582,18 +578,6 @@ impl Configuration { self.args.arg_ntp_servers.split(",").map(str::to_owned).collect() } - fn dapps_config(&self) -> DappsConfiguration { - DappsConfiguration { - enabled: self.dapps_enabled(), - dapps_path: PathBuf::from(self.directories().dapps), - extra_dapps: if self.args.cmd_dapp { - self.args.arg_dapp_path.iter().map(|path| PathBuf::from(path)).collect() - } else { - vec![] - }, - } - } - fn secretstore_config(&self) -> Result { Ok(SecretStoreConfiguration { enabled: self.secretstore_enabled(), @@ -627,19 +611,6 @@ impl Configuration { } } - fn dapp_to_open(&self) -> Result, String> { - if !self.args.cmd_dapp { - return Ok(None); - } - let path = self.args.arg_dapp_path.as_ref().map(String::as_str).unwrap_or("."); - let path = Path::new(path).canonicalize() - .map_err(|e| format!("Invalid path: {}. Error: {:?}", path, e))?; - let name = path.file_name() - .and_then(|name| name.to_str()) - .ok_or_else(|| "Root path is not supported.".to_owned())?; - Ok(Some(name.into())) - } - fn gas_pricer_config(&self) -> Result { fn wei_per_gas(usd_per_tx: f32, usd_per_eth: f32) -> U256 { let wei_per_usd: f32 = 1.0e18 / usd_per_eth; @@ -881,8 +852,6 @@ impl Configuration { } fn ws_config(&self) -> Result { - let http = self.http_config()?; - let support_token_api = // enabled when not unlocking self.args.arg_unlock.is_none(); @@ -896,7 +865,6 @@ impl Configuration { origins: self.ws_origins(), signer_path: self.directories().signer.into(), support_token_api, - dapps_address: http.address(), max_connections: self.args.arg_ws_max_connections, }; @@ -980,7 +948,6 @@ impl Configuration { let db_path = replace_home_and_local(&data_path, &local_path, &base_db_path); let cache_path = replace_home_and_local(&data_path, &local_path, cache_path); let keys_path = replace_home(&data_path, &self.args.arg_keys_path); - let dapps_path = replace_home(&data_path, &self.args.arg_dapps_path); let secretstore_path = replace_home(&data_path, &self.args.arg_secretstore_path); let ui_path = replace_home(&data_path, &self.args.arg_ui_path); @@ -989,7 +956,6 @@ impl Configuration { base: data_path, cache: cache_path, db: db_path, - dapps: dapps_path, signer: ui_path, secretstore: secretstore_path, } @@ -1094,10 +1060,6 @@ impl Configuration { !self.args.flag_no_ws } - fn dapps_enabled(&self) -> bool { - !self.args.flag_dapps_off && !self.args.flag_no_dapps && self.rpc_enabled() && cfg!(feature = "dapps") - } - fn secretstore_enabled(&self) -> bool { !self.args.flag_no_secretstore && cfg!(feature = "secretstore") } @@ -1364,7 +1326,6 @@ mod tests { origins: Some(vec!["parity://*".into(),"chrome-extension://*".into(), "moz-extension://*".into()]), hosts: Some(vec![]), signer_path: expected.into(), - dapps_address: Some("127.0.0.1:8545".into()), support_token_api: true, max_connections: 100, }, LogConfig { @@ -1433,13 +1394,11 @@ mod tests { vm_type: Default::default(), geth_compatibility: false, net_settings: Default::default(), - dapps_conf: Default::default(), ipfs_conf: Default::default(), secretstore_conf: Default::default(), private_provider_conf: Default::default(), private_encryptor_conf: Default::default(), private_tx_enabled: false, - dapp: None, name: "".into(), custom_bootnodes: false, fat_db: Default::default(), @@ -1649,20 +1608,6 @@ mod tests { assert_eq!(conf4.directories().signer, "signer".to_owned()); } - #[test] - fn should_parse_dapp_opening() { - // given - let tempdir = TempDir::new("").unwrap(); - - // when - let conf0 = parse(&["parity", "dapp", tempdir.path().to_str().unwrap()]); - - // then - assert_eq!(conf0.dapp_to_open(), Ok(Some(tempdir.path().file_name().unwrap().to_str().unwrap().into()))); - let extra_dapps = conf0.dapps_config().extra_dapps; - assert_eq!(extra_dapps, vec![tempdir.path().to_owned()]); - } - #[test] fn should_not_bail_on_empty_line_in_reserved_peers() { let tempdir = TempDir::new("").unwrap(); @@ -1708,7 +1653,6 @@ mod tests { assert_eq!(c.net_conf.min_peers, 50); assert_eq!(c.net_conf.max_peers, 100); assert_eq!(c.ipc_conf.enabled, false); - assert_eq!(c.dapps_conf.enabled, false); assert_eq!(c.miner_options.force_sealing, true); assert_eq!(c.miner_options.reseal_on_external_tx, true); assert_eq!(c.miner_options.reseal_on_own_tx, true); diff --git a/parity/dapps.rs b/parity/dapps.rs deleted file mode 100644 index ce5b3a8daa..0000000000 --- a/parity/dapps.rs +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright 2015-2018 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::path::PathBuf; -use std::sync::Arc; - -use bytes::Bytes; -use dir::default_data_path; -use dir::helpers::replace_home; -use ethcore::client::{Client, BlockChainClient, BlockId, CallContract}; -use sync::LightSync; -use futures::{Future, future, IntoFuture}; -use futures_cpupool::CpuPool; -use hash_fetch::fetch::Client as FetchClient; -use registrar::{RegistrarClient, Asynchronous}; -use light::client::LightChainClient; -use light::on_demand::{self, OnDemand}; -use node_health::{SyncStatus, NodeHealth}; -use rpc; -use rpc_apis::SignerService; -use transaction::{Transaction, Action}; -use ethereum_types::Address; - -#[derive(Debug, PartialEq, Clone)] -pub struct Configuration { - pub enabled: bool, - pub dapps_path: PathBuf, - pub extra_dapps: Vec, -} - -impl Default for Configuration { - fn default() -> Self { - let data_dir = default_data_path(); - Configuration { - enabled: true, - dapps_path: replace_home(&data_dir, "$BASE/dapps").into(), - extra_dapps: vec![], - } - } -} - -impl Configuration { - pub fn address(&self, address: Option<::parity_rpc::Host>) -> Option<::parity_rpc::Host> { - match self.enabled { - true => address, - false => None, - } - } -} - -/// Registrar implementation of the full client. -pub struct FullRegistrar { - /// Handle to the full client. - pub client: Arc, -} - -impl FullRegistrar { - pub fn new(client: Arc) -> Self { - FullRegistrar { - client, - } - } -} - -impl RegistrarClient for FullRegistrar { - type Call = Asynchronous; - - fn registrar_address(&self) -> Result { - self.client.registrar_address() - .ok_or_else(|| "Registrar not defined.".into()) - } - - fn call_contract(&self, address: Address, data: Bytes) -> Self::Call { - Box::new(self.client.call_contract(BlockId::Latest, address, data).into_future()) - } -} - -/// Registrar implementation for the light client. -pub struct LightRegistrar { - /// The light client. - pub client: Arc, - /// Handle to the on-demand service. - pub on_demand: Arc, - /// Handle to the light network service. - pub sync: Arc, -} - -impl RegistrarClient for LightRegistrar { - type Call = Box + Send>; - - fn registrar_address(&self) -> Result { - self.client.engine().additional_params().get("registrar") - .ok_or_else(|| "Registrar not defined.".into()) - .and_then(|registrar| { - registrar.parse().map_err(|e| format!("Invalid registrar address: {:?}", e)) - }) - } - - fn call_contract(&self, address: Address, data: Bytes) -> Self::Call { - let header = self.client.best_block_header(); - let env_info = self.client.env_info(BlockId::Hash(header.hash())) - .ok_or_else(|| format!("Cannot fetch env info for header {}", header.hash())); - - let env_info = match env_info { - Ok(e) => e, - Err(e) => return Box::new(future::err(e)), - }; - - let maybe_future = self.sync.with_context(move |ctx| { - self.on_demand - .request(ctx, on_demand::request::TransactionProof { - tx: Transaction { - nonce: self.client.engine().account_start_nonce(header.number()), - action: Action::Call(address), - gas: 50_000.into(), // should be enough for all registry lookups. TODO: exponential backoff - gas_price: 0.into(), - value: 0.into(), - data: data, - }.fake_sign(Address::default()), - header: header.into(), - env_info: env_info, - engine: self.client.engine().clone(), - }) - .expect("No back-references; therefore all back-refs valid; qed") - .then(|res| match res { - Ok(Ok(executed)) => Ok(executed.output), - Ok(Err(e)) => Err(format!("Failed to execute transaction: {}", e)), - Err(_) => Err(format!("On-demand service dropped request unexpectedly.")), - }) - }); - - match maybe_future { - Some(fut) => Box::new(fut), - None => Box::new(future::err("cannot query registry: network disabled".into())), - } - } -} - -// TODO: light client implementation forwarding to OnDemand and waiting for future -// to resolve. -#[derive(Clone)] -pub struct Dependencies { - pub node_health: NodeHealth, - pub sync_status: Arc, - pub contract_client: Arc>, - pub fetch: FetchClient, - pub pool: CpuPool, - pub signer: Arc, -} - -pub fn new(configuration: Configuration, deps: Dependencies) -> Result, String> { - if !configuration.enabled { - return Ok(None); - } - - server::dapps_middleware( - deps, - configuration.dapps_path, - configuration.extra_dapps, - rpc::DAPPS_DOMAIN, - ).map(Some) -} - -pub use self::server::{Middleware, service}; - -#[cfg(not(feature = "dapps"))] -mod server { - use super::Dependencies; - use std::sync::Arc; - use std::path::PathBuf; - use parity_rpc::{hyper, RequestMiddleware, RequestMiddlewareAction}; - use rpc_apis; - - pub struct Middleware; - impl RequestMiddleware for Middleware { - fn on_request(&self, _req: hyper::Request) -> RequestMiddlewareAction { - unreachable!() - } - } - - pub fn dapps_middleware( - _deps: Dependencies, - _dapps_path: PathBuf, - _extra_dapps: Vec, - _dapps_domain: &str, - ) -> Result { - Err("Your Parity version has been compiled without WebApps support.".into()) - } - - pub fn service(_: &Option) -> Option> { - None - } -} - -#[cfg(feature = "dapps")] -mod server { - use super::Dependencies; - use std::path::PathBuf; - use std::sync::Arc; - use rpc_apis; - - use parity_dapps; - - pub use parity_dapps::Middleware; - - pub fn dapps_middleware( - deps: Dependencies, - dapps_path: PathBuf, - extra_dapps: Vec, - dapps_domain: &str, - ) -> Result { - let signer = deps.signer; - let web_proxy_tokens = Arc::new(move |token| signer.web_proxy_access_token_domain(&token)); - - Ok(parity_dapps::Middleware::dapps( - deps.pool, - deps.node_health, - dapps_path, - extra_dapps, - dapps_domain, - deps.contract_client, - deps.sync_status, - web_proxy_tokens, - deps.fetch, - )) - } - - pub fn service(middleware: &Option) -> Option> { - middleware.as_ref().map(|m| Arc::new(DappsServiceWrapper { - endpoints: m.endpoints().clone(), - }) as Arc) - } - - pub struct DappsServiceWrapper { - endpoints: parity_dapps::Endpoints, - } - - impl rpc_apis::DappsService for DappsServiceWrapper { - fn list_dapps(&self) -> Vec { - self.endpoints.list() - .into_iter() - .map(|app| rpc_apis::LocalDapp { - id: app.id.unwrap_or_else(|| "unknown".into()), - name: app.name, - description: app.description, - version: app.version, - author: app.author, - icon_url: app.icon_url, - local_url: app.local_url, - }) - .collect() - } - - fn refresh_local_dapps(&self) -> bool { - self.endpoints.refresh_local_dapps(); - true - } - } -} diff --git a/parity/deprecated.rs b/parity/deprecated.rs index 0753876a7e..514e7d5d92 100644 --- a/parity/deprecated.rs +++ b/parity/deprecated.rs @@ -209,6 +209,22 @@ pub fn find_deprecated(args: &Args) -> Vec { result.push(Deprecated::Removed("--fast-and-loose")); } + if args.cmd_dapp { + result.push(Deprecated::Removed("parity dapp")); + } + + if args.arg_dapp_path.is_some() { + result.push(Deprecated::Removed("--dapp-path")); + } + + if args.flag_no_dapps { + result.push(Deprecated::Removed("--no-dapps")); + } + + if args.arg_dapps_path.is_some() { + result.push(Deprecated::Removed("--dapps-path")); + } + result } diff --git a/parity/export_hardcoded_sync.rs b/parity/export_hardcoded_sync.rs index 15fe199f42..b3121f0861 100644 --- a/parity/export_hardcoded_sync.rs +++ b/parity/export_hardcoded_sync.rs @@ -68,7 +68,7 @@ pub fn execute(cmd: ExportHsyncCmd) -> Result { execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, &cmd.compaction)?; // create dirs used by parity - cmd.dirs.create_dirs(false, false, false)?; + cmd.dirs.create_dirs(false, false)?; // TODO: configurable cache size. let cache = LightDataCache::new(Default::default(), Duration::from_secs(60 * GAS_CORPUS_EXPIRATION_MINUTES)); diff --git a/parity/lib.rs b/parity/lib.rs index ea77457dc1..b1b385a1a3 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -87,8 +87,6 @@ extern crate parity_dapps; #[macro_use] extern crate pretty_assertions; -#[cfg(windows)] extern crate winapi; - #[cfg(test)] extern crate tempdir; @@ -97,7 +95,6 @@ mod blockchain; mod cache; mod cli; mod configuration; -mod dapps; mod export_hardcoded_sync; mod ipfs; mod deprecated; @@ -114,7 +111,6 @@ mod secretstore; mod signer; mod snapshot; mod upgrade; -mod url; mod user_defaults; mod whisper; mod db; @@ -201,10 +197,6 @@ fn execute(command: Execute, on_client_rq: Cr, on_updater_rq: Rr) -> Res match command.cmd { Cmd::Run(run_cmd) => { - if let Some(ref dapp) = run_cmd.dapp { - open_dapp(&run_cmd.dapps_conf, &run_cmd.http_conf, dapp)?; - } - let outcome = run::execute(run_cmd, logger, on_client_rq, on_updater_rq)?; Ok(ExecutionAction::Running(outcome)) }, @@ -244,13 +236,3 @@ pub fn start(conf: Configuration, on_client_rq: Cr, on_updater_rq: Rr) - execute(conf.into_command()?, on_client_rq, on_updater_rq) } - -fn open_dapp(dapps_conf: &dapps::Configuration, rpc_conf: &rpc::HttpConfiguration, dapp: &str) -> Result<(), String> { - if !dapps_conf.enabled { - return Err("Cannot use DAPP command with Dapps turned off.".into()) - } - - let url = format!("http://{}:{}/{}/", rpc_conf.interface, rpc_conf.port, dapp); - url::open(&url).map_err(|e| format!("{}", e))?; - Ok(()) -} diff --git a/parity/rpc.rs b/parity/rpc.rs index b5733f0ce0..eb769eda08 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -19,7 +19,6 @@ use std::sync::Arc; use std::path::PathBuf; use std::collections::HashSet; -use dapps; use dir::default_data_path; use dir::helpers::replace_home; use helpers::parity_ipc_path; @@ -48,12 +47,6 @@ pub struct HttpConfiguration { pub max_payload: usize, } -impl HttpConfiguration { - pub fn address(&self) -> Option { - address(self.enabled, &self.interface, self.port, &self.hosts) - } -} - impl Default for HttpConfiguration { fn default() -> Self { HttpConfiguration { @@ -103,7 +96,6 @@ pub struct WsConfiguration { pub hosts: Option>, pub signer_path: PathBuf, pub support_token_api: bool, - pub dapps_address: Option, } impl Default for WsConfiguration { @@ -119,7 +111,6 @@ impl Default for WsConfiguration { hosts: Some(Vec::new()), signer_path: replace_home(&data_dir, "$BASE/signer").into(), support_token_api: true, - dapps_address: Some("127.0.0.1:8545".into()), } } } @@ -173,7 +164,7 @@ pub fn new_ws( }; let remote = deps.remote.clone(); - let allowed_origins = into_domains(with_domain(conf.origins, domain, &conf.dapps_address)); + let allowed_origins = into_domains(with_domain(conf.origins, domain, &None)); let allowed_hosts = into_domains(with_domain(conf.hosts, domain, &Some(url.clone().into()))); let signer_path; @@ -210,7 +201,6 @@ pub fn new_http( options: &str, conf: HttpConfiguration, deps: &Dependencies, - middleware: Option, ) -> Result, String> { if !conf.enabled { return Ok(None); @@ -232,7 +222,6 @@ pub fn new_http( handler, remote, rpc::RpcExtractor, - middleware, conf.server_threads, conf.max_payload, ); diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index d76438b159..ade6c69694 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -20,7 +20,7 @@ use std::str::FromStr; use std::sync::{Arc, Weak}; pub use parity_rpc::signer::SignerService; -pub use parity_rpc::dapps::{DappsService, LocalDapp}; +pub use parity_rpc::dapps::LocalDapp; use ethcore_service::PrivateTxService; use ethcore::account_provider::AccountProvider; @@ -227,8 +227,6 @@ pub struct FullDependencies { pub updater: Arc, pub health: NodeHealth, pub geth_compatibility: bool, - pub dapps_service: Option>, - pub dapps_address: Option, pub ws_address: Option, pub fetch: FetchClient, pub pool: CpuPool, @@ -337,7 +335,6 @@ impl FullDependencies { self.logger.clone(), self.settings.clone(), signer, - self.dapps_address.clone(), self.ws_address.clone(), ).to_delegate()); @@ -362,7 +359,6 @@ impl FullDependencies { &self.miner, &self.updater, &self.net_service, - self.dapps_service.clone(), self.fetch.clone(), self.pool.clone(), ).to_delegate()) @@ -439,8 +435,6 @@ pub struct LightDependencies { pub on_demand: Arc<::light::on_demand::OnDemand>, pub cache: Arc>, pub transaction_queue: Arc>, - pub dapps_service: Option>, - pub dapps_address: Option, pub ws_address: Option, pub fetch: FetchClient, pub pool: CpuPool, @@ -553,7 +547,6 @@ impl LightDependencies { self.settings.clone(), self.health.clone(), signer, - self.dapps_address.clone(), self.ws_address.clone(), self.gas_price_percentile, ).to_delegate()); @@ -576,7 +569,6 @@ impl LightDependencies { Api::ParitySet => { handler.extend_with(light::ParitySetClient::new( self.sync.clone(), - self.dapps_service.clone(), self.fetch.clone(), self.pool.clone(), ).to_delegate()) diff --git a/parity/run.rs b/parity/run.rs index 9bde9ad40a..176121d750 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -21,8 +21,9 @@ use std::time::{Duration, Instant}; use std::thread; use ansi_term::Colour; +use bytes::Bytes; use ethcore::account_provider::{AccountProvider, AccountProviderSettings}; -use ethcore::client::{Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; +use ethcore::client::{BlockId, CallContract, Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; use ethcore::ethstore::ethkey; use ethcore::miner::{stratum, Miner, MinerService, MinerOptions}; use ethcore::snapshot; @@ -30,9 +31,11 @@ use ethcore::spec::{SpecParams, OptimizeFor}; use ethcore::verification::queue::VerifierSettings; use ethcore_logger::{Config as LogConfig, RotatingLogger}; use ethcore_service::ClientService; +use ethereum_types::Address; use sync::{self, SyncConfig}; #[cfg(feature = "work-notify")] use miner::work_notify::WorkPoster; +use futures::IntoFuture; use futures_cpupool::CpuPool; use hash_fetch::{self, fetch}; use informant::{Informant, LightNodeInformantData, FullNodeInformantData}; @@ -55,10 +58,10 @@ use upgrade::upgrade_key_location; use dir::{Directories, DatabaseDirectories}; use cache::CacheConfig; use user_defaults::UserDefaults; -use dapps; use ipfs; use jsonrpc_core; use modules; +use registrar::{RegistrarClient, Asynchronous}; use rpc; use rpc_apis; use secretstore; @@ -112,13 +115,11 @@ pub struct RunCmd { pub vm_type: VMType, pub geth_compatibility: bool, pub net_settings: NetworkSettings, - pub dapps_conf: dapps::Configuration, pub ipfs_conf: ipfs::Configuration, pub secretstore_conf: secretstore::Configuration, pub private_provider_conf: ProviderConfig, pub private_encryptor_conf: EncryptorConfig, pub private_tx_enabled: bool, - pub dapp: Option, pub name: String, pub custom_bootnodes: bool, pub stratum: Option, @@ -185,10 +186,10 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc) -> Result) -> Result); impl fmt::Debug for LightSyncStatus { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { @@ -309,26 +304,14 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc) -> Result) -> Result) -> Result(cmd: RunCmd, logger: Arc, on_client_rq: execute_upgrades(&cmd.dirs.base, &db_dirs, algorithm, &cmd.compaction)?; // create dirs used by parity - cmd.dirs.create_dirs(cmd.dapps_conf.enabled, cmd.acc_conf.unlocked_accounts.len() == 0, cmd.secretstore_conf.enabled)?; + cmd.dirs.create_dirs(cmd.acc_conf.unlocked_accounts.len() == 0, cmd.secretstore_conf.enabled)?; // run in daemon mode if let Some(pid_file) = cmd.daemon { @@ -448,7 +429,7 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: } //print out running parity environment - print_running_environment(&spec.name, &cmd.dirs, &db_dirs, &cmd.dapps_conf); + print_running_environment(&spec.name, &cmd.dirs, &db_dirs); // display info about used pruning algorithm info!("State DB configuration: {}{}{}", @@ -709,7 +690,21 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: chain_notify.start(); } - let contract_client = Arc::new(::dapps::FullRegistrar::new(client.clone())); + let contract_client = { + struct FullRegistrar { client: Arc } + impl RegistrarClient for FullRegistrar { + type Call = Asynchronous; + fn registrar_address(&self) -> Result { + self.client.registrar_address() + .ok_or_else(|| "Registrar not defined.".into()) + } + fn call_contract(&self, address: Address, data: Bytes) -> Self::Call { + Box::new(self.client.call_contract(BlockId::Latest, address, data).into_future()) + } + } + + Arc::new(FullRegistrar { client: client.clone() }) + }; // the updater service let updater_fetch = fetch.clone(); @@ -727,7 +722,7 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: let signer_service = Arc::new(signer::new_service(&cmd.ws_conf, &cmd.logger_config)); // the dapps server - let (node_health, dapps_deps) = { + let node_health = { let (sync, client) = (sync_provider.clone(), client.clone()); struct SyncStatus(Arc, Arc, sync::NetworkConfiguration); @@ -747,23 +742,13 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: } let sync_status = Arc::new(SyncStatus(sync, client, net_conf)); - let node_health = node_health::NodeHealth::new( + node_health::NodeHealth::new( sync_status.clone(), node_health::TimeChecker::new(&cmd.ntp_servers, cpu_pool.clone()), event_loop.remote(), - ); - (node_health.clone(), dapps::Dependencies { - sync_status, - node_health, - contract_client, - fetch: fetch.clone(), - pool: cpu_pool.clone(), - signer: signer_service.clone(), - }) + ) }; - let dapps_middleware = dapps::new(cmd.dapps_conf.clone(), dapps_deps.clone())?; - let dapps_service = dapps::service(&dapps_middleware); let deps_for_rpc_apis = Arc::new(rpc_apis::FullDependencies { signer_service: signer_service, snapshot: snapshot_service.clone(), @@ -779,8 +764,6 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: net_service: manage_network.clone(), updater: updater.clone(), geth_compatibility: cmd.geth_compatibility, - dapps_service: dapps_service, - dapps_address: cmd.dapps_conf.address(cmd.http_conf.address()), ws_address: cmd.ws_conf.address(), fetch: fetch.clone(), pool: cpu_pool.clone(), @@ -807,7 +790,7 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: let rpc_direct = rpc::setup_apis(rpc_apis::ApiSet::All, &dependencies); let ws_server = rpc::new_ws(cmd.ws_conf.clone(), &dependencies)?; let ipc_server = rpc::new_ipc(cmd.ipc_conf, &dependencies)?; - let http_server = rpc::new_http("HTTP JSON-RPC", "jsonrpc", cmd.http_conf.clone(), &dependencies, dapps_middleware)?; + let http_server = rpc::new_http("HTTP JSON-RPC", "jsonrpc", cmd.http_conf.clone(), &dependencies)?; // secret store key server let secretstore_deps = secretstore::Dependencies { @@ -1001,11 +984,10 @@ fn daemonize(_pid_file: String) -> Result<(), String> { Err("daemon is no supported on windows".into()) } -fn print_running_environment(spec_name: &String, dirs: &Directories, db_dirs: &DatabaseDirectories, dapps_conf: &dapps::Configuration) { +fn print_running_environment(spec_name: &String, dirs: &Directories, db_dirs: &DatabaseDirectories) { info!("Starting {}", Colour::White.bold().paint(version())); info!("Keys path {}", Colour::White.bold().paint(dirs.keys_path(spec_name).to_string_lossy().into_owned())); info!("DB path {}", Colour::White.bold().paint(db_dirs.db_root_path().to_string_lossy().into_owned())); - info!("Path to dapps {}", Colour::White.bold().paint(dapps_conf.dapps_path.to_string_lossy().into_owned())); } fn prepare_account_provider(spec: &SpecType, dirs: &Directories, data_dir: &str, cfg: AccountsConfig, passwords: &[Password]) -> Result { diff --git a/parity/url.rs b/parity/url.rs deleted file mode 100644 index 832da84908..0000000000 --- a/parity/url.rs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Cross-platform open url in default browser - -use std; -use std::os::raw::c_int; - -#[allow(unused)] -pub enum Error { - ProcessError(std::io::Error), - WindowsShellExecute(c_int), -} - -impl From for Error { - fn from(err: std::io::Error) -> Self { - Error::ProcessError(err) - } -} - -impl std::fmt::Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { - match *self { - Error::ProcessError(ref e) => write!(f, "{}", e), - Error::WindowsShellExecute(e) => write!(f, "WindowsShellExecute error: {}", e), - } - } -} - -#[cfg(windows)] -pub fn open(url: &str) -> Result<(), Error> { - use std::ffi::CString; - use std::ptr; - use winapi::um::shellapi::ShellExecuteA; - use winapi::um::winuser::SW_SHOWNORMAL as Normal; - - const WINDOWS_SHELL_EXECUTE_SUCCESS: c_int = 32; - - let h_instance = unsafe { - ShellExecuteA(ptr::null_mut(), - CString::new("open").unwrap().as_ptr(), - CString::new(url.to_owned().replace("\n", "%0A")).unwrap().as_ptr(), - ptr::null(), - ptr::null(), - Normal) as c_int - }; - - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx - // `ShellExecute` returns a value greater than 32 on success - if h_instance > WINDOWS_SHELL_EXECUTE_SUCCESS { - Ok(()) - } else { - Err(Error::WindowsShellExecute(h_instance)) - } -} - -#[cfg(any(target_os="macos", target_os="freebsd"))] -pub fn open(url: &str) -> Result<(), Error> { - let _ = std::process::Command::new("open").arg(url).spawn()?; - Ok(()) -} - -#[cfg(target_os="linux")] -pub fn open(url: &str) -> Result<(), Error> { - let _ = std::process::Command::new("xdg-open").arg(url).spawn()?; - Ok(()) -} - -#[cfg(any(target_os="android", target_os="ios"))] -pub fn open(_url: &str) -> Result<(), Error> { - // TODO: While it is generally always bad to leave a function implemented, there is not much - // more we can do here. This function will eventually be removed when we compile Parity - // as a library and not as a full binary. - Ok(()) -} diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index af5b4f413d..d551d90c53 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -54,7 +54,7 @@ ethkey = { path = "../ethkey" } ethstore = { path = "../ethstore" } fetch = { path = "../util/fetch" } keccak-hash = { git = "https://github.com/paritytech/parity-common" } -node-health = { path = "../dapps/node-health" } +node-health = { path = "../node-health" } parity-reactor = { path = "../util/reactor" } parity-updater = { path = "../updater" } parity-version = { path = "../util/version" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 860e4bc6d7..98d743881e 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -131,14 +131,13 @@ use http::tokio_core; pub type HttpServer = http::Server; /// Start http server asynchronously and returns result with `Server` handle on success or an error. -pub fn start_http( +pub fn start_http( addr: &SocketAddr, cors_domains: http::DomainsValidation, allowed_hosts: http::DomainsValidation, handler: H, remote: tokio_core::reactor::Remote, extractor: T, - middleware: Option, threads: usize, max_payload: usize, ) -> ::std::io::Result where @@ -146,21 +145,45 @@ pub fn start_http( S: jsonrpc_core::Middleware, H: Into>, T: HttpMetaExtractor, - R: RequestMiddleware, { let extractor = http_common::MetaExtractor::new(extractor); - let mut builder = http::ServerBuilder::with_meta_extractor(handler, extractor) + Ok(http::ServerBuilder::with_meta_extractor(handler, extractor) .threads(threads) .event_loop_remote(remote) .cors(cors_domains.into()) .allowed_hosts(allowed_hosts.into()) - .max_request_body_size(max_payload * 1024 * 1024); - - if let Some(dapps) = middleware { - builder = builder.request_middleware(dapps) - } + .max_request_body_size(max_payload * 1024 * 1024) + .start_http(addr)?) +} - Ok(builder.start_http(addr)?) +/// Same as `start_http`, but takes an additional `middleware` parameter that is introduced as a +/// hyper middleware. +pub fn start_http_with_middleware( + addr: &SocketAddr, + cors_domains: http::DomainsValidation, + allowed_hosts: http::DomainsValidation, + handler: H, + remote: tokio_core::reactor::Remote, + extractor: T, + middleware: R, + threads: usize, + max_payload: usize, +) -> ::std::io::Result where + M: jsonrpc_core::Metadata, + S: jsonrpc_core::Middleware, + H: Into>, + T: HttpMetaExtractor, + R: RequestMiddleware, +{ + let extractor = http_common::MetaExtractor::new(extractor); + Ok(http::ServerBuilder::with_meta_extractor(handler, extractor) + .threads(threads) + .event_loop_remote(remote) + .cors(cors_domains.into()) + .allowed_hosts(allowed_hosts.into()) + .max_request_body_size(max_payload * 1024 * 1024) + .request_middleware(middleware) + .start_http(addr)?) } /// Start ipc server asynchronously and returns result with `Server` handle on success or an error. diff --git a/rpc/src/tests/rpc.rs b/rpc/src/tests/rpc.rs index d0c0fafd91..d15aeca6cb 100644 --- a/rpc/src/tests/rpc.rs +++ b/rpc/src/tests/rpc.rs @@ -26,19 +26,19 @@ fn serve(handler: Option>) -> Server { let address = "127.0.0.1:0".parse().unwrap(); let handler = handler.unwrap_or_default(); - Server::new(|remote| ::start_http( + Server::new(|remote| ::start_http_with_middleware( &address, http::DomainsValidation::Disabled, http::DomainsValidation::Disabled, handler, remote, extractors::RpcExtractor, - Some(|request: hyper::Request| { + |request: hyper::Request| { http::RequestMiddlewareAction::Proceed { should_continue_on_invalid_cors: false, request, } - }), + }, 1, 5, ).unwrap()) diff --git a/rpc/src/v1/impls/light/parity.rs b/rpc/src/v1/impls/light/parity.rs index 9ef316b70b..f722781111 100644 --- a/rpc/src/v1/impls/light/parity.rs +++ b/rpc/src/v1/impls/light/parity.rs @@ -58,7 +58,6 @@ pub struct ParityClient { settings: Arc, health: NodeHealth, signer: Option>, - dapps_address: Option, ws_address: Option, eip86_transition: u64, gas_price_percentile: usize, @@ -74,7 +73,6 @@ impl ParityClient { settings: Arc, health: NodeHealth, signer: Option>, - dapps_address: Option, ws_address: Option, gas_price_percentile: usize, ) -> Self { @@ -85,7 +83,6 @@ impl ParityClient { settings, health, signer, - dapps_address, ws_address, eip86_transition: client.eip86_transition(), client, @@ -330,8 +327,7 @@ impl Parity for ParityClient { } fn dapps_url(&self) -> Result { - helpers::to_url(&self.dapps_address) - .ok_or_else(|| errors::dapps_disabled()) + Err(errors::dapps_disabled()) } fn ws_url(&self) -> Result { diff --git a/rpc/src/v1/impls/light/parity_set.rs b/rpc/src/v1/impls/light/parity_set.rs index 4e907deaf1..dfe90a8ac8 100644 --- a/rpc/src/v1/impls/light/parity_set.rs +++ b/rpc/src/v1/impls/light/parity_set.rs @@ -27,7 +27,6 @@ use hash::keccak_buffer; use jsonrpc_core::{Result, BoxFuture}; use jsonrpc_core::futures::Future; -use v1::helpers::dapps::DappsService; use v1::helpers::errors; use v1::traits::ParitySet; use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction, LocalDapp}; @@ -35,17 +34,15 @@ use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction, LocalDapp}; /// Parity-specific rpc interface for operations altering the settings. pub struct ParitySetClient { net: Arc, - dapps: Option>, fetch: F, pool: CpuPool, } impl ParitySetClient { /// Creates new `ParitySetClient` with given `Fetch`. - pub fn new(net: Arc, dapps: Option>, fetch: F, p: CpuPool) -> Self { + pub fn new(net: Arc, fetch: F, p: CpuPool) -> Self { ParitySetClient { net: net, - dapps: dapps, fetch: fetch, pool: p, } @@ -141,11 +138,11 @@ impl ParitySet for ParitySetClient { } fn dapps_refresh(&self) -> Result { - self.dapps.as_ref().map(|dapps| dapps.refresh_local_dapps()).ok_or_else(errors::dapps_disabled) + Err(errors::dapps_disabled()) } fn dapps_list(&self) -> Result> { - self.dapps.as_ref().map(|dapps| dapps.list_dapps()).ok_or_else(errors::dapps_disabled) + Err(errors::dapps_disabled()) } fn upgrade_ready(&self) -> Result> { diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index acafbb1cd6..ac4bb11525 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -63,7 +63,6 @@ pub struct ParityClient { logger: Arc, settings: Arc, signer: Option>, - dapps_address: Option, ws_address: Option, eip86_transition: u64, } @@ -83,7 +82,6 @@ impl ParityClient where logger: Arc, settings: Arc, signer: Option>, - dapps_address: Option, ws_address: Option, ) -> Self { let eip86_transition = client.eip86_transition(); @@ -98,7 +96,6 @@ impl ParityClient where logger, settings, signer, - dapps_address, ws_address, eip86_transition, } @@ -351,8 +348,7 @@ impl Parity for ParityClient where } fn dapps_url(&self) -> Result { - helpers::to_url(&self.dapps_address) - .ok_or_else(|| errors::dapps_disabled()) + Err(errors::dapps_disabled()) } fn ws_url(&self) -> Result { diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index e861bd3eb9..82880f7207 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -29,7 +29,6 @@ use updater::{Service as UpdateService}; use jsonrpc_core::{BoxFuture, Result}; use jsonrpc_core::futures::Future; -use v1::helpers::dapps::DappsService; use v1::helpers::errors; use v1::traits::ParitySet; use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction, LocalDapp}; @@ -40,7 +39,6 @@ pub struct ParitySetClient { miner: Arc, updater: Arc, net: Arc, - dapps: Option>, fetch: F, pool: CpuPool, eip86_transition: u64, @@ -55,7 +53,6 @@ impl ParitySetClient miner: &Arc, updater: &Arc, net: &Arc, - dapps: Option>, fetch: F, pool: CpuPool, ) -> Self { @@ -64,7 +61,6 @@ impl ParitySetClient miner: miner.clone(), updater: updater.clone(), net: net.clone(), - dapps: dapps, fetch: fetch, pool: pool, eip86_transition: client.eip86_transition(), @@ -187,11 +183,11 @@ impl ParitySet for ParitySetClient where } fn dapps_refresh(&self) -> Result { - self.dapps.as_ref().map(|dapps| dapps.refresh_local_dapps()).ok_or_else(errors::dapps_disabled) + Err(errors::dapps_disabled()) } fn dapps_list(&self) -> Result> { - self.dapps.as_ref().map(|dapps| dapps.list_dapps()).ok_or_else(errors::dapps_disabled) + Err(errors::dapps_disabled()) } fn upgrade_ready(&self) -> Result> { diff --git a/rpc/src/v1/tests/helpers/dapps.rs b/rpc/src/v1/tests/helpers/dapps.rs deleted file mode 100644 index 70f42a29e5..0000000000 --- a/rpc/src/v1/tests/helpers/dapps.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015-2018 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 dapps service. - -use v1::types::LocalDapp; -use v1::helpers::dapps::DappsService; - -/// Test implementation of dapps service. Will always return the same list of dapps. -#[derive(Default, Clone)] -pub struct TestDappsService; - -impl DappsService for TestDappsService { - fn list_dapps(&self) -> Vec { - vec![LocalDapp { - id: "skeleton".into(), - name: "Skeleton".into(), - description: "A skeleton dapp".into(), - version: "0.1".into(), - author: "Parity Technologies Ltd".into(), - icon_url: "title.png".into(), - local_url: None, - }] - } - - fn refresh_local_dapps(&self) -> bool { - true - } -} diff --git a/rpc/src/v1/tests/helpers/mod.rs b/rpc/src/v1/tests/helpers/mod.rs index a2782eec60..ba87428b98 100644 --- a/rpc/src/v1/tests/helpers/mod.rs +++ b/rpc/src/v1/tests/helpers/mod.rs @@ -16,13 +16,11 @@ //! Test rpc services. -mod dapps; mod miner_service; mod snapshot_service; mod sync_provider; mod update_service; -pub use self::dapps::TestDappsService; pub use self::miner_service::TestMinerService; pub use self::snapshot_service::TestSnapshotService; pub use self::sync_provider::{Config, TestSyncProvider}; diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index a2db6f0834..e4b136586b 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -45,7 +45,6 @@ pub struct Dependencies { pub settings: Arc, pub network: Arc, pub accounts: Arc, - pub dapps_address: Option, pub ws_address: Option, } @@ -75,7 +74,6 @@ impl Dependencies { }), network: Arc::new(TestManageNetwork), accounts: Arc::new(AccountProvider::transient_provider()), - dapps_address: Some("127.0.0.1:18080".into()), ws_address: Some("127.0.0.1:18546".into()), } } @@ -92,7 +90,6 @@ impl Dependencies { self.logger.clone(), self.settings.clone(), signer, - self.dapps_address.clone(), self.ws_address.clone(), ) } @@ -431,19 +428,15 @@ fn rpc_parity_ws_address() { #[test] fn rpc_parity_dapps_address() { // given - let mut deps = Dependencies::new(); + let deps = Dependencies::new(); let io1 = deps.default_client(); - deps.dapps_address = None; - let io2 = deps.default_client(); // when let request = r#"{"jsonrpc": "2.0", "method": "parity_dappsUrl", "params": [], "id": 1}"#; - let response1 = r#"{"jsonrpc":"2.0","result":"127.0.0.1:18080","id":1}"#; - let response2 = r#"{"jsonrpc":"2.0","error":{"code":-32000,"message":"Dapps Server is disabled. This API is not available."},"id":1}"#; + let response = r#"{"jsonrpc":"2.0","error":{"code":-32000,"message":"Dapps Server is disabled. This API is not available."},"id":1}"#; // then - assert_eq!(io1.handle_request_sync(request), Some(response1.to_owned())); - assert_eq!(io2.handle_request_sync(request), Some(response2.to_owned())); + assert_eq!(io1.handle_request_sync(request), Some(response.to_owned())); } #[test] diff --git a/rpc/src/v1/tests/mocked/parity_set.rs b/rpc/src/v1/tests/mocked/parity_set.rs index 90855afe54..0347da39ad 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -26,7 +26,7 @@ use futures_cpupool::CpuPool; use jsonrpc_core::IoHandler; use v1::{ParitySet, ParitySetClient}; -use v1::tests::helpers::{TestMinerService, TestUpdater, TestDappsService}; +use v1::tests::helpers::{TestMinerService, TestUpdater}; use super::manage_network::TestManageNetwork; use fake_fetch::FakeFetch; @@ -55,9 +55,8 @@ fn parity_set_client( updater: &Arc, net: &Arc, ) -> TestParitySetClient { - let dapps_service = Arc::new(TestDappsService); let pool = CpuPool::new(1); - ParitySetClient::new(client, miner, updater, &(net.clone() as Arc), Some(dapps_service), FakeFetch::new(Some(1)), pool) + ParitySetClient::new(client, miner, updater, &(net.clone() as Arc), FakeFetch::new(Some(1)), pool) } #[test] @@ -250,7 +249,7 @@ fn rpc_parity_set_dapps_list() { io.extend_with(parity_set_client(&client, &miner, &updater, &network).to_delegate()); let request = r#"{"jsonrpc": "2.0", "method": "parity_dappsList", "params":[], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","result":[{"author":"Parity Technologies Ltd","description":"A skeleton dapp","iconUrl":"title.png","id":"skeleton","localUrl":null,"name":"Skeleton","version":"0.1"}],"id":1}"#; + let response = r#"{"jsonrpc":"2.0","error":{"code":-32000,"message":"Dapps Server is disabled. This API is not available."},"id":1}"#; assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 1b9a7d09f5..56634cc158 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -162,6 +162,7 @@ build_rpc_trait! { fn local_transactions(&self) -> Result>; /// Returns current Dapps Server interface and port or an error if dapps server is disabled. + /// (deprecated, should always return an error now). #[rpc(name = "parity_dappsUrl")] fn dapps_url(&self) -> Result; diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index 8cfffb50c7..dfd0ad5541 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -95,11 +95,12 @@ build_rpc_trait! { #[rpc(name = "parity_hashContent")] fn hash_content(&self, String) -> BoxFuture; - /// Returns true if refresh successful, error if unsuccessful or server is disabled. + /// Returns true if refresh successful, error if unsuccessful or server is disabled + /// (deprecated, should always return an error now). #[rpc(name = "parity_dappsRefresh")] fn dapps_refresh(&self) -> Result; - /// Returns a list of local dapps + /// Returns a list of local dapps (deprecated, should always return an error now). #[rpc(name = "parity_dappsList")] fn dapps_list(&self) -> Result>; diff --git a/util/dir/src/lib.rs b/util/dir/src/lib.rs index 712b53f0de..88792fe8a6 100644 --- a/util/dir/src/lib.rs +++ b/util/dir/src/lib.rs @@ -61,8 +61,6 @@ pub struct Directories { pub keys: String, /// Signer dir pub signer: String, - /// Dir to store dapps - pub dapps: String, /// Secrets dir pub secretstore: String, } @@ -77,7 +75,6 @@ impl Default for Directories { cache: replace_home_and_local(&data_dir, &local_dir, CACHE_PATH), keys: replace_home(&data_dir, "$BASE/keys"), signer: replace_home(&data_dir, "$BASE/signer"), - dapps: replace_home(&data_dir, "$BASE/dapps"), secretstore: replace_home(&data_dir, "$BASE/secretstore"), } } @@ -85,7 +82,7 @@ impl Default for Directories { impl Directories { /// Create local directories - pub fn create_dirs(&self, dapps_enabled: bool, signer_enabled: bool, secretstore_enabled: bool) -> Result<(), String> { + pub fn create_dirs(&self, signer_enabled: bool, secretstore_enabled: bool) -> Result<(), String> { fs::create_dir_all(&self.base).map_err(|e| e.to_string())?; fs::create_dir_all(&self.db).map_err(|e| e.to_string())?; fs::create_dir_all(&self.cache).map_err(|e| e.to_string())?; @@ -93,9 +90,6 @@ impl Directories { if signer_enabled { fs::create_dir_all(&self.signer).map_err(|e| e.to_string())?; } - if dapps_enabled { - fs::create_dir_all(&self.dapps).map_err(|e| e.to_string())?; - } if secretstore_enabled { fs::create_dir_all(&self.secretstore).map_err(|e| e.to_string())?; } @@ -356,7 +350,6 @@ mod tests { ), keys: replace_home(&data_dir, "$BASE/keys"), signer: replace_home(&data_dir, "$BASE/signer"), - dapps: replace_home(&data_dir, "$BASE/dapps"), secretstore: replace_home(&data_dir, "$BASE/secretstore"), }; assert_eq!(expected, Directories::default()); -- GitLab From c082af6f740dd28bd4252461d46145ded0e6d848 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Wed, 11 Jul 2018 13:04:31 +0200 Subject: [PATCH 126/191] Don't fetch snapshot chunks at random (#9088) --- ethcore/sync/src/snapshot.rs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ethcore/sync/src/snapshot.rs b/ethcore/sync/src/snapshot.rs index e5632e652b..c7f0d284f3 100644 --- a/ethcore/sync/src/snapshot.rs +++ b/ethcore/sync/src/snapshot.rs @@ -17,7 +17,6 @@ use ethcore::snapshot::{ManifestData, SnapshotService}; use ethereum_types::H256; use hash::keccak; -use rand::{thread_rng, Rng}; use std::collections::HashSet; use std::iter::FromIterator; @@ -114,35 +113,32 @@ impl Snapshot { Err(()) } - /// Find a random chunk to download + /// Find a chunk to download pub fn needed_chunk(&mut self) -> Option { - // Find all random chunks: first blocks, then state - let needed_chunks = { + // Find next needed chunk: first block, then state chunks + let chunk = { let chunk_filter = |h| !self.downloading_chunks.contains(h) && !self.completed_chunks.contains(h); - let needed_block_chunks = self.pending_block_chunks.iter() + let needed_block_chunk = self.pending_block_chunks.iter() .filter(|&h| chunk_filter(h)) .map(|h| *h) - .collect::>(); + .next(); // If no block chunks to download, get the state chunks - if needed_block_chunks.len() == 0 { + if needed_block_chunk.is_none() { self.pending_state_chunks.iter() .filter(|&h| chunk_filter(h)) .map(|h| *h) - .collect::>() + .next() } else { - needed_block_chunks + needed_block_chunk } }; - // Get a random chunk - let chunk = thread_rng().choose(&needed_chunks); - if let Some(hash) = chunk { self.downloading_chunks.insert(hash.clone()); } - chunk.map(|h| *h) + chunk } pub fn clear_chunk_download(&mut self, hash: &H256) { -- GitLab From 484ecfaf4786e28c5abc0ba9685a32b5e180cb1d Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Wed, 11 Jul 2018 13:35:10 +0200 Subject: [PATCH 127/191] Parity Ethereum 2.0.0 (#9052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * parity-version: major bump to 2.0.0 🎉 * parity-ethereum: rename crate 🌵 * ethcore: only accept service transactions from parity-ethereum nodes * parity: fix --identity tests * rpc: fix sync provider in tests * rpc: fix parity_net_peers test * ethcore-sync: accept service transactions from parity and parity-ethereum * ethcore-sync: fix indentation * ethcore-sync: split the ifs to reduce code redundancy * ethcore-sync: fix syntax * Fix building ethcore * update cargo.lock * parity-version: major bump to 2.0.0 tada * fix merge --- Cargo.lock | 62 +++++++++++------------ Cargo.toml | 4 +- ethcore/sync/src/chain/propagator.rs | 28 ++++++---- parity-clib/Cargo.toml | 4 +- parity-clib/src/lib.rs | 22 ++++---- parity/configuration.rs | 6 +-- parity/main.rs | 50 +++++++++--------- rpc/src/v1/tests/helpers/sync_provider.rs | 4 +- rpc/src/v1/tests/mocked/parity.rs | 2 +- util/version/Cargo.toml | 2 +- util/version/src/lib.rs | 4 +- 11 files changed, 97 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 54b3bff97a..2c5c31de34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1855,7 +1855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1949,8 +1949,32 @@ dependencies = [ ] [[package]] -name = "parity" +name = "parity-bytes" +version = "0.1.0" +source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" + +[[package]] +name = "parity-clib" version = "1.12.0" +dependencies = [ + "parity-ethereum 2.0.0", +] + +[[package]] +name = "parity-crypto" +version = "0.1.0" +source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +dependencies = [ + "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.12.1 (git+https://github.com/paritytech/ring)", + "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parity-ethereum" +version = "2.0.0" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2000,7 +2024,7 @@ dependencies = [ "parity-rpc 1.12.0", "parity-rpc-client 1.4.0", "parity-updater 1.12.0", - "parity-version 1.12.0", + "parity-version 2.0.0", "parity-whisper 0.1.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "path 0.1.1 (git+https://github.com/paritytech/parity-common)", @@ -2023,30 +2047,6 @@ dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parity-bytes" -version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" - -[[package]] -name = "parity-clib" -version = "1.12.0" -dependencies = [ - "parity 1.12.0", -] - -[[package]] -name = "parity-crypto" -version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" -dependencies = [ - "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.12.1 (git+https://github.com/paritytech/ring)", - "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parity-hash-fetch" version = "1.12.0" @@ -2164,7 +2164,7 @@ dependencies = [ "parity-crypto 0.1.0 (git+https://github.com/paritytech/parity-common)", "parity-reactor 0.1.0", "parity-updater 1.12.0", - "parity-version 1.12.0", + "parity-version 2.0.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie 0.2.1 (git+https://github.com/paritytech/parity-common)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2234,7 +2234,7 @@ dependencies = [ "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "parity-hash-fetch 1.12.0", - "parity-version 1.12.0", + "parity-version 2.0.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "path 0.1.1 (git+https://github.com/paritytech/parity-common)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2245,7 +2245,7 @@ dependencies = [ [[package]] name = "parity-version" -version = "1.12.0" +version = "2.0.0" dependencies = [ "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", @@ -2579,7 +2579,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f84b2080c0..75c39ccc97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] description = "Parity Ethereum client" -name = "parity" +name = "parity-ethereum" # NOTE Make sure to update util/version/Cargo.toml as well -version = "1.12.0" +version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/ethcore/sync/src/chain/propagator.rs b/ethcore/sync/src/chain/propagator.rs index 75cf550f28..ef5e700bfe 100644 --- a/ethcore/sync/src/chain/propagator.rs +++ b/ethcore/sync/src/chain/propagator.rs @@ -48,15 +48,21 @@ fn accepts_service_transaction(client_id: &str) -> bool { // Parity versions starting from this will accept service-transactions const SERVICE_TRANSACTIONS_VERSION: (u32, u32) = (1u32, 6u32); // Parity client string prefix - const PARITY_CLIENT_ID_PREFIX: &'static str = "Parity/v"; - - if !client_id.starts_with(PARITY_CLIENT_ID_PREFIX) { + const LEGACY_CLIENT_ID_PREFIX: &'static str = "Parity/v"; + const PARITY_CLIENT_ID_PREFIX: &'static str = "Parity-Ethereum/v"; + + let splitted = if client_id.starts_with(LEGACY_CLIENT_ID_PREFIX) { + client_id[LEGACY_CLIENT_ID_PREFIX.len()..].split('.') + } else if client_id.starts_with(PARITY_CLIENT_ID_PREFIX) { + client_id[PARITY_CLIENT_ID_PREFIX.len()..].split('.') + } else { return false; - } - let ver: Vec = client_id[PARITY_CLIENT_ID_PREFIX.len()..].split('.') - .take(2) - .filter_map(|s| s.parse().ok()) - .collect(); + }; + + let ver: Vec = splitted + .take(2) + .filter_map(|s| s.parse().ok()) + .collect(); ver.len() == 2 && (ver[0] > SERVICE_TRANSACTIONS_VERSION.0 || (ver[0] == SERVICE_TRANSACTIONS_VERSION.0 && ver[1] >= SERVICE_TRANSACTIONS_VERSION.1)) } @@ -577,13 +583,13 @@ mod tests { io.peers_info.insert(1, "Geth".to_owned()); // and peer#2 is Parity, accepting service transactions insert_dummy_peer(&mut sync, 2, block_hash); - io.peers_info.insert(2, "Parity/v1.6".to_owned()); + io.peers_info.insert(2, "Parity-Ethereum/v2.6".to_owned()); // and peer#3 is Parity, discarding service transactions insert_dummy_peer(&mut sync, 3, block_hash); io.peers_info.insert(3, "Parity/v1.5".to_owned()); // and peer#4 is Parity, accepting service transactions insert_dummy_peer(&mut sync, 4, block_hash); - io.peers_info.insert(4, "Parity/v1.7.3-ABCDEFGH".to_owned()); + io.peers_info.insert(4, "Parity-Ethereum/v2.7.3-ABCDEFGH".to_owned()); // and new service transaction is propagated to peers SyncPropagator::propagate_new_transactions(&mut sync, &mut io); @@ -607,7 +613,7 @@ mod tests { // when peer#1 is Parity, accepting service transactions insert_dummy_peer(&mut sync, 1, block_hash); - io.peers_info.insert(1, "Parity/v1.6".to_owned()); + io.peers_info.insert(1, "Parity-Ethereum/v2.6".to_owned()); // and service + non-service transactions are propagated to peers SyncPropagator::propagate_new_transactions(&mut sync, &mut io); diff --git a/parity-clib/Cargo.toml b/parity-clib/Cargo.toml index 001f954c21..3a1e95b5f3 100644 --- a/parity-clib/Cargo.toml +++ b/parity-clib/Cargo.toml @@ -10,8 +10,8 @@ name = "parity" crate-type = ["cdylib", "staticlib"] [dependencies] -parity = { path = "../", default-features = false } +parity-ethereum = { path = "../", default-features = false } [features] default = [] -final = ["parity/final"] +final = ["parity-ethereum/final"] diff --git a/parity-clib/src/lib.rs b/parity-clib/src/lib.rs index f7a98f811d..563eafd730 100644 --- a/parity-clib/src/lib.rs +++ b/parity-clib/src/lib.rs @@ -17,7 +17,7 @@ //! Note that all the structs and functions here are documented in `parity.h`, to avoid //! duplicating documentation. -extern crate parity; +extern crate parity_ethereum; use std::os::raw::{c_char, c_void, c_int}; use std::panic; @@ -56,7 +56,7 @@ pub extern fn parity_config_from_cli(args: *const *const c_char, args_lens: *con args }; - match parity::Configuration::parse_cli(&args) { + match parity_ethereum::Configuration::parse_cli(&args) { Ok(mut cfg) => { // Always disable the auto-updater when used as a library. cfg.args.arg_auto_update = "none".to_owned(); @@ -77,7 +77,7 @@ pub extern fn parity_config_from_cli(args: *const *const c_char, args_lens: *con pub extern fn parity_config_destroy(cfg: *mut c_void) { unsafe { let _ = panic::catch_unwind(|| { - let _cfg = Box::from_raw(cfg as *mut parity::Configuration); + let _cfg = Box::from_raw(cfg as *mut parity_ethereum::Configuration); }); } } @@ -89,7 +89,7 @@ pub extern fn parity_start(cfg: *const ParityParams, output: *mut *mut c_void) - *output = ptr::null_mut(); let cfg: &ParityParams = &*cfg; - let config = Box::from_raw(cfg.configuration as *mut parity::Configuration); + let config = Box::from_raw(cfg.configuration as *mut parity_ethereum::Configuration); let on_client_restart_cb = { struct Cb(Option, *mut c_void); @@ -106,16 +106,16 @@ pub extern fn parity_start(cfg: *const ParityParams, output: *mut *mut c_void) - move |new_chain: String| { cb.call(new_chain); } }; - let action = match parity::start(*config, on_client_restart_cb, || {}) { + let action = match parity_ethereum::start(*config, on_client_restart_cb, || {}) { Ok(action) => action, Err(_) => return 1, }; match action { - parity::ExecutionAction::Instant(Some(s)) => { println!("{}", s); 0 }, - parity::ExecutionAction::Instant(None) => 0, - parity::ExecutionAction::Running(client) => { - *output = Box::into_raw(Box::::new(client)) as *mut c_void; + parity_ethereum::ExecutionAction::Instant(Some(s)) => { println!("{}", s); 0 }, + parity_ethereum::ExecutionAction::Instant(None) => 0, + parity_ethereum::ExecutionAction::Running(client) => { + *output = Box::into_raw(Box::::new(client)) as *mut c_void; 0 } } @@ -127,7 +127,7 @@ pub extern fn parity_start(cfg: *const ParityParams, output: *mut *mut c_void) - pub extern fn parity_destroy(client: *mut c_void) { unsafe { let _ = panic::catch_unwind(|| { - let client = Box::from_raw(client as *mut parity::RunningClient); + let client = Box::from_raw(client as *mut parity_ethereum::RunningClient); client.shutdown(); }); } @@ -137,7 +137,7 @@ pub extern fn parity_destroy(client: *mut c_void) { pub extern fn parity_rpc(client: *mut c_void, query: *const char, len: usize, out_str: *mut c_char, out_len: *mut usize) -> c_int { unsafe { panic::catch_unwind(|| { - let client: &mut parity::RunningClient = &mut *(client as *mut parity::RunningClient); + let client: &mut parity_ethereum::RunningClient = &mut *(client as *mut parity_ethereum::RunningClient); let query_str = { let string = slice::from_raw_parts(query as *const u8, len); diff --git a/parity/configuration.rs b/parity/configuration.rs index 6f6951e2fc..a1ace822e6 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -102,7 +102,7 @@ impl Configuration { /// # Example /// /// ``` - /// let _cfg = parity::Configuration::parse_cli(&["--light", "--chain", "kovan"]).unwrap(); + /// let _cfg = parity_ethereum::Configuration::parse_cli(&["--light", "--chain", "kovan"]).unwrap(); /// ``` pub fn parse_cli>(command: &[S]) -> Result { let config = Configuration { @@ -722,7 +722,7 @@ impl Configuration { ret.client_version = { let mut client_version = version(); if !self.args.arg_identity.is_empty() { - // Insert name after the "Parity/" at the beginning of version string. + // Insert name after the "Parity-Ethereum/" at the beginning of version string. let idx = client_version.find('/').unwrap_or(client_version.len()); client_version.insert_str(idx, &format!("/{}", self.args.arg_identity)); } @@ -1740,7 +1740,7 @@ mod tests { match conf.into_command().unwrap().cmd { Cmd::Run(c) => { assert_eq!(c.name, "Somebody"); - assert!(c.net_conf.client_version.starts_with("Parity/Somebody/")); + assert!(c.net_conf.client_version.starts_with("Parity-Ethereum/Somebody/")); } _ => panic!("Should be Cmd::Run"), } diff --git a/parity/main.rs b/parity/main.rs index 4a02f632fe..9256373ca0 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -24,7 +24,7 @@ extern crate fdlimit; #[macro_use] extern crate log; extern crate panic_hook; -extern crate parity; +extern crate parity_ethereum; extern crate parking_lot; #[cfg(windows)] extern crate winapi; @@ -40,7 +40,7 @@ use std::{process, env}; use ctrlc::CtrlC; use dir::default_hypervisor_path; use fdlimit::raise_fd_limit; -use parity::{start, ExecutionAction}; +use parity_ethereum::{start, ExecutionAction}; use parking_lot::{Condvar, Mutex}; const PLEASE_RESTART_EXIT_CODE: i32 = 69; @@ -61,9 +61,9 @@ fn update_path(name: &str) -> PathBuf { } fn latest_exe_path() -> Result { - File::open(update_path("latest")).and_then(|mut f| { - let mut exe_path = String::new(); - trace!(target: "updater", "latest binary path: {:?}", f); + File::open(update_path("latest")).and_then(|mut f| { + let mut exe_path = String::new(); + trace!(target: "updater", "latest binary path: {:?}", f); f.read_to_string(&mut exe_path).map(|_| update_path(&exe_path)) }) .or(Err(Error::BinaryNotFound)) @@ -98,9 +98,9 @@ fn take_spec_name_override() -> Option { let p = update_path("spec_name_override"); let r = File::open(p.clone()) .ok() - .and_then(|mut f| { - let mut spec_name = String::new(); - f.read_to_string(&mut spec_name).ok().map(|_| spec_name) + .and_then(|mut f| { + let mut spec_name = String::new(); + f.read_to_string(&mut spec_name).ok().map(|_| spec_name) }); let _ = remove_file(p); r @@ -137,7 +137,7 @@ fn run_parity() -> Result<(), Error> { global_init(); let prefix = vec![OsString::from("--can-restart"), OsString::from("--force-direct")]; - + let res: Result<(), Error> = latest_exe_path() .and_then(|exe| process::Command::new(exe) .args(&(env::args_os().skip(1).chain(prefix.into_iter()).collect::>())) @@ -155,7 +155,7 @@ fn run_parity() -> Result<(), Error> { _ => Err(Error::Unknown), } }) - ); + ); global_cleanup(); res @@ -181,7 +181,7 @@ fn main_direct(force_can_restart: bool) -> i32 { let mut conf = { let args = std::env::args().collect::>(); - parity::Configuration::parse_cli(&args).unwrap_or_else(|e| e.exit()) + parity_ethereum::Configuration::parse_cli(&args).unwrap_or_else(|e| e.exit()) }; if let Some(spec_override) = take_spec_name_override() { @@ -331,10 +331,10 @@ fn main() { // the user has specified to run its originally installed binary (not via `parity-updater`) let force_direct = std::env::args().any(|arg| arg == "--force-direct"); - + // absolute path to the current `binary` let exe_path = std::env::current_exe().ok(); - + // the binary is named `target/xx/yy` let development = exe_path .as_ref() @@ -345,31 +345,31 @@ fn main() { .map(|n| n == "target") }) .unwrap_or(false); - + // the binary is named `parity` let same_name = exe_path .as_ref() - .map_or(false, |p| { - p.file_stem().map_or(false, |n| n == PARITY_EXECUTABLE_NAME) + .map_or(false, |p| { + p.file_stem().map_or(false, |n| n == PARITY_EXECUTABLE_NAME) }); - trace_main!("Starting up {} (force-direct: {}, development: {}, same-name: {})", - std::env::current_exe().ok().map_or_else(|| "".into(), |x| format!("{}", x.display())), - force_direct, - development, + trace_main!("Starting up {} (force-direct: {}, development: {}, same-name: {})", + std::env::current_exe().ok().map_or_else(|| "".into(), |x| format!("{}", x.display())), + force_direct, + development, same_name); if !force_direct && !development && same_name { - // Try to run the latest installed version of `parity`, + // Try to run the latest installed version of `parity`, // Upon failure it falls back to the locally installed version of `parity` // Everything run inside a loop, so we'll be able to restart from the child into a new version seamlessly. loop { // `Path` to the latest downloaded binary let latest_exe = latest_exe_path().ok(); - + // `Latest´ binary exist let have_update = latest_exe.as_ref().map_or(false, |p| p.exists()); - + // Canonicalized path to the current binary is not the same as to latest binary let canonicalized_path_not_same = exe_path .as_ref() @@ -381,7 +381,7 @@ fn main() { trace_main!("Starting... (have-update: {}, non-updated-current: {}, update-is-newer: {})", have_update, canonicalized_path_not_same, update_is_newer); let exit_code = if have_update && canonicalized_path_not_same && update_is_newer { - 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()); match run_parity() { Ok(_) => 0, @@ -389,7 +389,7 @@ fn main() { Err(Error::Restart) => PLEASE_RESTART_EXIT_CODE, // Fall back to local version Err(e) => { - error!(target: "updater", "Updated binary could not be executed error: {:?}. Falling back to local version", e); + error!(target: "updater", "Updated binary could not be executed error: {:?}. Falling back to local version", e); main_direct(true) } } diff --git a/rpc/src/v1/tests/helpers/sync_provider.rs b/rpc/src/v1/tests/helpers/sync_provider.rs index 7cb0acffef..b65e543e55 100644 --- a/rpc/src/v1/tests/helpers/sync_provider.rs +++ b/rpc/src/v1/tests/helpers/sync_provider.rs @@ -75,7 +75,7 @@ impl SyncProvider for TestSyncProvider { vec![ PeerInfo { id: Some("node1".to_owned()), - client_version: "Parity/1".to_owned(), + client_version: "Parity-Ethereum/1".to_owned(), capabilities: vec!["eth/62".to_owned(), "eth/63".to_owned()], remote_address: "127.0.0.1:7777".to_owned(), local_address: "127.0.0.1:8888".to_owned(), @@ -88,7 +88,7 @@ impl SyncProvider for TestSyncProvider { }, PeerInfo { id: None, - client_version: "Parity/2".to_owned(), + client_version: "Parity-Ethereum/2".to_owned(), capabilities: vec!["eth/63".to_owned(), "eth/64".to_owned()], remote_address: "Handshake".to_owned(), local_address: "127.0.0.1:3333".to_owned(), diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index e4b136586b..f8322f8fe7 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -326,7 +326,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 = 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},"pip":null}},{"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},"pip":null}}]},"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-Ethereum/1","network":{"localAddress":"127.0.0.1:8888","remoteAddress":"127.0.0.1:7777"},"protocols":{"eth":{"difficulty":"0x28","head":"0000000000000000000000000000000000000000000000000000000000000032","version":62},"pip":null}},{"caps":["eth/63","eth/64"],"id":null,"name":"Parity-Ethereum/2","network":{"localAddress":"127.0.0.1:3333","remoteAddress":"Handshake"},"protocols":{"eth":{"difficulty":null,"head":"000000000000000000000000000000000000000000000000000000000000003c","version":64},"pip":null}}]},"id":1}"#; assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } diff --git a/util/version/Cargo.toml b/util/version/Cargo.toml index 44e5cde365..1c674fb376 100644 --- a/util/version/Cargo.toml +++ b/util/version/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "parity-version" # NOTE: this value is used for Parity version string (via env CARGO_PKG_VERSION) -version = "1.12.0" +version = "2.0.0" authors = ["Parity Technologies "] build = "build.rs" diff --git a/util/version/src/lib.rs b/util/version/src/lib.rs index 79f11415e4..a7452e0ce9 100644 --- a/util/version/src/lib.rs +++ b/util/version/src/lib.rs @@ -54,7 +54,7 @@ pub fn version() -> String { let sha3_dash = if sha3.is_empty() { "" } else { "-" }; let commit_date = vergen::commit_date().replace("-", ""); let date_dash = if commit_date.is_empty() { "" } else { "-" }; - format!("Parity/v{}-{}{}{}{}{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), THIS_TRACK, sha3_dash, sha3, date_dash, commit_date, platform(), generated::rustc_version()) + format!("Parity-Ethereum/v{}-{}{}{}{}{}/{}/rustc{}", env!("CARGO_PKG_VERSION"), THIS_TRACK, sha3_dash, sha3, date_dash, commit_date, platform(), generated::rustc_version()) } /// Get the standard version data for this software. @@ -65,7 +65,7 @@ pub fn version_data() -> Bytes { (env!("CARGO_PKG_VERSION_MINOR").parse::().expect("Environment variables are known to be valid; qed") << 8) + env!("CARGO_PKG_VERSION_PATCH").parse::().expect("Environment variables are known to be valid; qed"); s.append(&v); - s.append(&"Parity"); + s.append(&"Parity-Ethereum"); s.append(&generated::rustc_version()); s.append(&&Target::os()[0..2]); s.out() -- GitLab From 796637b31ad2c5e40761784912aa8cd4569ebfa4 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Wed, 11 Jul 2018 07:17:35 -0700 Subject: [PATCH 128/191] Add separate database directory for light client (#8927) (#9064) * Add seperate default DB path for light client (#8927) * Improve readability --- parity/configuration.rs | 8 +++++++- util/dir/src/lib.rs | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/parity/configuration.rs b/parity/configuration.rs index a1ace822e6..f904c169c0 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -939,7 +939,13 @@ impl Configuration { let is_using_base_path = self.args.arg_base_path.is_some(); // If base_path is set and db_path is not we default to base path subdir instead of LOCAL. let base_db_path = if is_using_base_path && self.args.arg_db_path.is_none() { - "$BASE/chains" + if self.args.flag_light { + "$BASE/chains_light" + } else { + "$BASE/chains" + } + } else if self.args.flag_light { + self.args.arg_db_path.as_ref().map_or(dir::CHAINS_PATH_LIGHT, |s| &s) } else { self.args.arg_db_path.as_ref().map_or(dir::CHAINS_PATH, |s| &s) }; diff --git a/util/dir/src/lib.rs b/util/dir/src/lib.rs index 88792fe8a6..bc89c5f147 100644 --- a/util/dir/src/lib.rs +++ b/util/dir/src/lib.rs @@ -34,10 +34,14 @@ use platform::*; pub use dirs::home_dir; -/// Platform-specific chains path - Windows only +/// Platform-specific chains path for standard client - Windows only #[cfg(target_os = "windows")] pub const CHAINS_PATH: &str = "$LOCAL/chains"; -/// Platform-specific chains path +/// Platform-specific chains path for light client - Windows only +#[cfg(target_os = "windows")] pub const CHAINS_PATH_LIGHT: &str = "$LOCAL/chains_light"; +/// Platform-specific chains path for standard client #[cfg(not(target_os = "windows"))] pub const CHAINS_PATH: &str = "$BASE/chains"; +/// Platform-specific chains path for light client +#[cfg(not(target_os = "windows"))] pub const CHAINS_PATH_LIGHT: &str = "$BASE/chains_light"; /// Platform-specific cache path - Windows only #[cfg(target_os = "windows")] pub const CACHE_PATH: &str = "$LOCAL/cache"; -- GitLab From 01f825b0e1f1c4c420197b51fc801cbe89284b29 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Wed, 11 Jul 2018 12:22:06 -0700 Subject: [PATCH 129/191] Multiple improvements to discovery ping handling (#8771) * discovery: Only add nodes to routing table after receiving pong. Previously the discovery algorithm would add nodes to the routing table before confirming that the endpoint is participating in the protocol. This now tracks in-flight pings and adds to the routing table only after receiving a response. * discovery: Refactor packet creation into its own function. This function is useful inside unit tests. * discovery: Additional testing for new add_node behavior. * discovery: Track expiration of pings to non-yet-in-bucket nodes. Now that we may ping nodes before adding to a k-bucket, the timeout tracking must be separate from BucketEntry. * discovery: Verify echo hash on pong packets. Stores packet hash with in-flight requests and matches with pong response. * discovery: Track timeouts on FIND_NODE requests. * discovery: Retry failed pings with exponential backoff. UDP packets may get dropped, so instead of immediately booting nodes that fail to respond to a ping, retry 4 times with exponential backoff. * !fixup Use slice instead of Vec for request_backoff. --- util/network-devp2p/src/discovery.rs | 649 +++++++++++++++++++------- util/network-devp2p/src/host.rs | 2 +- util/network-devp2p/src/node_table.rs | 2 +- 3 files changed, 487 insertions(+), 166 deletions(-) diff --git a/util/network-devp2p/src/discovery.rs b/util/network-devp2p/src/discovery.rs index 3bf7aee1e4..bc808c3982 100644 --- a/util/network-devp2p/src/discovery.rs +++ b/util/network-devp2p/src/discovery.rs @@ -17,11 +17,12 @@ use parity_bytes::Bytes; use std::net::SocketAddr; use std::collections::{HashSet, HashMap, VecDeque}; +use std::collections::hash_map::Entry; use std::default::Default; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; use hash::keccak; use ethereum_types::{H256, H520}; -use rlp::{Rlp, RlpStream, encode_list}; +use rlp::{Rlp, RlpStream}; use node_table::*; use network::{Error, ErrorKind}; use ethkey::{Secret, KeyPair, sign, recover}; @@ -42,7 +43,15 @@ const PACKET_FIND_NODE: u8 = 3; const PACKET_NEIGHBOURS: u8 = 4; const PING_TIMEOUT: Duration = Duration::from_millis(300); +const FIND_NODE_TIMEOUT: Duration = Duration::from_secs(2); +const EXPIRY_TIME: Duration = Duration::from_secs(60); const MAX_NODES_PING: usize = 32; // Max nodes to add/ping at once +const REQUEST_BACKOFF: [Duration; 4] = [ + Duration::from_secs(1), + Duration::from_secs(4), + Duration::from_secs(16), + Duration::from_secs(64) +]; #[derive(Clone, Debug)] pub struct NodeEntry { @@ -53,13 +62,35 @@ pub struct NodeEntry { pub struct BucketEntry { pub address: NodeEntry, pub id_hash: H256, - pub timeout: Option, + pub last_seen: Instant, + backoff_until: Instant, + fail_count: usize, +} + +impl BucketEntry { + fn new(address: NodeEntry) -> Self { + let now = Instant::now(); + BucketEntry { + id_hash: keccak(address.id), + address: address, + last_seen: now, + backoff_until: now, + fail_count: 0, + } + } } pub struct NodeBucket { nodes: VecDeque, //sorted by last active } +struct PendingRequest { + packet_id: u8, + sent_at: Instant, + packet_hash: H256, + response_count: usize, // Some requests (eg. FIND_NODE) have multi-packet responses +} + impl Default for NodeBucket { fn default() -> Self { NodeBucket::new() @@ -79,7 +110,7 @@ pub struct Datagram { pub address: SocketAddr, } -pub struct Discovery { +pub struct Discovery<'a> { id: NodeId, id_hash: H256, secret: Secret, @@ -88,10 +119,14 @@ pub struct Discovery { discovery_id: NodeId, discovery_nodes: HashSet, node_buckets: Vec, + in_flight_requests: HashMap, + expiring_pings: VecDeque<(NodeId, Instant)>, + expiring_finds: VecDeque<(NodeId, Instant)>, send_queue: VecDeque, check_timestamps: bool, adding_nodes: Vec, ip_filter: IpFilter, + request_backoff: &'a [Duration], } pub struct TableUpdates { @@ -99,8 +134,8 @@ pub struct TableUpdates { pub removed: HashSet, } -impl Discovery { - pub fn new(key: &KeyPair, public: NodeEndpoint, ip_filter: IpFilter) -> Discovery { +impl<'a> Discovery<'a> { + pub fn new(key: &KeyPair, public: NodeEndpoint, ip_filter: IpFilter) -> Discovery<'static> { Discovery { id: key.public().clone(), id_hash: keccak(key.public()), @@ -110,86 +145,80 @@ impl Discovery { discovery_id: NodeId::new(), discovery_nodes: HashSet::new(), node_buckets: (0..ADDRESS_BITS).map(|_| NodeBucket::new()).collect(), + in_flight_requests: HashMap::new(), + expiring_pings: VecDeque::new(), + expiring_finds: VecDeque::new(), send_queue: VecDeque::new(), check_timestamps: true, adding_nodes: Vec::new(), ip_filter: ip_filter, + request_backoff: &REQUEST_BACKOFF, } } /// Add a new node to discovery table. Pings the node. pub fn add_node(&mut self, e: NodeEntry) { - if self.is_allowed(&e) { - let endpoint = e.endpoint.clone(); - self.update_node(e); - self.ping(&endpoint); + // If distance returns None, then we are trying to add ourself. + let id_hash = keccak(e.id); + if let Some(dist) = Discovery::distance(&self.id_hash, &id_hash) { + if self.node_buckets[dist].nodes.iter().any(|n| n.id_hash == id_hash) { + return; + } + self.try_ping(e); } } /// Add a list of nodes. Pings a few nodes each round pub fn add_node_list(&mut self, nodes: Vec) { - self.adding_nodes = nodes; - self.update_new_nodes(); + for node in nodes { + self.add_node(node); + } } /// Add a list of known nodes to the table. - pub fn init_node_list(&mut self, mut nodes: Vec) { - for n in nodes.drain(..) { + pub fn init_node_list(&mut self, nodes: Vec) { + for n in nodes { if self.is_allowed(&n) { self.update_node(n); } } } - fn update_node(&mut self, e: NodeEntry) { + fn update_node(&mut self, e: NodeEntry) -> Option { trace!(target: "discovery", "Inserting {:?}", &e); let id_hash = keccak(e.id); let dist = match Discovery::distance(&self.id_hash, &id_hash) { Some(dist) => dist, None => { debug!(target: "discovery", "Attempted to update own entry: {:?}", e); - return; + return None; } }; + let mut added_map = HashMap::new(); let ping = { let bucket = &mut self.node_buckets[dist]; let updated = if let Some(node) = bucket.nodes.iter_mut().find(|n| n.address.id == e.id) { node.address = e.clone(); - node.timeout = None; + node.last_seen = Instant::now(); + node.backoff_until = Instant::now(); + node.fail_count = 0; true } else { false }; if !updated { - bucket.nodes.push_front(BucketEntry { address: e, timeout: None, id_hash: id_hash, }); - } + added_map.insert(e.id, e.clone()); + bucket.nodes.push_front(BucketEntry::new(e)); - if bucket.nodes.len() > BUCKET_SIZE { - //ping least active node - let last = bucket.nodes.back_mut().expect("Last item is always present when len() > 0"); - last.timeout = Some(Instant::now()); - Some(last.address.endpoint.clone()) + if bucket.nodes.len() > BUCKET_SIZE { + select_bucket_ping(bucket.nodes.iter()) + } else { None } } else { None } }; - if let Some(endpoint) = ping { - self.ping(&endpoint); - } - } - - /// Removes the timeout of a given NodeId if it can be found in one of the discovery buckets - fn clear_ping(&mut self, id: &NodeId) { - let dist = match Discovery::distance(&self.id_hash, &keccak(id)) { - Some(dist) => dist, - None => { - debug!(target: "discovery", "Received ping from self"); - return - } - }; - - let bucket = &mut self.node_buckets[dist]; - if let Some(node) = bucket.nodes.iter_mut().find(|n| &n.address.id == id) { - node.timeout = None; + if let Some(node) = ping { + self.try_ping(node); } + Some(TableUpdates { added: added_map, removed: HashSet::new() }) } /// Starts the discovery process at round 0 @@ -201,11 +230,11 @@ impl Discovery { } fn update_new_nodes(&mut self) { - let mut count = 0usize; - while !self.adding_nodes.is_empty() && count < MAX_NODES_PING { - let node = self.adding_nodes.pop().expect("pop is always Some if not empty; qed"); - self.add_node(node); - count += 1; + while self.in_flight_requests.len() < MAX_NODES_PING { + match self.adding_nodes.pop() { + Some(next) => self.try_ping(next), + None => break, + } } } @@ -219,13 +248,17 @@ impl Discovery { { let nearest = self.nearest_node_entries(&self.discovery_id).into_iter(); let nearest = nearest.filter(|x| !self.discovery_nodes.contains(&x.id)).take(ALPHA).collect::>(); + let target = self.discovery_id.clone(); for r in nearest { - let rlp = encode_list(&(&[self.discovery_id.clone()][..])); - self.send_packet(PACKET_FIND_NODE, &r.endpoint.udp_address(), &rlp) - .unwrap_or_else(|e| warn!("Error sending node discovery packet for {:?}: {:?}", &r.endpoint, e)); - self.discovery_nodes.insert(r.id.clone()); - tried_count += 1; - trace!(target: "discovery", "Sent FindNode to {:?}", &r.endpoint); + match self.send_find_node(&r, &target) { + Ok(()) => { + self.discovery_nodes.insert(r.id.clone()); + tried_count += 1; + }, + Err(e) => { + warn!(target: "discovery", "Error sending node discovery packet for {:?}: {:?}", &r.endpoint, e); + }, + }; } } @@ -251,46 +284,71 @@ impl Discovery { None // a and b are equal, so log distance is -inf } - fn ping(&mut self, node: &NodeEndpoint) { - let mut rlp = RlpStream::new_list(3); + fn try_ping(&mut self, node: NodeEntry) { + if !self.is_allowed(&node) || + self.in_flight_requests.contains_key(&node.id) || + self.adding_nodes.iter().any(|n| n.id == node.id) + { + return; + } + + if self.in_flight_requests.len() < MAX_NODES_PING { + self.ping(&node) + .unwrap_or_else(|e| { + warn!(target: "discovery", "Error sending Ping packet: {:?}", e); + }); + } else { + self.adding_nodes.push(node); + } + } + + fn ping(&mut self, node: &NodeEntry) -> Result<(), Error> { + let mut rlp = RlpStream::new_list(4); rlp.append(&PROTOCOL_VERSION); self.public_endpoint.to_rlp_list(&mut rlp); - node.to_rlp_list(&mut rlp); - trace!(target: "discovery", "Sent Ping to {:?}", &node); - self.send_packet(PACKET_PING, &node.udp_address(), &rlp.drain()) - .unwrap_or_else(|e| warn!("Error sending Ping packet: {:?}", e)) - } - - fn send_packet(&mut self, packet_id: u8, address: &SocketAddr, payload: &[u8]) -> Result<(), Error> { - let mut rlp = RlpStream::new(); - rlp.append_raw(&[packet_id], 1); - let source = Rlp::new(payload); - rlp.begin_list(source.item_count()? + 1); - for i in 0 .. source.item_count()? { - rlp.append_raw(source.at(i)?.as_raw(), 1); - } - let timestamp = 60 + SystemTime::now().duration_since(UNIX_EPOCH).unwrap_or_default().as_secs() as u32; - rlp.append(×tamp); - - let bytes = rlp.drain(); - let hash = keccak(bytes.as_ref()); - let signature = match sign(&self.secret, &hash) { - Ok(s) => s, - Err(e) => { - warn!("Error signing UDP packet"); - return Err(Error::from(e)); - } + node.endpoint.to_rlp_list(&mut rlp); + append_expiration(&mut rlp); + let hash = self.send_packet(PACKET_PING, &node.endpoint.udp_address(), &rlp.drain())?; + + let request_info = PendingRequest { + packet_id: PACKET_PING, + sent_at: Instant::now(), + packet_hash: hash, + response_count: 0, }; - let mut packet = Bytes::with_capacity(bytes.len() + 32 + 65); - packet.extend(hash.iter()); - packet.extend(signature.iter()); - packet.extend(bytes.iter()); - let signed_hash = keccak(&packet[32..]); - packet[0..32].clone_from_slice(&signed_hash); - self.send_to(packet, address.clone()); + self.expiring_pings.push_back((node.id, request_info.sent_at)); + self.in_flight_requests.insert(node.id, request_info); + + trace!(target: "discovery", "Sent Ping to {:?}", &node.endpoint); + Ok(()) + } + + fn send_find_node(&mut self, node: &NodeEntry, target: &NodeId) -> Result<(), Error> { + let mut rlp = RlpStream::new_list(2); + rlp.append(target); + append_expiration(&mut rlp); + let hash = self.send_packet(PACKET_FIND_NODE, &node.endpoint.udp_address(), &rlp.drain())?; + + let request_info = PendingRequest { + packet_id: PACKET_FIND_NODE, + sent_at: Instant::now(), + packet_hash: hash, + response_count: 0, + }; + self.expiring_finds.push_back((node.id, request_info.sent_at)); + self.in_flight_requests.insert(node.id, request_info); + + trace!(target: "discovery", "Sent FindNode to {:?}", &node.endpoint); Ok(()) } + fn send_packet(&mut self, packet_id: u8, address: &SocketAddr, payload: &[u8]) -> Result { + let packet = assemble_packet(packet_id, payload, &self.secret)?; + let hash = H256::from(&packet[0..32]); + self.send_to(packet, address.clone()); + Ok(hash) + } + fn nearest_node_entries(&self, target: &NodeId) -> Vec { let target_hash = keccak(target); let target_distance = self.id_hash ^ target_hash; @@ -396,37 +454,57 @@ impl Discovery { let dest = NodeEndpoint::from_rlp(&rlp.at(2)?)?; let timestamp: u64 = rlp.val_at(3)?; self.check_timestamp(timestamp)?; - let mut added_map = HashMap::new(); + + let mut response = RlpStream::new_list(3); + dest.to_rlp_list(&mut response); + response.append(&echo_hash); + append_expiration(&mut response); + self.send_packet(PACKET_PONG, from, &response.drain())?; + let entry = NodeEntry { id: node.clone(), endpoint: source.clone() }; if !entry.endpoint.is_valid() { debug!(target: "discovery", "Got bad address: {:?}", entry); } else if !self.is_allowed(&entry) { debug!(target: "discovery", "Address not allowed: {:?}", entry); } else { - self.update_node(entry.clone()); - added_map.insert(node.clone(), entry); + self.add_node(entry.clone()); } - let mut response = RlpStream::new_list(2); - dest.to_rlp_list(&mut response); - response.append(&echo_hash); - self.send_packet(PACKET_PONG, from, &response.drain())?; - Ok(Some(TableUpdates { added: added_map, removed: HashSet::new() })) + Ok(None) } - fn on_pong(&mut self, rlp: &Rlp, node: &NodeId, from: &SocketAddr) -> Result, Error> { + fn on_pong(&mut self, rlp: &Rlp, node_id: &NodeId, from: &SocketAddr) -> Result, Error> { trace!(target: "discovery", "Got Pong from {:?}", &from); - // TODO: validate pong packet in rlp.val_at(1) let dest = NodeEndpoint::from_rlp(&rlp.at(0)?)?; + let echo_hash: H256 = rlp.val_at(1)?; let timestamp: u64 = rlp.val_at(2)?; self.check_timestamp(timestamp)?; - let mut entry = NodeEntry { id: node.clone(), endpoint: dest }; - if !entry.endpoint.is_valid() { - debug!(target: "discovery", "Bad address: {:?}", entry); - entry.endpoint.address = from.clone(); + let mut node = NodeEntry { id: node_id.clone(), endpoint: dest }; + if !node.endpoint.is_valid() { + debug!(target: "discovery", "Bad address: {:?}", node); + node.endpoint.address = from.clone(); + } + + let is_expected = match self.in_flight_requests.entry(*node_id) { + Entry::Occupied(entry) => { + let is_expected = { + let request = entry.get(); + request.packet_id == PACKET_PING && request.packet_hash == echo_hash + }; + if is_expected { + entry.remove(); + } + is_expected + }, + Entry::Vacant(_) => false + }; + + if is_expected { + Ok(self.update_node(node)) + } else { + debug!(target: "discovery", "Got unexpected Pong from {:?}", &from); + Ok(None) } - self.clear_ping(node); - Ok(None) } fn on_find_node(&mut self, rlp: &Rlp, _node: &NodeId, from: &SocketAddr) -> Result, Error> { @@ -450,22 +528,49 @@ impl Discovery { let limit = (MAX_DATAGRAM_SIZE - 109) / 90; let chunks = nearest.chunks(limit); let packets = chunks.map(|c| { - let mut rlp = RlpStream::new_list(1); + let mut rlp = RlpStream::new_list(2); rlp.begin_list(c.len()); for n in 0 .. c.len() { rlp.begin_list(4); c[n].endpoint.to_rlp(&mut rlp); rlp.append(&c[n].id); } + append_expiration(&mut rlp); rlp.out() }); packets.collect() } - fn on_neighbours(&mut self, rlp: &Rlp, _node: &NodeId, from: &SocketAddr) -> Result, Error> { - // TODO: validate packet - let mut added = HashMap::new(); - trace!(target: "discovery", "Got {} Neighbours from {:?}", rlp.at(0)?.item_count()?, &from); + fn on_neighbours(&mut self, rlp: &Rlp, node_id: &NodeId, from: &SocketAddr) -> Result, Error> { + let results_count = rlp.at(0)?.item_count()?; + + let is_expected = match self.in_flight_requests.entry(*node_id) { + Entry::Occupied(mut entry) => { + let result = { + let request = entry.get_mut(); + if request.packet_id == PACKET_FIND_NODE && + request.response_count + results_count <= BUCKET_SIZE + { + request.response_count += results_count; + true + } else { + false + } + }; + if entry.get().response_count == BUCKET_SIZE { + entry.remove(); + } + result + } + Entry::Vacant(_) => false, + }; + + if !is_expected { + debug!(target: "discovery", "Got unexpected Neighbors from {:?}", &from); + return Ok(None); + } + + trace!(target: "discovery", "Got {} Neighbours from {:?}", results_count, &from); for r in rlp.at(0)?.iter() { let endpoint = NodeEndpoint::from_rlp(&r)?; if !endpoint.is_valid() { @@ -481,35 +586,62 @@ impl Discovery { debug!(target: "discovery", "Address not allowed: {:?}", entry); continue; } - added.insert(node_id, entry.clone()); - self.ping(&entry.endpoint); - self.update_node(entry); + self.add_node(entry); } - Ok(Some(TableUpdates { added: added, removed: HashSet::new() })) + Ok(None) } - fn check_expired(&mut self, force: bool) -> HashSet { - let now = Instant::now(); + fn check_expired(&mut self, time: Instant) -> HashSet { let mut removed: HashSet = HashSet::new(); - for bucket in &mut self.node_buckets { - bucket.nodes.retain(|node| { - if let Some(timeout) = node.timeout { - if !force && now.duration_since(timeout) < PING_TIMEOUT { - true - } - else { - trace!(target: "discovery", "Removed expired node {:?}", &node.address); - removed.insert(node.address.id.clone()); - false - } - } else { true } - }); + while let Some((node_id, sent_at)) = self.expiring_pings.pop_front() { + if time.duration_since(sent_at) <= PING_TIMEOUT { + self.expiring_pings.push_front((node_id, sent_at)); + break; + } + self.expire_in_flight_request(node_id, sent_at, &mut removed); + } + while let Some((node_id, sent_at)) = self.expiring_finds.pop_front() { + if time.duration_since(sent_at) <= FIND_NODE_TIMEOUT { + self.expiring_finds.push_front((node_id, sent_at)); + break; + } + self.expire_in_flight_request(node_id, sent_at, &mut removed); } removed } + fn expire_in_flight_request(&mut self, node_id: NodeId, sent_at: Instant, removed: &mut HashSet) { + if let Entry::Occupied(entry) = self.in_flight_requests.entry(node_id) { + if entry.get().sent_at == sent_at { + entry.remove(); + + // Attempt to remove from bucket if in one. + let id_hash = keccak(&node_id); + let dist = Discovery::distance(&self.id_hash, &id_hash) + .expect("distance is None only if id hashes are equal; will never send request to self; qed"); + let bucket = &mut self.node_buckets[dist]; + if let Some(index) = bucket.nodes.iter().position(|n| n.id_hash == id_hash) { + if bucket.nodes[index].fail_count < self.request_backoff.len() { + let node = &mut bucket.nodes[index]; + node.backoff_until = Instant::now() + self.request_backoff[node.fail_count]; + node.fail_count += 1; + trace!( + target: "discovery", + "Requests to node {:?} timed out {} consecutive time(s)", + &node.address, node.fail_count + ); + } else { + removed.insert(node_id); + let node = bucket.nodes.remove(index).expect("index was located in if condition"); + debug!(target: "discovery", "Removed expired node {:?}", &node.address); + } + } + } + } + } + pub fn round(&mut self) -> Option { - let removed = self.check_expired(false); + let removed = self.check_expired(Instant::now()); self.discover(); if !removed.is_empty() { Some(TableUpdates { added: HashMap::new(), removed: removed }) @@ -533,10 +665,48 @@ impl Discovery { } } +fn append_expiration(rlp: &mut RlpStream) { + let expiry = SystemTime::now() + EXPIRY_TIME; + let timestamp = expiry.duration_since(UNIX_EPOCH).unwrap_or_default().as_secs() as u32; + rlp.append(×tamp); +} + +fn assemble_packet(packet_id: u8, bytes: &[u8], secret: &Secret) -> Result { + let mut packet = Bytes::with_capacity(bytes.len() + 32 + 65 + 1); + packet.resize(32 + 65, 0); // Filled in below + packet.push(packet_id); + packet.extend_from_slice(bytes); + + let hash = keccak(&packet[(32 + 65)..]); + let signature = match sign(secret, &hash) { + Ok(s) => s, + Err(e) => { + warn!(target: "discovery", "Error signing UDP packet"); + return Err(Error::from(e)); + } + }; + packet[32..(32 + 65)].copy_from_slice(&signature[..]); + let signed_hash = keccak(&packet[32..]); + packet[0..32].copy_from_slice(&signed_hash); + Ok(packet) +} + +// Selects the next node in a bucket to ping. Chooses the eligible node least recently seen. +fn select_bucket_ping<'a, I>(nodes: I) -> Option +where + I: Iterator +{ + let now = Instant::now(); + nodes + .filter(|n| n.backoff_until < now) + .min_by_key(|n| n.last_seen) + .map(|n| n.address.clone()) +} + #[cfg(test)] mod tests { use super::*; - use std::net::{SocketAddr}; + use std::net::{IpAddr,Ipv4Addr}; use node_table::{Node, NodeId, NodeEndpoint}; use std::str::FromStr; @@ -560,50 +730,151 @@ mod tests { assert!(packets.last().unwrap().len() > 0); } + #[test] + fn ping_queue() { + let key = Random.generate().unwrap(); + let ep = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40445").unwrap(), udp_port: 40445 }; + let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); + + for i in 1..(MAX_NODES_PING+1) { + discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); + assert_eq!(discovery.in_flight_requests.len(), i); + assert_eq!(discovery.send_queue.len(), i); + assert_eq!(discovery.adding_nodes.len(), 0); + } + for i in 1..20 { + discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); + assert_eq!(discovery.in_flight_requests.len(), MAX_NODES_PING); + assert_eq!(discovery.send_queue.len(), MAX_NODES_PING); + assert_eq!(discovery.adding_nodes.len(), i); + } + } + #[test] fn discovery() { - let key1 = Random.generate().unwrap(); - let key2 = Random.generate().unwrap(); - let ep1 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40444").unwrap(), udp_port: 40444 }; - let ep2 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40445").unwrap(), udp_port: 40445 }; - let mut discovery1 = Discovery::new(&key1, ep1.clone(), IpFilter::default()); - let mut discovery2 = Discovery::new(&key2, ep2.clone(), IpFilter::default()); + let mut discovery_handlers = (0..5).map(|i| { + let key = Random.generate().unwrap(); + let ep = NodeEndpoint { + address: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 41000 + i), + udp_port: 41000 + i, + }; + Discovery::new(&key, ep, IpFilter::default()) + }) + .collect::>(); - let node1 = Node::from_str("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@127.0.0.1:7770").unwrap(); - let node2 = Node::from_str("enode://b979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@127.0.0.1:7771").unwrap(); - discovery1.add_node(NodeEntry { id: node1.id.clone(), endpoint: node1.endpoint.clone() }); - discovery1.add_node(NodeEntry { id: node2.id.clone(), endpoint: node2.endpoint.clone() }); + // Sort inversely by XOR distance to the 0 hash. + discovery_handlers.sort_by(|a, b| b.id_hash.cmp(&a.id_hash)); - discovery2.add_node(NodeEntry { id: key1.public().clone(), endpoint: ep1.clone() }); - discovery2.refresh(); + // Initialize the routing table of each with the next one in order. + for i in 0 .. 5 { + let node = NodeEntry { + id: discovery_handlers[(i + 1) % 5].id, + endpoint: discovery_handlers[(i + 1) % 5].public_endpoint.clone(), + }; + discovery_handlers[i].update_node(node); + } - for _ in 0 .. 10 { - while let Some(datagram) = discovery1.dequeue_send() { - if datagram.address == ep2.address { - discovery2.on_packet(&datagram.payload, ep1.address.clone()).ok(); - } - } - while let Some(datagram) = discovery2.dequeue_send() { - if datagram.address == ep1.address { - discovery1.on_packet(&datagram.payload, ep2.address.clone()).ok(); + // After 4 discovery rounds, the first one should have learned about the rest. + for _round in 0 .. 4 { + discovery_handlers[0].round(); + + let mut continue_loop = true; + while continue_loop { + continue_loop = false; + + // Process all queued messages. + for i in 0 .. 5 { + let src = discovery_handlers[i].public_endpoint.address.clone(); + while let Some(datagram) = discovery_handlers[i].dequeue_send() { + let dest = discovery_handlers.iter_mut() + .find(|disc| datagram.address == disc.public_endpoint.address) + .unwrap(); + dest.on_packet(&datagram.payload, src).ok(); + + continue_loop = true; + } } } - discovery2.round(); } - assert_eq!(discovery2.nearest_node_entries(&NodeId::new()).len(), 3) + + let results = discovery_handlers[0].nearest_node_entries(&NodeId::new()); + assert_eq!(results.len(), 4); } #[test] fn removes_expired() { let key = Random.generate().unwrap(); let ep = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40446").unwrap(), udp_port: 40447 }; - let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); - for _ in 0..1200 { + let discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); + + let mut discovery = Discovery { request_backoff: &[], ..discovery }; + + let total_bucket_nodes = |node_buckets: &Vec| -> usize { + node_buckets.iter().map(|bucket| bucket.nodes.len()).sum() + }; + + let node_entries = (0..1200) + .map(|_| NodeEntry { id: NodeId::random(), endpoint: ep.clone() }) + .collect::>(); + + discovery.init_node_list(node_entries.clone()); + assert_eq!(total_bucket_nodes(&discovery.node_buckets), 1200); + + // Requests have not expired yet. + let removed = discovery.check_expired(Instant::now()).len(); + assert_eq!(removed, 0); + + // Expiring pings to bucket nodes removes them from bucket. + let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + assert!(removed > 0); + assert_eq!(total_bucket_nodes(&discovery.node_buckets), 1200 - removed); + + for _ in 0..100 { discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() }); } - assert!(discovery.nearest_node_entries(&NodeId::new()).len() <= 16); - let removed = discovery.check_expired(true).len(); + assert!(discovery.in_flight_requests.len() > 0); + + // Expire pings to nodes that are not in buckets. + let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + assert_eq!(removed, 0); + assert_eq!(discovery.in_flight_requests.len(), 0); + + let from = SocketAddr::from_str("99.99.99.99:40445").unwrap(); + + // FIND_NODE times out because it doesn't receive k results. + let key = Random.generate().unwrap(); + discovery.send_find_node(&node_entries[100], key.public()).unwrap(); + for payload in Discovery::prepare_neighbours_packets(&node_entries[101..116]) { + let packet = assemble_packet(PACKET_NEIGHBOURS, &payload, &key.secret()).unwrap(); + discovery.on_packet(&packet, from.clone()).unwrap(); + } + + let removed = discovery.check_expired(Instant::now() + FIND_NODE_TIMEOUT).len(); assert!(removed > 0); + + // FIND_NODE does not time out because it receives k results. + discovery.send_find_node(&node_entries[100], key.public()).unwrap(); + for payload in Discovery::prepare_neighbours_packets(&node_entries[101..117]) { + let packet = assemble_packet(PACKET_NEIGHBOURS, &payload, &key.secret()).unwrap(); + discovery.on_packet(&packet, from.clone()).unwrap(); + } + + let removed = discovery.check_expired(Instant::now() + FIND_NODE_TIMEOUT).len(); + assert_eq!(removed, 0); + + // Test bucket evictions with retries. + let request_backoff = [Duration::new(0, 0); 2]; + let mut discovery = Discovery { request_backoff: &request_backoff, ..discovery }; + + for _ in 0..2 { + discovery.ping(&node_entries[101]).unwrap(); + let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + assert_eq!(removed, 0); + } + + discovery.ping(&node_entries[101]).unwrap(); + let removed = discovery.check_expired(Instant::now() + PING_TIMEOUT).len(); + assert_eq!(removed, 1); } #[test] @@ -615,11 +886,8 @@ mod tests { let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); for _ in 0..(16 + 10) { - discovery.node_buckets[0].nodes.push_back(BucketEntry { - address: NodeEntry { id: NodeId::new(), endpoint: ep.clone() }, - timeout: None, - id_hash: keccak(NodeId::new()), - }); + let entry = BucketEntry::new(NodeEntry { id: NodeId::new(), endpoint: ep.clone() }); + discovery.node_buckets[0].nodes.push_back(entry); } let nearest = discovery.nearest_node_entries(&NodeId::new()); assert_eq!(nearest.len(), 16) @@ -674,7 +942,7 @@ mod tests { .unwrap(); let mut discovery = Discovery::new(&key, ep.clone(), IpFilter::default()); - node_entries.iter().for_each(|entry| discovery.update_node(entry.clone())); + discovery.init_node_list(node_entries.clone()); let expected_bucket_sizes = vec![ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -782,17 +1050,70 @@ mod tests { fn test_ping() { let key1 = Random.generate().unwrap(); let key2 = Random.generate().unwrap(); + let key3 = Random.generate().unwrap(); let ep1 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40344").unwrap(), udp_port: 40344 }; let ep2 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40345").unwrap(), udp_port: 40345 }; + let ep3 = NodeEndpoint { address: SocketAddr::from_str("127.0.0.1:40346").unwrap(), udp_port: 40345 }; let mut discovery1 = Discovery::new(&key1, ep1.clone(), IpFilter::default()); let mut discovery2 = Discovery::new(&key2, ep2.clone(), IpFilter::default()); - discovery1.ping(&ep2); + discovery1.ping(&NodeEntry { id: discovery2.id, endpoint: ep2.clone() }).unwrap(); let ping_data = discovery1.dequeue_send().unwrap(); - discovery2.on_packet(&ping_data.payload, ep1.address.clone()).ok(); + assert!(!discovery1.any_sends_queued()); + let data = &ping_data.payload[(32 + 65)..]; + assert_eq!(data[0], PACKET_PING); + let rlp = Rlp::new(&data[1..]); + assert_eq!(ep1, NodeEndpoint::from_rlp(&rlp.at(1).unwrap()).unwrap()); + assert_eq!(ep2, NodeEndpoint::from_rlp(&rlp.at(2).unwrap()).unwrap()); + + if let Some(_) = discovery2.on_packet(&ping_data.payload, ep1.address.clone()).unwrap() { + panic!("Expected no changes to discovery2's table"); + } let pong_data = discovery2.dequeue_send().unwrap(); let data = &pong_data.payload[(32 + 65)..]; + assert_eq!(data[0], PACKET_PONG); let rlp = Rlp::new(&data[1..]); - assert_eq!(ping_data.payload[0..32], rlp.val_at::>(1).unwrap()[..]) + assert_eq!(ping_data.payload[0..32], rlp.val_at::>(1).unwrap()[..]); + + // Create a pong packet with incorrect echo hash and assert that it is rejected. + let mut incorrect_pong_rlp = RlpStream::new_list(3); + ep1.to_rlp_list(&mut incorrect_pong_rlp); + incorrect_pong_rlp.append(&H256::default()); + append_expiration(&mut incorrect_pong_rlp); + let incorrect_pong_data = assemble_packet( + PACKET_PONG, &incorrect_pong_rlp.drain(), &discovery2.secret + ).unwrap(); + if let Some(_) = discovery1.on_packet(&incorrect_pong_data, ep2.address.clone()).unwrap() { + panic!("Expected no changes to discovery1's table because pong hash is incorrect"); + } + + // Delivery of valid pong response should add to routing table. + if let Some(table_updates) = discovery1.on_packet(&pong_data.payload, ep2.address.clone()).unwrap() { + assert_eq!(table_updates.added.len(), 1); + assert_eq!(table_updates.removed.len(), 0); + assert!(table_updates.added.contains_key(&discovery2.id)); + } else { + panic!("Expected discovery1 to be added to discovery1's table"); + } + + let ping_back = discovery2.dequeue_send().unwrap(); + assert!(!discovery2.any_sends_queued()); + let data = &ping_back.payload[(32 + 65)..]; + assert_eq!(data[0], PACKET_PING); + let rlp = Rlp::new(&data[1..]); + assert_eq!(ep2, NodeEndpoint::from_rlp(&rlp.at(1).unwrap()).unwrap()); + assert_eq!(ep1, NodeEndpoint::from_rlp(&rlp.at(2).unwrap()).unwrap()); + + // Deliver an unexpected PONG message to discover1. + let mut unexpected_pong_rlp = RlpStream::new_list(3); + ep3.to_rlp_list(&mut unexpected_pong_rlp); + unexpected_pong_rlp.append(&H256::default()); + append_expiration(&mut unexpected_pong_rlp); + let unexpected_pong = assemble_packet( + PACKET_PONG, &unexpected_pong_rlp.drain(), key3.secret() + ).unwrap(); + if let Some(_) = discovery1.on_packet(&unexpected_pong, ep3.address.clone()).unwrap() { + panic!("Expected no changes to discovery1's table for unexpected pong"); + } } } diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index 0fbd64b420..28d6620bc1 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -243,7 +243,7 @@ pub struct Host { udp_socket: Mutex>, tcp_listener: Mutex, sessions: Arc>>, - discovery: Mutex>, + discovery: Mutex>>, nodes: RwLock, handlers: RwLock>>, timers: RwLock>, diff --git a/util/network-devp2p/src/node_table.rs b/util/network-devp2p/src/node_table.rs index 087caefe18..2640cec796 100644 --- a/util/network-devp2p/src/node_table.rs +++ b/util/network-devp2p/src/node_table.rs @@ -33,7 +33,7 @@ use rand::{self, Rng}; /// Node public key pub type NodeId = H512; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] /// Node address info pub struct NodeEndpoint { /// IP(V4 or V6) address -- GitLab From acae643a4a77828dc009a4bc8140a5597fe857ad Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 12 Jul 2018 13:45:02 +0200 Subject: [PATCH 130/191] Revert "Replace `std::env::home_dir` with `dirs::home_dir` (#9077)" (#9097) * Revert "Replace `std::env::home_dir` with `dirs::home_dir` (#9077)" This reverts commit 7e779327ebad5a60e068f39c60bcf944f3c99114. * Restore some of the changes * Update parity-common --- Cargo.lock | 46 ++++++++++++++--------------------------- parity/upgrade.rs | 7 ++++--- util/dir/Cargo.toml | 1 - util/dir/src/helpers.rs | 3 ++- util/dir/src/lib.rs | 19 +++++++---------- 5 files changed, 30 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c5c31de34..d34c24ea91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -351,20 +351,10 @@ name = "dir" version = "0.1.1" dependencies = [ "app_dirs 1.2.1 (git+https://github.com/paritytech/app-dirs-rs)", - "dirs 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "journaldb 0.2.0", ] -[[package]] -name = "dirs" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "docopt" version = "0.8.3" @@ -1173,7 +1163,7 @@ dependencies = [ [[package]] name = "hashdb" version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1437,7 +1427,7 @@ dependencies = [ [[package]] name = "keccak-hash" version = "0.1.2" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1465,7 +1455,7 @@ dependencies = [ [[package]] name = "kvdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", @@ -1474,7 +1464,7 @@ dependencies = [ [[package]] name = "kvdb-memorydb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1483,7 +1473,7 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1654,7 +1644,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memorydb" version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.0 (git+https://github.com/paritytech/parity-common)", @@ -1855,7 +1845,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1951,7 +1941,7 @@ dependencies = [ [[package]] name = "parity-bytes" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" [[package]] name = "parity-clib" @@ -1963,7 +1953,7 @@ dependencies = [ [[package]] name = "parity-crypto" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2328,15 +2318,12 @@ dependencies = [ [[package]] name = "path" version = "0.1.1" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" -dependencies = [ - "dirs 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" [[package]] name = "patricia-trie" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.0 (git+https://github.com/paritytech/parity-common)", @@ -2411,7 +2398,7 @@ dependencies = [ [[package]] name = "plain_hasher" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2579,7 +2566,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2647,7 +2634,7 @@ dependencies = [ [[package]] name = "rlp" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3324,7 +3311,7 @@ dependencies = [ [[package]] name = "trie-standardmap" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (git+https://github.com/paritytech/parity-common)", @@ -3335,7 +3322,7 @@ dependencies = [ [[package]] name = "triehash" version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common#a72c34f82ff7ccc0f49827bb7f8c5d1fbff794bb" +source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3668,7 +3655,6 @@ dependencies = [ "checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" "checksum daemonize 0.2.3 (git+https://github.com/paritytech/daemonize)" = "" "checksum difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3304d19798a8e067e48d8e69b2c37f0b5e9b4e462504ad9e27e9f3fce02bba8" -"checksum dirs 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37a76dd8b997af7107d0bb69d43903cf37153a18266f8b3fdb9911f28efb5444" "checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" "checksum edit-distance 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6a34f5204fbc13582de418611cf3a7dcdd07c6d312a5b631597ba72c06b9d9c9" diff --git a/parity/upgrade.rs b/parity/upgrade.rs index 95fa8de823..d98123ce13 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -17,12 +17,13 @@ //! Parity upgrade logic use semver::{Version, SemVerError}; -use std::collections::HashMap; +use std::collections::*; use std::fs::{self, File, create_dir_all}; +use std::env; use std::io; use std::io::{Read, Write}; use std::path::{PathBuf, Path}; -use dir::{DatabaseDirectories, default_data_path, home_dir}; +use dir::{DatabaseDirectories, default_data_path}; use dir::helpers::replace_home; use journaldb::Algorithm; @@ -105,7 +106,7 @@ fn with_locked_version(db_path: Option<&str>, script: F) -> Result Result { let mut path = db_path.map_or({ - let mut path = home_dir().expect("Applications should have a home dir"); + let mut path = env::home_dir().expect("Applications should have a home dir"); path.push(".parity"); path }, PathBuf::from); diff --git a/util/dir/Cargo.toml b/util/dir/Cargo.toml index bdaea99109..092d454084 100644 --- a/util/dir/Cargo.toml +++ b/util/dir/Cargo.toml @@ -8,4 +8,3 @@ license = "GPL3" ethereum-types = "0.3" journaldb = { path = "../journaldb" } app_dirs = { git = "https://github.com/paritytech/app-dirs-rs" } -dirs = "1.0.2" diff --git a/util/dir/src/helpers.rs b/util/dir/src/helpers.rs index 8e703206b7..820b9dc5af 100644 --- a/util/dir/src/helpers.rs +++ b/util/dir/src/helpers.rs @@ -15,11 +15,12 @@ // along with Parity. If not, see . //! Directory helper functions +use std::env; /// Replaces `$HOME` str with home directory path. 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", ::dirs::home_dir().unwrap().to_str().unwrap()); + let r = arg.replace("$HOME", env::home_dir().unwrap().to_str().unwrap()); let r = r.replace("$BASE", base); r.replace("/", &::std::path::MAIN_SEPARATOR.to_string()) } diff --git a/util/dir/src/lib.rs b/util/dir/src/lib.rs index bc89c5f147..aac672b1f2 100644 --- a/util/dir/src/lib.rs +++ b/util/dir/src/lib.rs @@ -18,12 +18,11 @@ //! Dir utilities for platform-specific operations extern crate app_dirs; -extern crate dirs; extern crate ethereum_types; extern crate journaldb; pub mod helpers; -use std::fs; +use std::{env, fs}; use std::path::{PathBuf, Path}; use ethereum_types::{H64, H256}; use journaldb::Algorithm; @@ -32,8 +31,6 @@ use app_dirs::{AppInfo, get_app_root, AppDataType}; // re-export platform-specific functions use platform::*; -pub use dirs::home_dir; - /// Platform-specific chains path for standard client - Windows only #[cfg(target_os = "windows")] pub const CHAINS_PATH: &str = "$LOCAL/chains"; /// Platform-specific chains path for light client - Windows only @@ -240,7 +237,7 @@ pub fn default_hypervisor_path() -> PathBuf { /// Get home directory. fn home() -> PathBuf { - dirs::home_dir().expect("Failed to get home dir") + env::home_dir().expect("Failed to get home dir") } /// Geth path @@ -263,9 +260,9 @@ pub fn parity(chain: &str) -> PathBuf { #[cfg(target_os = "macos")] mod platform { use std::path::PathBuf; - pub const AUTHOR: &'static str = "Parity"; - pub const PRODUCT: &'static str = "io.parity.ethereum"; - pub const PRODUCT_HYPERVISOR: &'static str = "io.parity.ethereum-updates"; + pub const AUTHOR: &str = "Parity"; + pub const PRODUCT: &str = "io.parity.ethereum"; + pub const PRODUCT_HYPERVISOR: &str = "io.parity.ethereum-updates"; pub fn parity_base() -> PathBuf { let mut home = super::home(); @@ -287,9 +284,9 @@ mod platform { #[cfg(windows)] mod platform { use std::path::PathBuf; - pub const AUTHOR: &'static str = "Parity"; - pub const PRODUCT: &'static str = "Ethereum"; - pub const PRODUCT_HYPERVISOR: &'static str = "EthereumUpdates"; + pub const AUTHOR: &str = "Parity"; + pub const PRODUCT: &str = "Ethereum"; + pub const PRODUCT_HYPERVISOR: &str = "EthereumUpdates"; pub fn parity_base() -> PathBuf { let mut home = super::home(); -- GitLab From bab85dd78933edd9dde66ef67f10b36136683cd3 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Thu, 12 Jul 2018 18:55:14 +0200 Subject: [PATCH 131/191] Update README.md (#9084) * Update README.md * rename parity client * docs: remove UI stuff from readme. * docs: add changelog link to readme --- README.md | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 95e5ba2ed2..49a5f23389 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Parity - fast, light, and robust Ethereum client +## Parity-Ethereum - a fast, light, and robust EVM and WASM blockchain client -## [» Download the latest release «](https://github.com/paritytech/parity/releases/latest) +### [» Download the latest release «](https://github.com/paritytech/parity/releases/latest) [![build status](https://gitlab.parity.io/parity/parity/badges/master/build.svg)](https://gitlab.parity.io/parity/parity/commits/master) [![codecov](https://codecov.io/gh/paritytech/parity/branch/master/graph/badge.svg)](https://codecov.io/gh/paritytech/parity) @@ -23,52 +23,50 @@ Official website: https://parity.io | Be sure to check out [our wiki](https://wi ---- -## About Parity +## About Parity-Ethereum -Parity's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity using the sophisticated and cutting-edge Rust programming language. Parity is licensed under the GPLv3, and can be used for all your Ethereum needs. +Parity-Ethereum's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity-Ethereum using the sophisticated and cutting-edge Rust programming language. Parity-Ethereum is licensed under the GPLv3, and can be used for all your Ethereum needs. -From Parity Ethereum client version 1.10.0, the User Interface (UI) is accessible in a separate application called Parity UI. To keep using the UI in the browser (deprecated), [follow these steps](https://wiki.parity.io/FAQ-Basic-Operations,-Configuration,-and-Synchronization#the-parity-ui-application-isnt-working-the-way-i-want). +By default, Parity-Ethereum will run a JSON-RPC HTTP server on `127.0.0.1:8545` and a Web-Sockets server on `127.0.0.1:8546`. This is fully configurable and supports a number of APIs. -By default, Parity will also run a JSONRPC server on `127.0.0.1:8545` and a websockets server on `127.0.0.1:8546`. This is fully configurable and supports a number of APIs. +If you run into problems while using Parity-Ethereum, feel free to file an issue in this repository or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.md](SECURITY.md). -If you run into an issue while using Parity, feel free to file one in this repository or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.MD](SECURITY.md). - -Parity's current beta-release is 1.11. You can download it at https://github.com/paritytech/parity/releases or follow the instructions below to build from source. +Parity-Ethereum's current beta-release is 2.0. You can download it at [the releases page](https://github.com/paritytech/parity/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions. ---- ## Build dependencies -**Parity requires Rust version 1.26.0 to build** +**Parity-Ethereum requires Rust version 1.27.0 to build** We recommend installing Rust through [rustup](https://www.rustup.rs/). If you don't already have rustup, you can install it like this: - Linux: - ```bash - $ curl https://sh.rustup.rs -sSf | sh - ``` + ```bash + $ curl https://sh.rustup.rs -sSf | sh + ``` - Parity also requires `gcc`, `g++`, `libssl-dev`/`openssl`, `libudev-dev`, `pkg-config`, `file` and `make` packages to be installed. + Parity-Ethereum also requires `gcc`, `g++`, `libudev-dev`, `pkg-config`, `file`, `make`, and `cmake` packages to be installed. - OSX: - ```bash - $ curl https://sh.rustup.rs -sSf | sh - ``` + ```bash + $ curl https://sh.rustup.rs -sSf | sh + ``` - `clang` is required. It comes with Xcode command line tools or can be installed with homebrew. + `clang` is required. It comes with Xcode command line tools or can be installed with homebrew. - Windows Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the rustup installer from - https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the msvc toolchain: + https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the msvc toolchain: ```bash - $ rustup default stable-x86_64-pc-windows-msvc + $ rustup default stable-x86_64-pc-windows-msvc ``` Once you have rustup installed, then you need to install: * [Perl](https://www.perl.org) * [Yasm](http://yasm.tortall.net) -Make sure that these binaries are in your `PATH`. After that you should be able to build parity from source. +Make sure that these binaries are in your `PATH`. After that you should be able to build Parity-Ethereum from source. ---- @@ -97,12 +95,12 @@ sudo snap install parity --edge ## Build from source ```bash -# download Parity code +# download Parity-Ethereum code $ git clone https://github.com/paritytech/parity $ cd parity # build in release mode -$ cargo build --release +$ cargo build --release --features final ``` This will produce an executable in the `./target/release` subdirectory. @@ -147,22 +145,22 @@ The one-line installer always defaults to the latest beta release. To install a bash <(curl https://get.parity.io -L) -r stable ``` -## Start Parity +## Start Parity-Ethereum ### Manually -To start Parity manually, just run +To start Parity-Ethereum manually, just run ```bash $ ./target/release/parity ``` -and Parity will begin syncing the Ethereum blockchain. +and Parity-Ethereum will begin syncing the Ethereum blockchain. ### Using systemd service file -To start Parity as a regular user using systemd init: +To start Parity-Ethereum as a regular user using systemd init: 1. Copy `./scripts/parity.service` to your systemd user directory (usually `~/.config/systemd/user`). -2. To configure Parity, write a `/etc/parity/config.toml` config file, see [Configuring Parity](https://paritytech.github.io/wiki/Configuring-Parity) for details. +2. To configure Parity-Ethereum, write a `/etc/parity/config.toml` config file, see [Configuring Parity-Ethereum](https://paritytech.github.io/wiki/Configuring-Parity) for details. -- GitLab From ab330301eb7f53be8cb710abd05073ddc8503c11 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 13 Jul 2018 11:04:09 +0200 Subject: [PATCH 132/191] Update hidapi, fixes #7542 (#9108) --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d34c24ea91..330a3ea569 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1193,7 +1193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hidapi" version = "0.3.1" -source = "git+https://github.com/paritytech/hidapi-rs#70ec4bd1b755ec5dd32ad2be0c8345864147c8bc" +source = "git+https://github.com/paritytech/hidapi-rs#d4d323767d6f27cf5a3d73fbae0b0f2134d579bf" dependencies = [ "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1845,7 +1845,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2566,7 +2566,7 @@ dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -- GitLab From 993650f3d63c04fe2f636bfaeeb02cfa301e3c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 13 Jul 2018 11:09:41 +0100 Subject: [PATCH 133/191] docker: add cmake dependency (#9111) --- docker/alpine/Dockerfile | 2 +- docker/centos/Dockerfile | 2 +- docker/hub/Dockerfile | 1 + docker/ubuntu-aarch64/Dockerfile | 2 +- docker/ubuntu-arm/Dockerfile | 2 +- docker/ubuntu/Dockerfile | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index 4d08afd3f8..ad375e5a91 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /build # install tools and dependencies RUN apk add --no-cache gcc musl-dev pkgconfig g++ make curl \ eudev-dev rust cargo git file binutils \ - libusb-dev linux-headers perl + libusb-dev linux-headers perl cmake # show backtraces ENV RUST_BACKTRACE 1 diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile index 747a227c90..7c944001e2 100644 --- a/docker/centos/Dockerfile +++ b/docker/centos/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /build # install tools and dependencies RUN yum -y update&& \ - yum install -y git make gcc-c++ gcc file binutils + yum install -y git make gcc-c++ gcc file binutils cmake # install rustup RUN curl -sSf https://static.rust-lang.org/rustup.sh -o rustup.sh &&\ diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index 71655036e0..c6d812446b 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -13,6 +13,7 @@ RUN apt-get update && \ # add-apt-repository software-properties-common \ make \ + cmake \ curl \ wget \ git \ diff --git a/docker/ubuntu-aarch64/Dockerfile b/docker/ubuntu-aarch64/Dockerfile index eee1587f4f..5eefe3dbdb 100644 --- a/docker/ubuntu-aarch64/Dockerfile +++ b/docker/ubuntu-aarch64/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get -y update && \ apt-get install -y --force-yes --no-install-recommends \ curl git make g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ libc6-arm64-cross libc6-dev-arm64-cross wget file ca-certificates \ - binutils-aarch64-linux-gnu \ + binutils-aarch64-linux-gnu cmake \ && \ apt-get clean diff --git a/docker/ubuntu-arm/Dockerfile b/docker/ubuntu-arm/Dockerfile index f971c98f17..d924a20f57 100644 --- a/docker/ubuntu-arm/Dockerfile +++ b/docker/ubuntu-arm/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get -y update && \ apt-get install -y --force-yes --no-install-recommends \ curl git make g++ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ libc6-dev-armhf-cross wget file ca-certificates \ - binutils-arm-linux-gnueabihf \ + binutils-arm-linux-gnueabihf cmake \ && \ apt-get clean diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile index e840cdc6e1..83bf1567a4 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update && \ apt-get install -y \ g++ \ build-essential \ + cmake \ curl \ git \ file \ -- GitLab From 5f523f69660510bf3ce43d08657ec5ad9082e033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 13 Jul 2018 12:23:57 +0200 Subject: [PATCH 134/191] Offload cull to IoWorker. (#9099) --- ethcore/service/src/service.rs | 1 + ethcore/src/client/client.rs | 23 +++++++++++------ ethcore/src/miner/miner.rs | 44 +++++++++++++++++++++++++++++--- ethcore/src/miner/pool_client.rs | 13 ++++++---- parity/run.rs | 3 ++- 5 files changed, 67 insertions(+), 17 deletions(-) diff --git a/ethcore/service/src/service.rs b/ethcore/service/src/service.rs index 50735612e2..81997be079 100644 --- a/ethcore/service/src/service.rs +++ b/ethcore/service/src/service.rs @@ -94,6 +94,7 @@ impl ClientService { let pruning = config.pruning; let client = Client::new(config, &spec, blockchain_db.clone(), miner.clone(), io_service.channel())?; + miner.set_io_channel(io_service.channel()); let snapshot_params = SnapServiceParams { engine: spec.engine.clone(), diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index c3338ce211..3eb0a7815f 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -200,7 +200,7 @@ pub struct Client { /// Flag changed by `sleep` and `wake_up` methods. Not to be confused with `enabled`. liveness: AtomicBool, - io_channel: Mutex>, + io_channel: RwLock>, /// List of actors to be notified on certain chain events notify: RwLock>>, @@ -761,7 +761,7 @@ impl Client { db: RwLock::new(db.clone()), state_db: RwLock::new(state_db), report: RwLock::new(Default::default()), - io_channel: Mutex::new(message_channel), + io_channel: RwLock::new(message_channel), notify: RwLock::new(Vec::new()), queue_transactions: IoChannelQueue::new(config.transaction_verification_queue_size), queue_ancient_blocks: IoChannelQueue::new(MAX_ANCIENT_BLOCKS_QUEUE_SIZE), @@ -995,7 +995,7 @@ impl Client { /// Replace io channel. Useful for testing. pub fn set_io_channel(&self, io_channel: IoChannel) { - *self.io_channel.lock() = io_channel; + *self.io_channel.write() = io_channel; } /// Get a copy of the best block's state. @@ -2011,7 +2011,7 @@ impl IoClient for Client { fn queue_transactions(&self, transactions: Vec, peer_id: usize) { trace_time!("queue_transactions"); let len = transactions.len(); - self.queue_transactions.queue(&mut self.io_channel.lock(), len, move |client| { + self.queue_transactions.queue(&self.io_channel.read(), len, move |client| { trace_time!("import_queued_transactions"); let txs: Vec = transactions @@ -2060,7 +2060,7 @@ impl IoClient for Client { let queued = self.queued_ancient_blocks.clone(); let lock = self.ancient_blocks_import_lock.clone(); - match self.queue_ancient_blocks.queue(&mut self.io_channel.lock(), 1, move |client| { + match self.queue_ancient_blocks.queue(&self.io_channel.read(), 1, move |client| { trace_time!("import_ancient_block"); // Make sure to hold the lock here to prevent importing out of order. // We use separate lock, cause we don't want to block queueing. @@ -2092,7 +2092,7 @@ impl IoClient for Client { } fn queue_consensus_message(&self, message: Bytes) { - match self.queue_consensus_message.queue(&mut self.io_channel.lock(), 1, move |client| { + match self.queue_consensus_message.queue(&self.io_channel.read(), 1, move |client| { if let Err(e) = client.engine().handle_message(&message) { debug!(target: "poa", "Invalid message received: {}", e); } @@ -2202,7 +2202,14 @@ impl ImportSealedBlock for Client { route }; let route = ChainRoute::from([route].as_ref()); - self.importer.miner.chain_new_blocks(self, &[h.clone()], &[], route.enacted(), route.retracted(), self.engine.seals_internally().is_some()); + self.importer.miner.chain_new_blocks( + self, + &[h.clone()], + &[], + route.enacted(), + route.retracted(), + self.engine.seals_internally().is_some(), + ); self.notify(|notify| { notify.new_blocks( vec![h.clone()], @@ -2526,7 +2533,7 @@ impl IoChannelQueue { } } - pub fn queue(&self, channel: &mut IoChannel, count: usize, fun: F) -> Result<(), QueueError> where + pub fn queue(&self, channel: &IoChannel, count: usize, fun: F) -> Result<(), QueueError> where F: Fn(&Client) + Send + Sync + 'static, { let queue_size = self.currently_queued.load(AtomicOrdering::Relaxed); diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index d196dc2f08..8ff29848c8 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -28,6 +28,7 @@ use ethcore_miner::pool::{self, TransactionQueue, VerifiedTransaction, QueueStat #[cfg(feature = "work-notify")] use ethcore_miner::work_notify::NotifyWork; use ethereum_types::{H256, U256, Address}; +use io::IoChannel; use parking_lot::{Mutex, RwLock}; use rayon::prelude::*; use transaction::{ @@ -44,7 +45,7 @@ use block::{ClosedBlock, IsBlock, Block, SealedBlock}; use client::{ BlockChain, ChainInfo, CallContract, BlockProducer, SealedBlockImporter, Nonce }; -use client::BlockId; +use client::{BlockId, ClientIoMessage}; use executive::contract_address; use header::{Header, BlockNumber}; use miner; @@ -211,6 +212,7 @@ pub struct Miner { transaction_queue: Arc, engine: Arc, accounts: Option>, + io_channel: RwLock>>, } impl Miner { @@ -227,7 +229,12 @@ impl Miner { } /// Creates new instance of miner Arc. - pub fn new(options: MinerOptions, gas_pricer: GasPricer, spec: &Spec, accounts: Option>) -> Self { + pub fn new( + options: MinerOptions, + gas_pricer: GasPricer, + spec: &Spec, + accounts: Option>, + ) -> Self { let limits = options.pool_limits.clone(); let verifier_options = options.pool_verification_options.clone(); let tx_queue_strategy = options.tx_queue_strategy; @@ -251,6 +258,7 @@ impl Miner { transaction_queue: Arc::new(TransactionQueue::new(limits, verifier_options, tx_queue_strategy)), accounts, engine: spec.engine.clone(), + io_channel: RwLock::new(None), } } @@ -270,6 +278,11 @@ impl Miner { }, GasPricer::new_fixed(minimal_gas_price), spec, accounts) } + /// Sets `IoChannel` + pub fn set_io_channel(&self, io_channel: IoChannel) { + *self.io_channel.write() = Some(io_channel); + } + /// Clear all pending block states pub fn clear(&self) { self.sealing.lock().queue.reset(); @@ -1176,7 +1189,32 @@ impl miner::MinerService for Miner { // (thanks to Ready), but culling can take significant amount of time, // so best to leave it after we create some work for miners to prevent increased // uncle rate. - self.transaction_queue.cull(client); + // If the io_channel is available attempt to offload culling to a separate task + // to avoid blocking chain_new_blocks + if let Some(ref channel) = *self.io_channel.read() { + let queue = self.transaction_queue.clone(); + let nonce_cache = self.nonce_cache.clone(); + let engine = self.engine.clone(); + let accounts = self.accounts.clone(); + let refuse_service_transactions = self.options.refuse_service_transactions; + + let cull = move |chain: &::client::Client| { + let client = PoolClient::new( + chain, + &nonce_cache, + &*engine, + accounts.as_ref().map(|x| &**x), + refuse_service_transactions, + ); + queue.cull(client); + }; + + if let Err(e) = channel.send(ClientIoMessage::execute(cull)) { + warn!(target: "miner", "Error queueing cull: {:?}", e); + } + } else { + self.transaction_queue.cull(client); + } } } diff --git a/ethcore/src/miner/pool_client.rs b/ethcore/src/miner/pool_client.rs index f537a2757e..25d9a809cd 100644 --- a/ethcore/src/miner/pool_client.rs +++ b/ethcore/src/miner/pool_client.rs @@ -16,8 +16,11 @@ //! Blockchain access for transaction pool. -use std::fmt; -use std::collections::HashMap; +use std::{ + collections::HashMap, + fmt, + sync::Arc, +}; use ethereum_types::{H256, U256, Address}; use ethcore_miner::pool; @@ -37,9 +40,9 @@ use miner; use miner::service_transaction_checker::ServiceTransactionChecker; /// Cache for state nonces. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct NonceCache { - nonces: RwLock>, + nonces: Arc>>, limit: usize } @@ -47,7 +50,7 @@ impl NonceCache { /// Create new cache with a limit of `limit` entries. pub fn new(limit: usize) -> Self { NonceCache { - nonces: RwLock::new(HashMap::with_capacity(limit / 2)), + nonces: Arc::new(RwLock::new(HashMap::with_capacity(limit / 2))), limit, } } diff --git a/parity/run.rs b/parity/run.rs index 176121d750..a8082b7246 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -504,7 +504,8 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: cmd.miner_options, cmd.gas_pricer_conf.to_gas_pricer(fetch.clone(), cpu_pool.clone()), &spec, - Some(account_provider.clone()) + Some(account_provider.clone()), + )); miner.set_author(cmd.miner_extras.author, None).expect("Fails only if password is Some; password is None; qed"); miner.set_gas_range_target(cmd.miner_extras.gas_range_target); -- GitLab From 441cb7980bf43e6a010b9e6522374b4bf4918ef3 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 13 Jul 2018 12:25:46 +0200 Subject: [PATCH 135/191] update snappy (#9082) --- Cargo.lock | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 330a3ea569..7a72d7b6d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -217,6 +217,14 @@ dependencies = [ "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cmake" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "common-types" version = "0.1.0" @@ -2900,7 +2908,7 @@ dependencies = [ [[package]] name = "snappy" version = "0.1.0" -source = "git+https://github.com/paritytech/rust-snappy#40ac9a0d9fd613e7f38df800a11a589b7296da73" +source = "git+https://github.com/paritytech/rust-snappy#798408ffef8f86dd51481673aca10f5348d7491b" dependencies = [ "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "snappy-sys 0.1.0 (git+https://github.com/paritytech/rust-snappy)", @@ -2909,9 +2917,9 @@ dependencies = [ [[package]] name = "snappy-sys" version = "0.1.0" -source = "git+https://github.com/paritytech/rust-snappy#40ac9a0d9fd613e7f38df800a11a589b7296da73" +source = "git+https://github.com/paritytech/rust-snappy#798408ffef8f86dd51481673aca10f5348d7491b" dependencies = [ - "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3641,6 +3649,7 @@ dependencies = [ "checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6" "checksum cid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d85ee025368e69063c420cbb2ed9f852cb03a5e69b73be021e65726ce03585b6" "checksum clap 2.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f4a2b3bb7ef3c672d7c13d15613211d5a6976b6892c598b0fcb5d40765f19c2" +"checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3" "checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" -- GitLab From 82a6a0848afb5e230500cbab1817a81573f21f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 13 Jul 2018 12:36:58 +0200 Subject: [PATCH 136/191] Fix work-notify. (#9104) --- Cargo.toml | 2 +- ethcore/Cargo.toml | 10 +++++++--- parity/run.rs | 12 ++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 75c39ccc97..f009b4cc7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ futures-cpupool = "0.1" fdlimit = "0.1" ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" } jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.11" } -ethcore = { path = "ethcore", features = ["work-notify", "price-info", "stratum"] } +ethcore = { path = "ethcore", features = ["parity"] } parity-bytes = { git = "https://github.com/paritytech/parity-common" } ethcore-io = { path = "util/io" } ethcore-light = { path = "ethcore/light" } diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 8a3ce5a6de..c0f705709d 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -80,6 +80,13 @@ tempdir = "0.3" trie-standardmap = { git = "https://github.com/paritytech/parity-common" } [features] +parity = ["work-notify", "price-info", "stratum"] +# Large optional features that are enabled by default for Parity, +# but might be omitted for other dependent crates. +work-notify = ["ethcore-miner/work-notify"] +price-info = ["ethcore-miner/price-info"] +stratum = ["ethcore-stratum"] + # Display EVM debug traces. evm-debug = ["evm/evm-debug"] # Display EVM debug traces when running tests. @@ -97,6 +104,3 @@ test-heavy = [] benches = [] # Compile test helpers test-helpers = ["tempdir"] -work-notify = ["ethcore-miner/work-notify"] -price-info = ["ethcore-miner/price-info"] -stratum = ["ethcore-stratum"] diff --git a/parity/run.rs b/parity/run.rs index a8082b7246..fb52d86798 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -33,7 +33,6 @@ use ethcore_logger::{Config as LogConfig, RotatingLogger}; use ethcore_service::ClientService; use ethereum_types::Address; use sync::{self, SyncConfig}; -#[cfg(feature = "work-notify")] use miner::work_notify::WorkPoster; use futures::IntoFuture; use futures_cpupool::CpuPool; @@ -511,13 +510,10 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: miner.set_gas_range_target(cmd.miner_extras.gas_range_target); miner.set_extra_data(cmd.miner_extras.extra_data); - #[cfg(feature = "work-notify")] - { - if !cmd.miner_extras.work_notify.is_empty() { - miner.add_work_listener(Box::new( - WorkPoster::new(&cmd.miner_extras.work_notify, fetch.clone(), event_loop.remote()) - )); - } + if !cmd.miner_extras.work_notify.is_empty() { + miner.add_work_listener(Box::new( + WorkPoster::new(&cmd.miner_extras.work_notify, fetch.clone(), event_loop.remote()) + )); } let engine_signer = cmd.miner_extras.engine_signer; -- GitLab From e339cde79060f0a9b856d22fee1bdf76b6cefefd Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Fri, 13 Jul 2018 12:44:31 +0200 Subject: [PATCH 137/191] parity-version: bump nightly version to 2.1 (#9095) --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- util/version/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a72d7b6d0..109db6de67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1955,7 +1955,7 @@ source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce47 name = "parity-clib" version = "1.12.0" dependencies = [ - "parity-ethereum 2.0.0", + "parity-ethereum 2.1.0", ] [[package]] @@ -1972,7 +1972,7 @@ dependencies = [ [[package]] name = "parity-ethereum" -version = "2.0.0" +version = "2.1.0" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2022,7 +2022,7 @@ dependencies = [ "parity-rpc 1.12.0", "parity-rpc-client 1.4.0", "parity-updater 1.12.0", - "parity-version 2.0.0", + "parity-version 2.1.0", "parity-whisper 0.1.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "path 0.1.1 (git+https://github.com/paritytech/parity-common)", @@ -2162,7 +2162,7 @@ dependencies = [ "parity-crypto 0.1.0 (git+https://github.com/paritytech/parity-common)", "parity-reactor 0.1.0", "parity-updater 1.12.0", - "parity-version 2.0.0", + "parity-version 2.1.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie 0.2.1 (git+https://github.com/paritytech/parity-common)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2232,7 +2232,7 @@ dependencies = [ "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "parity-hash-fetch 1.12.0", - "parity-version 2.0.0", + "parity-version 2.1.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "path 0.1.1 (git+https://github.com/paritytech/parity-common)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2243,7 +2243,7 @@ dependencies = [ [[package]] name = "parity-version" -version = "2.0.0" +version = "2.1.0" dependencies = [ "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", diff --git a/Cargo.toml b/Cargo.toml index f009b4cc7a..28793b2d78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ description = "Parity Ethereum client" name = "parity-ethereum" # NOTE Make sure to update util/version/Cargo.toml as well -version = "2.0.0" +version = "2.1.0" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/util/version/Cargo.toml b/util/version/Cargo.toml index 1c674fb376..fc4cdece6d 100644 --- a/util/version/Cargo.toml +++ b/util/version/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "parity-version" # NOTE: this value is used for Parity version string (via env CARGO_PKG_VERSION) -version = "2.0.0" +version = "2.1.0" authors = ["Parity Technologies "] build = "build.rs" -- GitLab From 584a76ab7009e0b608d6c3d454c2a992c7d78e32 Mon Sep 17 00:00:00 2001 From: Thibaut S <33178835+Tbaut@users.noreply.github.com> Date: Fri, 13 Jul 2018 14:42:06 +0200 Subject: [PATCH 138/191] Update light client hardcoded headers (#9098) * Insert Kovan hardcoded headers until #7690241 * Insert Kovan hardcoded headers until block 7690241 * Insert Ropsten hardcoded headers until #3612673 * Insert Mainnet hardcoded headers until block 5941249 --- ethcore/res/ethereum/foundation.json | 71 ++++++++++++++- ethcore/res/ethereum/kovan.json | 131 ++++++++++++++++++++++++++- ethcore/res/ethereum/ropsten.json | 80 +++++++++++++++- 3 files changed, 272 insertions(+), 10 deletions(-) diff --git a/ethcore/res/ethereum/foundation.json b/ethcore/res/ethereum/foundation.json index 4f9efc707b..48e174eedd 100644 --- a/ethcore/res/ethereum/foundation.json +++ b/ethcore/res/ethereum/foundation.json @@ -173,9 +173,9 @@ "gasLimit": "0x1388", "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" }, - "hardcodedSync": { - "header": "f90207a0cdaf426b80edd4363b336b351cbfec8c38b44847cdbd814aa92e92bc9ec05333a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949435d50503aee35c8757ae4933f7a0ab56597805a03f28b2b384dbfd29bc0a10343e8a419e61b92782f880046170bf1d11455e94bba0f3712ef3ff24efe1afc7da11ffb2ca495a94fe7958f42e9f1599d66ed72af13ba06d01d03a15f807da601bd2dfde7490bbe91d9bb11c11eda435db9daad6e7b1efb9010000008c0000c000000000440100108040000082000800000000000000040801001004001000000010000000001000043300001000008000800000002000200040000000580c0004108000040c0008000006000000000280800080000800000000402000000a000000a810226200002881004000208006020000000510030000100040010100000086c20000000009000100000190008c80060000008000202080420008056040000000001000400001100010140822800220000c804004002000108000160001400200088082008000000412100010080205011000000800a0000810021005000000000002840000000400000000880000006000000000200002870bfca554dbc6398358b001837a137083473c8e845b27f4fd86436f72746578a0dbf31fd28bd8f69f1103196e1782a9dfb636bcfa726362ab0767235cb8d56e7188264402501145497f", - "totalDifficulty": "4838383800145139949936", + "hardcodedSync": { + "header": "f9020ba0bb120488b73cb04a3c423dfa6760eb631165fa3d6d8e0b1be360d3e2a00add78a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479452e44f279f4203dcf680395379e5f9990a69f13ca02d2cbb3c43370257122898259f1e06da38fd23031f74b40d6bd022b037ecd3daa0107b3a01662ca77aa1c72cde45bd66c062d781310d7a364e5b6442bd791431cea011e451bfe7b89addb96020182e0e7eb448d0a66303924a2835a149247bea4188b90100000000200004820000130000020000322004002000140000801000081208000880800200100000000a080000000800400000000000080240800000020028a100000400410000001088008008400080000100000000200000000220804028000000302000000180200c004644000000000101800000040040020200100020100220200a00000000280002011040000000000080a00000002002048000100001000206000000c000002010000004800030000000000300884008121000208020080000020280000000010104002000004000002084000c08402820000004000001841109008410040410080080004121044080800800000000004858040000c000870c64944ccfd130835aa801837a212d8320dc6b845b452c758a7777772e62772e636f6da02078861f3b30aaea6fad290d86919dd7542433a56edc1af557426cbd2eacd60d88a68a26940894b23f", + "totalDifficulty": "5282739680501645457616", "CHTs": [ "0x0eb474b7721727204978e92e27d31cddff56471911e424a4c8271c35f9c982cc", "0xe10e94515fb5ffb7ffa9bf50db4a959b3f50c2ff75e0b8bd5f5e038749e52a11", @@ -3014,7 +3014,70 @@ "0x118b3ae7ad25ab96fe8a63973312c758d4ce9ecd39cc24913c26a65b4b5534de", "0x19cd088af8dbe2d3e6ca7987d9ee1564ea2256f482840b1d2f0da85060de9a86", "0x98bc07422cf8b0c4d1428afb759300d9a7637de2518528d34f7d237be7e863be", - "0x0c64526b393066911c7da3f17f9e652cfa38112ae324e3c84416e811d3fe7cad" + "0x0c64526b393066911c7da3f17f9e652cfa38112ae324e3c84416e811d3fe7cad", + "0xa30cbfaf518996ba776b426a7068faad4ee49775db45565ebd327f9c679a45b4", + "0xd3e1a807f5940ee1a321b20b7931bef90515132ea9959df94e55529e05802cab", + "0x338aef579d9ec8acc1a0411c1674bcf213d03aa7d4bbc56707e081829ce30004", + "0x68c7a603089a220273f019001a39bfa9194590a6fa6d8ba960ddf4888b105a6b", + "0xd6a9d2c354e1dd77322800d24774eb03b589dd94bcdb3cc2b70437ed70411e6a", + "0x39c017c42ad571564792bf5741b3ae786ff0c24ebcb5ee46882ce0545b8a2262", + "0xf5caea6b23f4085c9f94c880d89b1c23eb69c03dc098b426143ae4b28969a2d8", + "0x959eebc05ff0dfae8c7e6699f069b38b5f2e5bc8c155bc35fc7f578d2d112993", + "0x199e90557d4d9e13c3e7a4b5b4ef6fe52cd2c724c36eaa44b7fa151efebbbeee", + "0x0bfe35d253227696e76f92ff13e4c545c57fca51186a16f687e76d2e6707d34f", + "0xadf8b7678f98b0e5009130d9d5d77add6e460b67b0529abc5315c44dadea0cb4", + "0x86582f3a98b218939aefd7eea438ee278d1faaf41920e8c72922c46fd56f1c32", + "0x001b728a4737fdd53cde20341fa0adec9aa8ab7c7c1db244fbd509a6c4f3f364", + "0x9207900bfdd6c87e2ba8498c0372706799604a207930eeb331580459d17f89cb", + "0xd2192fcf74cad70e6f7986a0b088de8658a14638a4c03d7ae616a88ceea00ba2", + "0xbf6f6b91742eebe70204eb7a70196ef636fc2db4d4c4f89cd5826fbf990a945d", + "0x5c1210951949402fe3b012577f1af0d3e285a0b39c3fe19c84f7930e003c06de", + "0xa16d57f777f94f032f7f2f75b2e25ebd11559effee98b39a5a1e7cc804cfbf06", + "0x1b9561fb8035ec6955454d6710f053d7ad3d8e0753aaac568ac3bc98f874465e", + "0x1a622da786425e0b65b9083a451a419c75e16908fa04d89ddc2c11d94ffe65a0", + "0xbfcb9b1d847eb40b6808e45bf3d2fb8f6588d6f103167be65f246d0733afd1f7", + "0x2317640589ab9d52e7f5e8dda95ff3b1beceacc5832341e9053b71209bfad07f", + "0xa10611b829dbb533e565ad01632b26b1fd642a4393e7fdd9b8f235f11bb606c8", + "0xe4ea4173982f342e396356b0bb0eb47e6748461ecce0f34dbe8fc084cf6a9fbc", + "0xd58399c0d0ae878338d2915eaf2d65f2d1e29eb8d551d254e68bce7a8235adcb", + "0xc0c8b73ffc675a207f73903c49d81131e6831e4c8e071b988ed9f2a5d2277024", + "0xe1ca77bafa66bb055c671978b3d1bd5df32f8e269330507f071afd627012b6af", + "0x67a1093cbddf41264009d1dbbc33fbc25a337339be0727e70c512b585897749c", + "0x0fd615782db5cf4c0a3686721cbc6245696c1bc9b403a9eaffae00968d2c8ece", + "0xc3c2dcaee8954ca86d9b3e4e98c4bb4f6b6bc183f9eb062016c5a25b2280717b", + "0x70265915f5ed94d589afafa3d0d0eab6310195cc690aa82bd65e4a488b398c58", + "0xde3fead8ce29c04a86dcb081da2cabda5366d28de5ebfe2f8064780413f71edf", + "0x0ae43394fcf6ebdabdcc1ede314fe779eb61a12eab807a9d3437d9167e2247e3", + "0x3241127e2c7fbb3db9fe0c602b0c94e22c684b7910ffcf09c1c443e567f95e4d", + "0xcb94ba286eeaa1129b490bb5891e603fd35e85c97c2132c1216d1774f9017f35", + "0xbf396cd23c29ef21fb535880ef621457fb71981f856f2a09c494cd005d38f981", + "0x3df0c90ed7aba260e820ca1d28ce1778149e163524e306309aa346bbadedcf2b", + "0x66a2724f7481aa3ab83a8f1bae2caef8a7bc607c7ffd5bbb1cf3766741db804f", + "0x7a0c3492f4022322e10d81bc10a5db9aceec81d1ab70cdffd31418b79d750fd2", + "0x96a826cb667924ed75ec708bf07cf4c7c05f84a0132e154b71eaf6e193590e87", + "0xcc7030fe617c318a31984d04e3d7f2ff2196894bc429f3f64bfd69b969dc9b56", + "0x3fa94aae223f5aeb593246f1a93d6d694b48946c09d879e791f1188a9dedc4c0", + "0xd49e51fc324fe58159575c0c24171f4eb1aaf58ed8e1311c3849538c8cec3ce1", + "0xc474123906eae5cd48a10e0d93fcbbd653f0c6d25275f827d4fac51e696c3d91", + "0xacd7b790a19026fa3f3b0a354878d4fcd79dc600f7ba5cedd2eefffe1ceda76c", + "0x41b311a188cd7ce1444d258dc379994b81a895226276c7bfe5e6cb29a5f92142", + "0xda0ae01db7f73f07fce46b94c24d6e400598378a6baf01123dd710c5425fb8c9", + "0xe62e08175a02b575e28b9e029a838c365e3ce4278f60c2d3b5d529768a4b47c4", + "0x99b804c8d0feda7f9df961527d634fb8b2d477a362e1d8158856885a13425fa9", + "0xe73597be8ef7d78f862c7a94a8ccff17f559816eba2f830821c6f6436898f9fb", + "0x36de9ee4c80853c865b16904cd8f6c0e9a99ff9e7bf05100bfbc76789cedd4d1", + "0xf480b762872373102393461ff3a21323a1df799c315fd167780a45d7bfaae84e", + "0x303b66babd21e72449cad413e04bdb0bc3ebcbb84a79dd30ed7c972c5341b82b", + "0xbf111684fbe44a973594f31cdee2c94e807bff9cf7584c22dcd609d8234f6e62", + "0x79b26cc3bbf49b6f25afbff7e97e4e45f2dcb359095fdbeb7fb7addee692afc3", + "0x2839d620cc140ba838ecba6e7e52db8cf7b5cd4cf4857f72f3bfbc9b1cf0fbd9", + "0x93074136f4eec367adcf27955d38efc0dc6da514693bfc97935c7871793e35ea", + "0x21f5af18a4cf0096b6e6a3d4c98f4043cfee5c4ee085ce106f86b713160144b8", + "0x90d16b403e2deca6cd5c80e52eba0b84b2875e1dfd75fffb1a2f82bc91eb6942", + "0x8a5cb6854c19a865f51e3ee9eaf8e843a97b272f6467634ba40e547a435ef624", + "0x9afe42a0dffca8ec063c83908fd6237d6130c9dfeab57078bdd02b6ac6d0ea07", + "0xa05cc6108b475d3e68e280e98f514cfb6df4f004e1b7708fcfd4528d346bea6b", + "0x71f10879b875caefab46669e8525b9c0487bbe3247e43a6cdb1dedbfb4d4ba33" ] }, "nodes": [ diff --git a/ethcore/res/ethereum/kovan.json b/ethcore/res/ethereum/kovan.json index 1952a31e7a..1268de55f2 100644 --- a/ethcore/res/ethereum/kovan.json +++ b/ethcore/res/ethereum/kovan.json @@ -57,7 +57,7 @@ }, "hardcodedSync": { "header": "f9023ea070413bfe3ceb9160c7dee87bf060a0cc5e324f7c539cfce4e78802ff805063b6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479400e4a10650e5a6d6001c38ff8e64f97016a1645ca0f8ac12c30b4fd0d27a1a50c090659014574b554ba6e9cdb76f57efbcfbd390a9a0b474ac6cc4673c17c5f511a8b43cc44dbb01bb028735830163667d7a3a2582b9a0bcd44b7c04fa24760df7d733ca8ecd99e8da89de0716e6017fffa434bfd7519ab901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090fffffffffffffffffffffffffffffffd83755801837a11f88301d8de845b27471c96d583010b038650617269747986312e32362e31826c698416c9d1c7b8418bc805f23fb01fdd498b37df5519f49691d65160fe6a6794b8106e2ecc4782407f0dae3a512546b7d93e89bbb2a761c750553deeea1f9401231f56ae0ccb059201", - "totalDifficulty": "2566410291882451733317698215999610733750372193", + "totalDifficulty": "2654916374389120143910668097894183918476475680", "CHTs": [ "0xdb9557458495268ddd69409fc1f66631ed5ff9bf6c479be6eabe5d83a460acac", "0xd413800c22172be6e0b7a36348c90098955991f119ddad32c5b928e8db4deb02", @@ -3813,7 +3813,134 @@ "0x5d71aff2a12d4f1d05c7f760d07b417a39eb0eaa72a01333befc6a2eb6b7d72a", "0x8dd7de9195d2852aeb6812638ba22e73ff5ca0a8ad921c6e924cae1dd5952255", "0x8f1828b4cdc6c38c112b1ffee7790953112dd2225ec82581a5095e5ae4d71cae", - "0xfeac88ae6c8529e87a55a259f475b7d162d01e8fa5f36c90d4665dd6105b1743" + "0xfeac88ae6c8529e87a55a259f475b7d162d01e8fa5f36c90d4665dd6105b1743", + "0x2e37011bd97c6e8a24e130fdc2c60c39b14ab3eb426a4f654bf3158a19aca88b", + "0xdb59b565de21902c50e2e204374ae1ce487656eb74145c103a86707b45a63eaf", + "0xf75c26a7214acf2d050ff5c7cc8b76e1a90540410b5c8b2bc9edbfe8fb2268e6", + "0x6ca7554f2abfd22951bec80f9d280abb6f060dde4a9a829ff7a0457d67a99edd", + "0x0324bceb8b61fa7092396764d7e1933697806c6d785446e3bbab3fc3be0ab259", + "0xeb4880f177e3e673f8ee04be1451a38bd8a2c0bac681d82a19327ae2d9769d32", + "0xec6a868cd9fba9e4f5b0d4276f44aee71056fbb7f425f717d0ce9d1fa5442ded", + "0xdc12b36d165eae197487ec930e35489545d2867b6fb9f8604d279337b6a8f949", + "0xcf1241b1c9b054df34638e99447bb0359aa01ad13c38650b872f2d727e6f68f6", + "0x713765e9b76c73c2de58c480600a7125972246fdcce2324993cd6bbe49cce67f", + "0x81e096e97dd8bf1d206d0ed41c9feaad24d344323ff74707112ee8fac218994e", + "0x8943c2246d5ae3e8db5fc012e9613642c6b713e5f2a89d00f09fa73246f88d5f", + "0x5b2d0bcbd893fab4e58d4ef698d1e8d3001799b61e758b7711f319e2b8eaa645", + "0xf3e4da2cf4579f52b7e4d632d93b79714487ef179a8f5d5c46af9154efad20fd", + "0xa2348ea2cd7a5a32779e9d292a9428fa475fae790f08e42f7699ef5eb2489188", + "0x62dd923966e02db7d0d27cfdd4aeac081f9827288c8b54d9f19035331a109f53", + "0xaa1aafa8f9d9d3e0668eff761fbfc2657d1e1906c077d93200ec000643c6c272", + "0xbf40cb21561989004434d6d908451d5b63045c89c2ac9b1eb617ec0054dc18be", + "0xdae53edbb07fe84623451da0e25da631ad3465e5bc12ef8fd8323c8a72f57130", + "0x685115b38f307f984c7c90e85d167d62b0ec2c924a0bca5f23b1cac12a8f72fa", + "0x2ad7e8f86c872504d7c2c48b0db141955d770acc84222fd725ffbd2dc4095b1d", + "0x9268b3b175aa6025b959b8fcdb416c39dd339e6f1fde3c427bd1bada36e4384c", + "0x502ee814cecc8454abb95591b0d07ed5170db94af7fda8878b9b4287fd68c9f8", + "0x6b19baf6b7eae36c0b1d2754645ff282fc2905802ca6394ac00bc22eb1582eb9", + "0xecad17ae39f897ab38850cac40480b4fafcafd6624f8fdfcaa69849f3fa101ec", + "0xb0804719b391b4b5f554a49f99df3a9d1c3a9884cefc268dcb27e3821aebe385", + "0x3018401c9a31f97881852c1bd65a964bfd3011659725c849a8de4b5ad8f26490", + "0x48a6b687e62a42dc44ecb56f4187e293d6f87d328b1edf409c8f2fa6568dfddc", + "0x8e3bc1ec926a68e22ed525485186a4d9160a54bd3e80107bb77c09911564effa", + "0xd7a7cce632e1746120476a3271ea09689380eb833d5538310fa0029f9174e0de", + "0x7bae074c51f3b547568d18e85b73fcb9b5f8040ed5f96f3523f53197150517a4", + "0x9ba39f376b9444dab04e0a52e4728ec842a0aa4880d9aa9819de3f0694f46e60", + "0x40a2b84bd3d05d28d51a39deae5f23b4f7370c70ac70d1cc81224eac4939d69f", + "0x2b9f57c8c43284ba929df8f896a966afbdd341f145b6b2b2fa98382950ad915d", + "0xcaf3d2a336cf17c9b2d7116a14e654bcece012b07bc020ac30feb71d7f6cead1", + "0xd3b68cf2337ca26a9c4bf6b6b286dc65bf66641d5e9c241f4c1b147994253ac5", + "0xefc11a5944a8061c87f274515e810fee13f4c350c625a988c27ed276b6c55b6d", + "0x7a93732151f7145059424aa823b24e26341cfa57f612e6de3bddbe23562ae918", + "0x2594b625d0f5ed52425ccda4e7898a8a554300791027af6f3a19239a15868ea8", + "0x1db00091145b1b0830983b5eaa5cd3d0e4ad71c09d1b2dc20c47815bc2de5917", + "0x60563bce11f028691cf78da7326f22a4ab01d980020e61bcf2e4bdb5912b7b1d", + "0xe6515bdf1f22469a4218f54791d12698d1bc555b3e54b04cf46b10effa8ce74c", + "0x990831a56958a6bf131697e2f35ab2a45fa228eb7435c7e65814ba28778d513f", + "0x1b6e4085f0e291a8ee4d7e90158dcf15702b4e6e634d1d3bb5c4bab11bf70068", + "0xd0d4a6061bcab0f8e645ea16b285eee7f2ff84c7765d7543aa318edbced2408d", + "0x2da1a609eb1b572a47f187dd5a1e9f4cb1e1885c841f91ca82137e01a9eb4288", + "0x1293686df427f9ee1c2116000735642b3d09511cf2889dde21e1bee427d8c273", + "0x8a990d66370eaab3a46d9e4fa9b7d0c621020cd3b897d9e5b3e5fea6a6979f3c", + "0x10030534d5a06bce47d72998ad4c042f5e445a505920723d14b1d93a3a23af82", + "0xf29a399e8879386e4c2bd8e873dc8aed612cfa8dfa9e5b56f9c51d4c4d1774ad", + "0xb252062ccbb11c3181338d9912ed0d4dabcfa4d61860c211f2f702a641fe936e", + "0x822c7abd11b80c862bd67d39e16a208c8462936ca86b5cd5dd20c51d35cbfbb1", + "0x6b62aea651f1407f94906db704a364f70d827e0efba981a8515d1f515a46b266", + "0xa57b7661c0471cbd7eb35becdf468622df8338a48a075b722ebc5550bbf6b9ae", + "0xefc593d38afead5ee1fea5d8b41a52bd2a5b5a059774d0b951bb7eadaa41a46a", + "0xa556e684c26e7fd6f902b82ecdf721fc292c35e0d2240c1f362c4861c366c4c6", + "0xc9f274efc308d1e97ba9b59c92735d1ab2a72d033ed02a543dab301610e96e33", + "0xd7b43559126f88c59392fc54e2b416d2a67014abce12ddf61764df989a897bd3", + "0xc860842132de3d8c1d0ba2cdc0a7c2853ee568789f1190738862667e3539a958", + "0x2f330354084635eb507cd54549ab89fecc41886d295b1d8c91efd8ca27fe4f7d", + "0xda6edc97997b9cea1bc90662c6a8180fa03cef6189e09c86f36adb91400abe74", + "0x0d2853b5a3f02ae9e4a1c5a0534a5329d2e877d4d77f60dddb36b84b4fdf7e2f", + "0xf048b5acc9e9191ce0ab8c390bfe03d89cbed91db5b9e7c7452b01bf56bcf5ac", + "0x30fb6f6093bf59794d37ddf850c315dd9491a4cf5df378b4468dca96acf78e77", + "0xa04eeaa9d1d767c0f93553af3a259390a9576e8b6015ffa8f0e4fdf37f41f28e", + "0x02411cd53ac55407e0d31520a8c3274a2f4d1fbb2541bb140f30f25843c76860", + "0x65bc790d632d5fe2446c65325df875ba59af3c3aa7357bbbbf47c7e5f7663a7d", + "0x5f364562fed351d932eff956c3ac489ea51ad2cb12a81bd8db4fe0b76e3cbb92", + "0x104f7070d5da1aca5c8b20a96d36638e4b5f8be4e86be83f0aed7234fcece445", + "0xb2fc7a73d8d859d531e51532928671ea59ae6538d4572fd5c2d76c70920aff7f", + "0x7ebecf446825dd0010fbf47afce8b9c3b3901c839ec46269eb8744bd799699ca", + "0xc64002b5a70f18b7c51ea3d3f5246fe8db16781e146d777aaa12f3b765d108e9", + "0x9d136068c7002d2780abfefcaedc79424d3e89b17718ec369d9e64ab7b63a81f", + "0x7b9819e62e92dcead89329bcb3f1a1d6bd10794d1a22d30c3d0369a264029543", + "0x8a8c9e66f343d09d5b7897c491c851143ca4f337ddcb5c2b1462b150e22c6f47", + "0x9d86faa1a5d355d6071e09c8cca50e2dd7e7dc117c2e4f6c0136a2789e84aa8b", + "0x234e156c10a80422ca1aafd49d614e02b698a0d89a7080f87db5dd5169b419bf", + "0xafbb572b8d9119ba8126fdd5a593663db3a3e6165a60f1f439902a6321a8d243", + "0xcbfeb8af8c93b11eaddb05df2f2a8772da694f9cc16878d3154d0857f17274ae", + "0x7253cf6bd2b4d158c2bd60acf5fda9dff6cbc6468ca9b549efcd824410d2e719", + "0x67fa14af20fe738ec5c9414401149a1f198207969768a5b982454146ef720b85", + "0x6c0ddef53c7d58839c3013f2accb72190b7dcc52fbe5d71f4a20f849dd72725f", + "0x89e77c0dd9fcb4b4d4d10c25903ff5b905f5d64b6bed9a0736e9dc2035ade3eb", + "0x42466344821fc29dcdb5fe7dcbda00b3779736ca90f87ca1802207f61633877b", + "0x6e2303e8ed41e6d39488c57dff8d50c548a7079a26c3fb86d925c0aca5b8f67b", + "0xb8a14969606442bd94048f2b2dc7b87662d801097537f51c8eb8f026c52f1fe9", + "0xd7ee25e0bfd080d89c475942575fa055ce5ae268a6f01b916b399f6ff7e94a39", + "0xaf5e7da13dc0ab08ba5185074657acaa2ce753a20a364f3a97d230c247bc8d1c", + "0x92f9106bc9ccbb4e0b4c0d1b96c5bf347d856884eca91a0bcf29e896789fd9c2", + "0x4bc12bfadacd6af0737646b813b1a4a9c005e97ef4b090bb74b7475b50c85dfe", + "0x91e4ef72d0bdef33e2e2c8acbdd7926182568f559397bfc086b96979e7c4f53b", + "0xb2f57e050021b238e0b47b0b46a641644645db5bbd987e8d957038655d1fa83a", + "0xaf221401f4cfa3db7879237b40c68300060df9f65dbf68bb02694837eaa8af7a", + "0x2dd280e98a0d6bc950b7f3f0bd11a9e74105d4d15463184a3f8c03d40f3193ef", + "0x2538560e5b802a89a021685f994acbdb3181f25d0cae17160aedfc619ca2954b", + "0x133cfa3f5d6a00f7392a6b0c6a97a9ba10ec50b24cfbbe6028995258cbaa065e", + "0xc120807872f07adeb144905ff323ea79880389a2815f8441befbfa82835555b2", + "0xa2c5c5a3cbf6db506dfc13285b07c24ca7e70d9e75d80fe711c3082ba119d77a", + "0x837622b7bbb8bb18b3d42058426ef97e3fbc2842d2b64b339733b52313557562", + "0x29eda2468556699747beef75f015e6772980056cf367b819d05a4822b7d54712", + "0xc6ec29323368dc29a1d4c3c11e945ef7fdb56db78808c4c9688ab5f9eb7f27cd", + "0x44b368ab63e1fe0e0da031a4e6628ed1a4fc69fa4083cc056dd9443400be3326", + "0xf153dbc5fc03a89e80d2808ecd45e9fe6453d112508d32ffc6305d5a577d14d8", + "0x32452c0d51df7a85eac3edec46bbfe376c971ac4df4512d7e050e6fa711373ca", + "0x70cb25f3d60126cf0104a40b2a49b44ef8a42f60b93f929594938ac00647b639", + "0xed63fb33d707b93e45e958d5d5f9d3f0898c3676e43eeca55c788cbb2df3170d", + "0x93ff103a026350b0e9c2b30c36e079145892e8e3756678e8ae4b0065fb6a04ec", + "0xa466cdf6063bfe155ed75c115484ce113227385eff2cdc07dd90405239842f3f", + "0x2883c296d9ce6b1e6e7b4f471e841437603ecbb867570cbc46d86f0f26871600", + "0xea5e5b84183a3a709a51c1c6f3e7b039c4663d7495b9bdcfbd4ecb0a95ea994c", + "0xc0e97318bd3ee2957c09d6acedac77ce6b219608e5dd63ef512aa08d63c3a114", + "0xd3ccc7fcd24076afdf6249f671de402b515a131913df2da17118be47b3720b33", + "0x4f5be5a6edd66ec496207b33cefd00722f3167b9e6f2a44d9613c4c7d6541aba", + "0xfecdd1844517d0523a7b45d7b51769728902b881b7fc308f486e850c870eef5b", + "0x01a22dea1d0e25885e0a03e56489bcaf6747e712ceb5a42c74430fa6ffcc1c21", + "0x06cc521a05ce856dc55041b90dc4bbafffee578c1c315b5cfa4cc2d1ccba891f", + "0xac21d4b08fbf2891e0b3645b870695434fe703101f74e7fcf0d0e1304ce65b54", + "0xd62584c47aa1d8554cc08cf675bed128e541df54900fbfae958877595ad168ff", + "0xd8f1806ddaee8e729218fea1911efc5e663666ffb3acad4a2fda3757700d6d88", + "0x9dab2acfe01506a185276145deeecdb5c8fe0937feacffd40fb25a83e8eecc72", + "0xf0b74c6b1a441fc2ee8b2f25d2f03307164014d42a0784683a9d6cb7d2179064", + "0x7d590f0bcc891e30996adf8583803a9dd1271442c3f0e69502addbd371437767", + "0x3a66601fff95b0aa0d0660c12788ad56d2383cae290ceb2fb9ff41794abbc55a", + "0x36e94b03402f18c689f5234973ce1e626a82aac085dbdd682b51cce21f8c1872", + "0x00abd1d34c7e55f58681866558cb844c11faa55e8cac70ede75811f55341cfde", + "0x9983fc20e63e77ec0680522035b03167403681674ec62293cd6b7fe360c69157", + "0xe98b658fb8b6b7fba7463562f86348bf1e3534bc9148e8559423b3ee5ab68472" ] }, "accounts": { diff --git a/ethcore/res/ethereum/ropsten.json b/ethcore/res/ethereum/ropsten.json index aa676bbbe0..1e5972313a 100644 --- a/ethcore/res/ethereum/ropsten.json +++ b/ethcore/res/ethereum/ropsten.json @@ -52,9 +52,9 @@ "extraData": "0x3535353535353535353535353535353535353535353535353535353535353535", "gasLimit": "0x1000000" }, - "hardcodedSync": { - "header": "f90214a04d45aaeb1f0e00495b99f5fdc46c2c1e6b0fd48c693678de72afc1cb6f47a086a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794120c78af68df5957e776554d138a6b75f2c34b6ca0f2746b213421be4ec9cab40fa41aabfb4a3e8acccb6506d6cea4863774374dafa0225a348dfb2ef00db09da39b1a11b31741b6d14fd4456cdf4c2528961f398b74a09528322c1ce98449eed355ddabe0192fac920910a0d88965444b9efc1ac218eab901008000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000040000000000000000000000200000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000100000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000100000000000000000400000000000000000000000000000000000000000000000000000000000000000000008426e4d4518334e0018389545c8306529d845b284db896d583010a068650617269747986312e32362e32826c69a066f990a9ad374c2cb0017e96d3776e6c787f679d77c9079fe2b046279453d0f88851bec8da753bda19", - "totalDifficulty": "8635599198809021", + "hardcodedSync":{ + "header": "f90213a0f6a1b2e8155af1d1d77879826e2535cb6023ba35705934380ab05f65bcbfb107a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794f3af96f89b3d7cdcbe0c083690a28185feb0b3cea015ca95dffe4c5de6d9c02d9282df0db94855b0d602738f4b6fcb2268694cd92aa07ecb0900077c45bd4d3ca910218099f726fea18461f90be18897710767a51559a0251f2cb798e965c5d9b11c882f37c69fd2c42b314fabe64d2b4998c76eb93ae8b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008439b475f9833720018389769d82f618845b45928b96d583010b038650617269747986312e32362e31826c69a0fbd0db05012df54423a6b25395ec4f6e66d9f11af8b9c492c4fb7197fcd6a5ba8877d4a227c2bdf4de", + "totalDifficulty": "8809217991079619", "CHTs": [ "0x614648fc0a459451850bdfe353a932b5ff824e1b568478394f78b3ed5427e37a", "0x1eae561c582dbb7f4e041998e084e165d0332c915d3a6da367638a8d24f3fafc", @@ -1747,7 +1747,79 @@ "0x8baa0703e1a050c40f85dc850fe477881f432c951b1cc1b2b71ffb68ab7fe0d7", "0x14ca94dfd343548e32ef5659c043d6e28f0e577fd38da1ee12f11c08e281d775", "0xef25357970c76a8b72a6e52f49bc30651f711c7df70444d4667e80febc0e3b2a", - "0x41b8b4ebd5919dad3bc609ded524b97403d88f019367f0f4f622561131644ffb" + "0x41b8b4ebd5919dad3bc609ded524b97403d88f019367f0f4f622561131644ffb", + "0xb29a8ad1157621d0120aedbd8dfeb4b318979bd43a5b018bf7b9ce33d85da312", + "0x9ddf78b5d67ef40454867ed33de83a01cbd8c18fe09da3d9f991a196811dfccd", + "0x3604121f9cfbb5cf552cf8bfc9a7958332eb97131158e4f40f4eda481e553991", + "0xf1778830f694720a6f990f9d476b0f365e8a74880253b55ee16f5cbd6c8082a4", + "0x89831626d154fbe84a4c62c3e2638cd00e42b3844c7c7b98cfad113abdbc5347", + "0x650573f5ef274b2aeb40642e25fbd661cb0eff66245d7cc8f6fb9e9daa80fc12", + "0x479f6c652173efe94abaa850bffe1557847b26f286467013a4d72973e05e8e54", + "0x7096619d5716c34592ac2d9907ac28a74c6f6b1ebb1962a0217df82bf3e714d4", + "0xb7c7edbd8ae7eed58e973dc0750adfd04042ed56baabf372b111fce3e4b4469a", + "0x25529b597bd15317e55767b3fbfecad0657aaeda99f098186b41b70811f7af2a", + "0xd790747b09f925fd155b7bbdb5ccd89d873277163e4fe7054bbf71c0b26b8072", + "0x3aa0b221d1c4743a06692f645f38a8128d55f1c07cfa6e9711b0d2e0f2e0e738", + "0x26fb5017218cbe4250d2ceae751e99b9a34d7befa162dc248ac008c5d1221e71", + "0x0e4ada59854027601f8f81fbdceb95228db667eb65fed97cefbb35dba21d3b52", + "0xd3be75ae2da3e271dd85cd8226d789aa12d108a4b0d2681462f6539637572e50", + "0x6f041891c8219b508138f67c95a1765d08c5ec06b9ce585f52f837806fce0609", + "0x9e106515d0e80b41397b2e8e98adbb7333e76265917339a62063a07d9a7ed311", + "0x25f47483ecc5ec32f94b3dbcb4d42a4cdbf5c279e93567e14afc742a4619d3e0", + "0x5d81afc54f6b68bd820dcc629ff7e9d8397da56ffedef9addab0eec620de0757", + "0x36e192130485f248925d4b0d2fd98745a76099eb13f53093621d216d0aff0d6c", + "0xb906e5e33b63f6cc355c13b8461a260ee25376ee96909fad2c6ac121ad831496", + "0xd68e7e0d136e30f67ccb7c21e4dc43b0ad5536584e4b77c9da8d903a04e9d212", + "0x5aa7847a4bddda7fbffa62325da920a21a11524ac1b691bc3b55e4d1790f24bc", + "0x331f95f062ed1d38dd02b5ab6a95dd238ef97c5ee9777c938697340c902b4b5d", + "0x8c6a580c8b07567f747bf20946023c3b581c51075cce5cd5d47b0d81d8922135", + "0x8b89483810a49626f90846a0b49ad3e2172657dfa3003d58fa2a43d12c8f4090", + "0x944f9a5754800a33d903c8a464d602fc9da6af8ff3990c3eb669ac9cd17891f9", + "0xc75c82a2c1ecd875d16f343a58835d756740902c246d3b1deae97e49aa19f98b", + "0x1d2e0f2f87ff2b08514b18855c343966d42e0f1a048ddd3d316dca6e06292db9", + "0xa6508507463e53b3a840dd55ed9be57c8a56e1533c9001276750bdf19796f8ea", + "0x01eb6b636b1852e8f9066c12d4e6b7b06b90a325be4d97e08f7f560bab4796a1", + "0x8a0d77fb41f50808ff0a46dc9f3831a2b5093f55ec2e94a3d2e92373ff3b5695", + "0xea3383ba1d30891d1e236db2b31373541f51a9e5c4b4d017cc4960480dd20311", + "0x01129e8d7eff516a225cc0db090e4e38362d9eb2d0571ce00f4417836de2e375", + "0x92feaefb7f9466814a0220e536fe5ee73560507d071e059827d406329e609f87", + "0xac149150c11b3bdc660320a0e955f154fa3137549a73951207659e2b903c145b", + "0xcb68cdb224f9b3b0b0f3ca0056e70817146c9ebc75876dd952e6ca8ea896f2ac", + "0x157565282a12d790452e343c9762c2124456039729f3a8f97a2cee60d85628fa", + "0x42eadc181d59d8d8b26b37e0e9c9052e45bde72090d330bf9cf21d9d3c7d9048", + "0x1ea0ec8879b200e259a3a2a0f2a7aa292301784fa422f7c32ed5d945183948b2", + "0x06aeb2956be9d74ae4ff0b8a6c1874ed8ba46a186616356dc060bea1cbe5c628", + "0x814b0382b52a155a4e35639aeb3d8c859afc4fe5d151de3b0f1bac646e40f2eb", + "0xb30bf3e85be41a2a9e53321ee9f03c7078516c72c7e2d8e7e3134de709b61c36", + "0x1f97f5d334b5e6ebc72f5b846f24c7911f4fd1653f89b3477ce4b8108342810f", + "0x84c6fd181c28ad159ff18d203d14f966668468c9ef0a5d6dbd863886a7e0af1e", + "0x4b2e6947d55ea504bf205bae9dfc0e5402efd33757eea4da00a8ed2a6a3838ae", + "0x85f31d45128bb91cd3490b58a0a641ef77246ea9c83de30fa89b621307fd96f3", + "0xd362f5e6f8cbb216e66eaf49e4df25e01504ac729da86c530871a34e11d302f6", + "0xb7860983b043bc13ce5a27135eea12ffaeff71879404b18af3079b98da156bf2", + "0xf2ff82a679b2b90cb9f4a3bb903eb7ab36ee1c47cbe40024d8d570f5e16bbf4e", + "0x7e34a7e6673146b6bb7f78593b6093ef15b8e9fd1271b33dc5f7d17876b31871", + "0x725c97f83b4cf213296ef353e1c8d64854ef08983fd61320088b8d9e2ab33849", + "0x18085800d10fc7845148835d0ef0ac980a82eeafc44e12bfa296f9c38fc6e19d", + "0xc6c3cf95310cfd0254f0f8e93a3c25bad2b17df04f9c51a25927b80d02e06b69", + "0x822213c1b03cf68ecadc0b7572d37266207d5fe4efd5e56a924b0a1aab8a8e84", + "0x1ff46ffd2dd880cca76244f6af1fd8bddbb4b9ec58f86639821a16f2ff08f3a8", + "0xe9d00df19d716dc859922f2e6c907263191c8e531498ea557869ea1115317c95", + "0x6d3f1edebd562e9d1a236ed7a1d9104fd8f5a086cd78d35c7a65f27c269d98ca", + "0xfea701ced5bca0d5043512700598d3eafa0b89dc02f3c157cd1d52bcf4d84d9b", + "0x556c1cd8ff3ebc2ccd4eee9f1ad3837e346ecda961da17c0ee9cd4d084a47653", + "0x5606be2fba065424af76c94d4156ea82f77d9872ddac7a4c2517957a169e58f9", + "0x8d0223425b48487db1b371c966c7688435f4b9fcda75b088f0aac203d6657cb1", + "0xfceb55d8f3048a3f2255562e0a9ee342439253abcd048fac151ef4b910048e22", + "0x360f76e4f2ef49632e3bf8cfc3afeccff6917e98a48d3568148c3bb13f9d2d7e", + "0xd87bbf8397204cc2af883362646b0ae95392303935ec1997ab052c194e0ef117", + "0x9f1dad9dfecaaf117ab5277caf672b70540578e703c2024d3f23bb7cf8d6410b", + "0x5e130ccb23b7b66dd2fbdd912d6006d2820071dafe2890f593f952028aaa19c0", + "0xccd2f182107992fb9b002b87cdf7990cb2810b202b2ae5d6ef5e0b3bd69632e2", + "0x4b40cd83205f8b946ca9f11fc3306872650e658e631511fd4080bc8ca749d913", + "0x652acc59b71ca20bb65ca195d1a4b3e177f6a3985bdcd6120e1a45b7d4a0c7ca", + "0x49a5e2580ceb329665244e489592aea27d54da8189a665d9435e037ea70c46a5", + "0x379801356beb3a8e5fa7311792c69c7ac1f675a9c08c837f9f0e9f53c243d6a7" ] }, "nodes": [ -- GitLab From 3ecf16a4922b8b64307062283ed0a3bf0c1bceb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 13 Jul 2018 16:20:24 +0200 Subject: [PATCH 139/191] Make sure to produce full blocks. (#9115) --- Cargo.toml | 1 + ethcore/Cargo.toml | 4 ++++ ethcore/src/ethereum/ethash.rs | 7 +++++++ ethcore/src/miner/miner.rs | 4 ++-- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 28793b2d78..e7dc4393a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,6 +88,7 @@ winapi = { version = "0.3.4", features = ["winsock2", "winuser", "shellapi"] } daemonize = { git = "https://github.com/paritytech/daemonize" } [features] +miner-debug = ["ethcore/miner-debug"] json-tests = ["ethcore/json-tests"] test-heavy = ["ethcore/test-heavy"] evm-debug = ["ethcore/evm-debug"] diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index c0f705709d..82dd2230dd 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -87,6 +87,10 @@ work-notify = ["ethcore-miner/work-notify"] price-info = ["ethcore-miner/price-info"] stratum = ["ethcore-stratum"] +# Disables seal verification for mined blocks. +# This allows you to submit any seal via RPC to test and benchmark +# how fast pending block get's created while running on the mainnet. +miner-debug = [] # Display EVM debug traces. evm-debug = ["evm/evm-debug"] # Display EVM debug traces when running tests. diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index b51da58fec..17268fee1f 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -280,11 +280,18 @@ impl Engine for Arc { block_reward::apply_block_rewards(&rewards, block, &self.machine) } + #[cfg(not(feature = "miner-debug"))] fn verify_local_seal(&self, header: &Header) -> Result<(), Error> { self.verify_block_basic(header) .and_then(|_| self.verify_block_unordered(header)) } + #[cfg(feature = "miner-debug")] + fn verify_local_seal(&self, _header: &Header) -> Result<(), Error> { + warn!("Skipping seal verification, running in miner testing mode."); + Ok(()) + } + fn verify_block_basic(&self, header: &Header) -> Result<(), Error> { // check the seal fields. let seal = Seal::parse_seal(header.seal())?; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 8ff29848c8..16a20f8a00 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -97,7 +97,7 @@ const DEFAULT_MINIMAL_GAS_PRICE: u64 = 20_000_000_000; /// before stopping attempts to push more transactions to the block. /// This is an optimization that prevents traversing the entire pool /// in case we have only a fraction of available block gas limit left. -const MAX_SKIPPED_TRANSACTIONS: usize = 8; +const MAX_SKIPPED_TRANSACTIONS: usize = 128; /// Configures the behaviour of the miner. #[derive(Debug, PartialEq)] @@ -397,7 +397,7 @@ impl Miner { let max_transactions = if min_tx_gas.is_zero() { usize::max_value() } else { - (*open_block.block().header().gas_limit() / min_tx_gas).as_u64() as usize + MAX_SKIPPED_TRANSACTIONS.saturating_add((*open_block.block().header().gas_limit() / min_tx_gas).as_u64() as usize) }; let pending: Vec> = self.transaction_queue.pending( -- GitLab From 9dc512349a8dd33df4160d1bdd7b7e61f13c9604 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 14 Jul 2018 11:04:31 -0400 Subject: [PATCH 140/191] Insert ETC (classic) hardcoded headers until block #6170625 (#9121) --- ethcore/res/ethereum/classic.json | 3019 +++++++++++++++++++++++++++++ 1 file changed, 3019 insertions(+) diff --git a/ethcore/res/ethereum/classic.json b/ethcore/res/ethereum/classic.json index 17d9cd2bc0..602c05cd3b 100644 --- a/ethcore/res/ethereum/classic.json +++ b/ethcore/res/ethereum/classic.json @@ -49,6 +49,3025 @@ "gasLimit": "0x1388", "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" }, + "hardcodedSync": { + "header": "f9020ca0bfe78565c7685098b017e32399104274843eeed1fb1cd427c84bbefaf6f1c60ba01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347949eab4b0fc468a7f5d46228bf5a76cb52370d068da0499004e0e047f7c34e1e6b8e873c1829be5047433cc4429935346e43bdbbfc30a06566f1411ae4d7cefdb81be14d36baf1436c2a1bd344507f8d956c94655d27a3a0a916ae91053573cb022d0d78848920ec6429dfe57e4c00c46a442d53b301a8fab9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000869f7836fd69e7835e28018348048d83070cb0845b4823668c6e616e6f706f6f6c2e6f7267a01c3256996334e58c301283bfaf600d82e608ea584f451a65486c01ba4b22e104881716cd90004293eb", + "totalDifficulty": "343601966742385746996", + "CHTs": [ + "0x0eb474b7721727204978e92e27d31cddff56471911e424a4c8271c35f9c982cc", + "0xe10e94515fb5ffb7ffa9bf50db4a959b3f50c2ff75e0b8bd5f5e038749e52a11", + "0x816e7463af7b5d2fcb804ba55f09e8452182b0ba6c995a34e144245d76333d55", + "0x3793af64c1ddc07ab61b2ba120034d91c02183ff788f07d3120fd4e6a48305b5", + "0x14c6106a17e041032210bfa0ca80d11860a1c6d95175d55eff39f97b8d8acded", + "0x396f832bfa3a9c494e9245471f0e65552613d87b6fe62128103590d95de72c2d", + "0xb060979f095c170a776b2b50a1e2ab0ffea80f6e522753fa36ad6f106ee32e9f", + "0x8f452e7cbd8a333ed04d819a143a8d3a75fe8c58418e7fc420bb2a717c0d4d2f", + "0x37fe1b0cf156bfc07571569af210540be753777903a308d5707538fffed75b59", + "0x6f0561d017cfc123b3f0d37b044e4f7231516b8731a1cab89afb569238643c33", + "0x3c1740c410a88c60fe8ccdc44e0ef2cf7f7314818dbf1648c01d0d94fbffc211", + "0xfb98115a7d6df8aaa40115f883014fe97300869bc016648e918fbf2df9608d41", + "0xef1099ab5ca4b79369048678d3ba78122fc081b00b6fd0f6907302a260d58266", + "0x969575f411dd78fdc5b4def0331fc93702029cc3c78851331a0f47dd0faae70b", + "0x9e53053e362be51c0fd25eaafd9e7c5c969d9f2ce8db4b3d4d830cbff347b0c8", + "0xf9de29944954d2b71a93532fc26916ae12fee72d42a79adaf940b0bf75d0ef89", + "0x28b2ce6635e60e06d643750798779023b2a807d9d089ae9ef7f223eebc15a71e", + "0x5295c06cbaff06f42bd8f5d9cbe94a840885caed02f9c9ba6da44a888ef796de", + "0x576eae673a4cbba4c7c7a56b47835ea64ae5989d67d119ebc8e568df40d908a9", + "0x891c0d38bc5e55620615da42ed77ab33806a042512034bcee134279dde1054be", + "0xbab05999d657426a11a902eb4c85ac52e2b72dd1cf38584cf2baeb2c3727bb44", + "0x3bd7e5a966f6dd2dc456948a8efca5584f5a4e0033f3037843a42073dda1f71b", + "0xc4f773ab1e34290f9a3d9ac6ede4749c5dec547353dddea494169d86f71107a3", + "0x993bf037ea9dd58b52027fb6f39332dab867c1e72af34a49d58a5a12f26bcca3", + "0x48b2d8d506eb8fc9dc0402fef26952111449aca0f90d0079f0526435d4e3183b", + "0xfef8f61df240e956f43759d2f481938421e064a9bd6a3be7a53b1213cc9588bb", + "0x5abf01f5066cf1091acdd1f99fbd5fd963633feafc42f9047534a3c1522004a5", + "0xa0f6205842260988161183b51bc36fae458fa184dd61844617d5c5d26fa78346", + "0x77309182fdc26d15dd8d9dd05040d7dc623412785708d8aac39eedee63931944", + "0x661c93311b94b7d4cdcbc0973225c794e71898a2b906922a6c1e8f7e9e289dc3", + "0x9d5d329ee8d9fffaee0111688d31a308dfaac922dcd61f818edd5303d0955be0", + "0x716ca25b184b64ba273b978de098f9946413f6fcc95bfba5cf1169e7e03dd611", + "0xa2e8d5cefa5804894fb42a106340b00de3286fee0992b5887b2cf471539d74a9", + "0xf846e05c9e9e9cb4cd2b7cbae7ae183a43a59ab02251954db632e538adacc357", + "0xbc01b4e23ea082a193e4c1012b1da91f3b4cb762009ca320bc8ed294af874e79", + "0x9218114a32da3ecf660d4d51b101bb51bb17c771561c1946c099be082f0a96b3", + "0x3b4edf03dfd53081cf40c0b90b35c1ccf7c7fe96cf131172eef5eec62f620ea8", + "0xb15758944263c67bdf528d4d7fe05737fbdbf7ffedce5f891a4ddf76177d2609", + "0x1f119374c385240f7b4ba1ec3d502be2c12c159411d5393ff2bd38cf87033625", + "0x8a8d5a93f3475813926b13a4d53f21b28dc79ade2b50830c0b9043e9fcd81576", + "0xcc22f7e2bb9c06c15ca3d82df852ed9097a2ddc687ee389e662de000db0c84fc", + "0xc2047e0dab711db791aadb642f8102abaacf7231b8dbdbe1f60573b0be015a31", + "0x1b4088ceee7783e4563945f162bd5da67020ca377a18d615923e8564d6709f85", + "0xd73450686e33bbda9eef53a95a86e5a0514156b98a5b7dfc6fdc0adb0b83cbcf", + "0xb374076ec961360e38d3486a31c3f72225440984c4c47ca790b4961d94152159", + "0x4f723f4fbd31d63a5421390e68aba0aff97249875688a7d9ab9a339d9aac7bc1", + "0x5fe51ff982edcad6c0052fcdf9a70e8f325c8140ab75848c5d7b0d670bd7edc2", + "0xc3ad483c7cc23bf8d6ae3e3e829bf126d5eeea9c53b566a6da95bef573b9c779", + "0x3c9e50ed9eb57cc055fd9a65a6cdaba2030d8b41f81348f296d7410c1d24ced0", + "0x0c6dfc1f626ff9e85ff072c154152bb3f122a2c1a45bc2d9e7da9b2d5278149a", + "0x92f4452dbdb4fe70e84ecd47af4b1af90975219797cebd451beceb6997ab024d", + "0x9a3d00686736b5b838308da4b8f0aa9edccfaba64621ce2988cea6ea2a267efd", + "0x8d602d0bef069177102726d5ccd93d19805fb5771a350a41e32755ce740b9047", + "0x6681e4097667a22ad3713acc27b6f87abd54583230581933bed9245c2c457ac3", + "0x53077caeabcd926466319a3ee5c51c32e01e1812a65313f113f814d53e9f1dd9", + "0x4dd4c33e99d86ba84f976c639333fc072e262c0b76dfdf2f589300af54048c0a", + "0xbc3b9837a6fa54616dcdb8088080e276e2e99a23c8e7de4109504293703d524e", + "0x24316b344cecd5e601cc0acc91ff94f481ca3fa26d8478644a9d8bcaeb0359b3", + "0xa7bafd3c5f4e3f6b5c078d50eb318d91e867b0e1c966027e3e7458eb104ccd63", + "0xc8da46b7d778980d120357c8de2bba336f5a2ac7a9f4183a0ee1f7597ed47d25", + "0x7469fc5d8c9c648cd10e538710e0f126542e59a82484e7fe56b73f4ec52c36c7", + "0x993bb7c0487ff61c97e4f1533446ae35b6346642e1230f2441da8b354111d597", + "0x90e3944732f86a2254dc4f30650f8438dfd0b777561fb02a8ab1c60438569c24", + "0x4e8472483679b54bdc600010fdd164f54771d7a99fa9272c683b610fff72507b", + "0xf72a861a2ebc232c25529c0f94c59996e64c59c36a1326a183cf171bddf2a75c", + "0x7f222999ba9113e2a64fd026a8f7244e6d2ae8f2a7e7d8d2d6fbde6fdf0b629f", + "0x3304e769f730522c1c5aa745c448075df026b8f82a4dece84fd70d0457050985", + "0x9ee5e3ccaaf94461dff9df8c4805ca831f58a1586af4ece3cab14a45f3b784db", + "0x21e4364859063e20153d2d06eae4d2c9e99354bf97fbff68406d8825d18dbce3", + "0x4805355b72b1b61b07814059f80b4da0351291cc932292f23069197a74127726", + "0x14474f45f38d7ea51418e5f03751c8bfbfb9b3e2957d3051e862aa3c57a63c43", + "0x69372cee3e2807d10ecb72d404a033568a159a5b15d2007537ed9a758164b29f", + "0x147223b51001166a4e65372c9c706f011f1ae94f4bdc9ba6e8960017e8898703", + "0x11a1e48a5c1d7088c0ccb8177d54db9e9f91a99aa7c24f702cd93f4646f181ee", + "0x809c902b2f4b8760c3d2e820c93d6df69a5d184a43a6c654ebe7067e7212137d", + "0x749367027756c27215b2f57168ef15d3b39062c9f79b3777f7fa19e8073de775", + "0x6a9fae37364f97e36e56df97acb1b7d066a608d8366d7e008854756dd28fe748", + "0xdc2f1b7a8aeda15e6bf4f5f424bc54828cc8520e2e7ba27bd8e28ba2b543aae7", + "0xe0fabc892d5c8b4342ff488b76a0400425ea70774f207c546fbf2f9f5b105dcb", + "0x151fb5e02d8eb3c3192cb8c039bcb4c121c4ebeea5e7f98927b85a730a24bbf9", + "0xfeb2f2ea368d0bd4c0b0bd97b444c365bdc0ac9ce2862b0d0162387727edd236", + "0x1eaf828231ebbae54737111bf3c7181fe3d7e9070def1313470d3f81c89f01c7", + "0x8a1b0565013cff488bbe3f35df86fb41c7aedf4d911130802c473f4ddb74d6d6", + "0xce9158b5c903312fa636e074e3efe413184652581a4877d40a0085965dc0bf9a", + "0x1cf602c6306affe2916fa09d3c8c018f23fc44dec8af8e83fa0008c98b4dda72", + "0x189dc4569e96cab937265ecaea76a0880ec97d5b84ac1fbd0cd2d2b36a8c34c3", + "0xd698bd07e485767c1da30bb218265e1304f6eaf426749ccba67478817af84bd4", + "0x47d7e101de73bb0ca97a0bb70094e81b82c63e519a6b2aa5fe10ca7351232870", + "0xb0d441b6c41072889c4a982306c9a40dff77b43425ecc4d771c22f3199eb7708", + "0x7893071deba67f2fc8e1b18bedcac4dbc05a020f37c764c555eadc42dd9d29d3", + "0x3c6d636db3621757d60b2d0e1804e19528ce60c9feed1ead93731820ff19b11c", + "0xde87aaa462b461c4a33e0739ef4cf56d442b7967ac7c5280816a959046b128b6", + "0xb237b17650adcbcf580b64b500ecaa7ca36921a11ad92c1e8992c57cc1a7f618", + "0xec379725db43fefe61f2495f7f7e0531d852e21f896ae806144c4d9b4b986e96", + "0x65ac5548988825831f0887b9ff0f2c13b7f3b49e4a67c39b1694e76414249f6d", + "0x76053b72ec9e6fcf0a28ef273d3e1b0842c3c2c0e905f5b5a3535ffab216c8db", + "0x2ab1e87489eb1daeaf8882c6baa0a8726aeac522e9c4eb4df71e35af2d22cc10", + "0x8c9c6adcabe253b311f6a9b8165ff9c5e26e4cf41f1acd80837e77fc15526a86", + "0xf143155230223a3f126c757b85e193a9129f1bdf97c0ce1f2785f14d40911f30", + "0x8c510d9dca593534f3ed316f240ffb9343d1e3cd6d005df6a75a1b354da0b36e", + "0x3440975cf818a718beff35a85d19bcbbd67e1b16ca9d78af34dcde31a28b3288", + "0xf56ef9c57109f9cb7a925bbb6d453efc19e8a45b331f76153d20a87d86a8b0d8", + "0x19a360772872003f08508a28a362c6e05650b385c24a928ddad4d562bfccf412", + "0x643720694b3773ecf20437d54a6be701810feff233f435dc701dbe88c9a6a13c", + "0xf8c0babe99aa26ecbfc91b304d9cd54ccfb37354c4fdbeb3207bb6d4647fabd6", + "0x481ccc7213d0188e817c071c4cc3a71c96befb9aa98cab964012fd7a8267834a", + "0x02d83ca8d92e0fe6ce7643ae93af60e38ab5659a84c04beba678ceef654aec12", + "0x24e6b4bcd0d97df196f2371532771593fe17be8fcb89f1e1164bcce8616088b9", + "0x3dc91775c50c04812f755f3b48d3d6a0cc599c586ce9d105e2cf4f3e4527b515", + "0xcdc215f05398ea3942d3a38078a3602cbe8ac549d4bf0e4a54191ceb2aff8f76", + "0xee02874e444b784f4265cc60b86a17382d277d03c8bce8a33241460ea8950699", + "0x35c34bc84736fdcbc4d4e2e089f30bcd186a052b2f6dcb639fc45a0aeb6969f8", + "0xbbb3ff849c36659bf2c00feaad9f7b3a342b5cfcf3555b7c2e467a0dc84e90e8", + "0x0584bc60fbe3fae9088c214fb519030646c3240f77180a0bedecd3e9c9f47f89", + "0x9d18a665d89439ad2c97427bdab3e598f5bc0da6a0ede2378f95c5bc31f10d12", + "0xe8a5bdd0ffd33a6fd03cf003c6d2afbe8493e0f0cb69e6366e22b4d1ff985101", + "0x7ca955f4e01eef756b680d09c25626cf50013faa20a12b0a334fd048a04e7b91", + "0x064254551457bd5e7a260a41ed3643746202d503813ceaf42660f9bd1983be34", + "0x1191044e354ea1e3daa25ed2175a6517659e96733d9065d81492ffe4472fb96f", + "0xc823514cf3566b1bb2e19a35e0ef0980bc483fa820d13ae2cfdbf15fd426c272", + "0x413f941f192d0ab77bac68268f45e2c9adbee23a3324d4ae8748d09735355a2d", + "0xa66c94b9603b3058b730baeba1b79d52f548ceeb5bac487903f92481060f6804", + "0xa84d4a8860bdff1fdae6bcefcdcf700fab7857444ef1e76d8259b005872a4636", + "0x9fa64d44edd9c097458d3901612a4b6f655a1421ebb68541cb1a4bdbbe24911e", + "0x402027770edb387510241a68a235723c6c5c95aed54dab058c43d21a6bb48c41", + "0x776281b7e341a66491603b7ae8ed7cc82b99febac43f94cb1c4dda73b17aab63", + "0xfecbaf0fc5a02dcf49095514ce26df927def3cf51f37e04471545aae2364f936", + "0xc477d9293f0ace7243f8b9c89f01210b8f96b4affc9d3332147ea2e2b693c99e", + "0x4a8b9afb9d9097831b2497296b0fd0fae76ab8a596213daed35cf87e6bbefaed", + "0x594c4e9851eddbb4a6c2ac72aaa244ff35d67262efb20935360360d39f7c7ecc", + "0x14b7ef22c46ba8400979b6c06f3b3023607145a5cc6b5b793daae758cb655245", + "0x3a9d233553d1ca4d9862a70ef133a5fb2df75276fb24297b0bd2927a39459450", + "0x22c5e227d5fa7616603bbf36c5e4ee7dbf285fb0cf403a3ae982da70c825cad0", + "0xc2c8d439c7bd884665da56e3b680a5e58ad1e98627fdbec6fa67d7bbfad33a9b", + "0x7d5682cd9f28493ba4b87be141ec99701bbcd1aaadf9840b81de1fc07d4ffb18", + "0x8845f626c5f78d1bea281f892727437f9de8f976e4c4fec6060b2115f1862db5", + "0x769fdf0bcdbaec1ffe98cd3500ce8341b4d7ea2dad5fadb0258212306ccc75f9", + "0x185569d1980147fcdfcd0e0068ab380f0cfa58a690334a558bc1fd0d07897e96", + "0x0ed70ccff752df46f981043c5279ac3f13e7f62c2bdb9a0a9817a1c119ef6402", + "0xbe121e28349e80d601ab997af844aa03ea6492e88d75d3d46517d8f835e3c3fd", + "0xa7aa5f0bb95566292d22891faa75b7ff2020b69fecc8a22d796cc3a60953d98f", + "0xa2611b092b00f78fe639c4fba0274ae474fa448b3f2e4b8aa4d06c654720d478", + "0x8e425115b98f5e41c8b5d03a9e17d56d30050d85dd06cfff12f002c546a256ba", + "0x988b449fbd8c35855154fb4eb22ba6b7b7095be26203d137f484c67facd40dc5", + "0x567c43ac5dabeff01d6997543ec7abf7998088a355a6ba8e70f41a243dd1343a", + "0x6f560cb650142aed532f17de763d61d021cdec2716b0d2cb27b3a64052abb874", + "0x7e4ce5fab8f4f1fd41f9e5f10204032ae7e0e38093b1d07699318975b33910ec", + "0x91a0820eec5390916bf464b1d16c00b5d94386c4c9f4cdf7e0b3cbe40747fbc9", + "0x9c59451a9a242123efa72c5fbd1564b7bcc0067ea9d025336d228ed26b9ba6c0", + "0x1043a5ab3f5a3bced84faaae0e783abb3b81c2b967bbd976042cb5d897d28146", + "0xfc37b3b3c0be392ad2a5e36c120eace1d14e637ac806e79a750b9a6be3c742a7", + "0xce2ccbada44a8db5144073e69914b322dc015273a75b85ea43fd9e21037c760c", + "0x6cf8336b5a410e10604f93351242cb3a6929968212abdf85b4ca9321115b8fdf", + "0xabbe9781950362be1e206d91ea1bdd6f32ea2c6df65b277cb89050ca1deb9296", + "0x922a6b85add6839494c3edff389aa1b054409c330b4a4e2a6c0e4f9bc85b36a9", + "0xc26dcdfa135a09b7eef1e99b445fb66aefb8bceb6ea715b81d78ba87cd56ed8d", + "0x87d647fa7dcde81a0e133aa949d574befefbceab24a42ae4f3809d2bb52a2d9b", + "0x85ee37fa7154568b9dee8a539340f99c7f1bbc7b9be1f2055636ed9dfc074e4d", + "0x8b0114dc9e249f1de4bb3d055790e4bf18aa28a938f39e8a457ab4a43b0dd613", + "0x3be36db134f4c00fc9e1bc376213c7073389c993b0b0744cba619688d6c037d1", + "0xfaf987eb2e066ad8871c489c23102ec5c58add2d13e62d56f2821cc1f4d66d84", + "0x678478da2955e6876ac49c5146e9f7c376dbf2f170f6404054ae4385e72f3f19", + "0x85d8d9dd6c2a8f6b6a1c0fc0cb55ca870d9a7aae1621c143c3176a3a81fcc29c", + "0x76f4dfa4c3387408c823a75aeb872ff39af3820375ff52f7aecb41c96e4faf2a", + "0x6e530647f2e4232063de2fa8f673989d7834d8cdf529791032888f2833880b80", + "0x64422b4dfff6cba0eb6deaeb4593eefc40a357469a7f7c3be078f80c66161333", + "0x5c7ab740510a4183832bd78e6d6105b0f9f928611f7d62ef96aa8dd8da48a72d", + "0x0bbf405e29f015d24e64f063d50ec6c616af64622b1a4132cde86f926e93850f", + "0xd9ba81ea0790f1f8adccd0bd203c7adeec2b490381b822d6b15293cac2f26206", + "0x4f78619baa34f2278022c509671a38d29366936d6860e79ab540ea46b66ba782", + "0x00c1f10211d7604e59a327239f00dc6d036a93416b7871cb214e8eaa52571834", + "0x1b6636708f97485675c0e5b21eb749ee4a5fd0dd886e6690090856bcc5178ec0", + "0x71366e853968c1bbbbf8e3d6e13100dd589521f8db9e561dd20ff8709b5c1a96", + "0x0d2c35a01646cb09e2b56b5792ac03047848bef7415ae26f787cd54ef8f327da", + "0x1c5b71047f99db30453e502c9acdf422d3bf97b0d42b9223ea1b8b9924bb0cb1", + "0x9988eb36e4a669638e3242e5ada3e6596c5e4ef36a83ed2d3348d35fbed4d3d0", + "0x8f00020f98f02af0749df39fb2f534d356e3dbe809bdb3f435c4a575d661d6db", + "0xf70a509c0d1c60afcafc7cc492c5ad575fdcadf6ca8e0e5f184c62dd52021129", + "0x72cdb6544dd469ab42e270e51d136b314c27ed0d6682f914cf3e0398399d2d5d", + "0xd5584896e649b618ab8257859e42ef7798c37cc85103a8019cec10b1524519f3", + "0xd70636cf5cbe78ba86b8de902f83f9c550a8ee31a019da6fcb0b1ab0a02bd31f", + "0x79a506d61c89cb7b1aef845484956389d5f6077fd10f8d1ede1e92474eac15cf", + "0xa66c0575cfea08bc6abbba03b0d10be7bdcfe6c5da9058cb34c22af2c8f3f1d9", + "0xfde316523b6b41fedcf11d776a53bd27fe3058c3912059197cda083a14410689", + "0x6774beba5e02630a7e4379fed7175f0f3d9f8fb5333451f25d5b044521ed38ed", + "0xb513ee7cf03529c88633176792a6b08585ff6163fe174f68e285d6315ffe33aa", + "0x4482f3d82f65f0fdf71fdf669403e0b835b5458e567dbd295b4f51d22f01650c", + "0x1cf0c0859b1839ebfb872a570e0c17886d8d7f26067bcd16af7f9f0415001aa0", + "0x231be14cb1cec949a4e806a7b3aebdb074d58e5a1c48b85c35138d5d3e967e0b", + "0xe8f0a0ef68efb2ea1bfb5d47e3c9446900329ff89a3ab7eccde41e09ec3e79b9", + "0x16348cb5e49e61010da09a5ad3cef83ab369ee3d0f28079584c23749cfa30238", + "0x6d33bc7f502436bfd0d574c3f6b1155c69f8a80e55c42c353e9e68abb46d932e", + "0x0e5d40ed7351b59846ca3dd8cc9c0eb71d4659e0add0dbfb0bb7f518bf45c821", + "0xb1ba4509de4c0f1212b2b07d949740f15ef8df9af8e7e9d765e6b407a0c5d717", + "0xa99615bb15371a15b92c119f8632f1ad7c29d6eb9a69e0ccf33a9dd268cffd54", + "0xfc3601e7f85e4b8e996bddcf1b34cb6c20462e21c715782da12d8e08a01cd21b", + "0x872b0f4f3ef00cc5cc6fdd71091de96c02f5898826fda4f837832f302497b51a", + "0xb34656439e4474e075d8ef523f6f74ef292a22281e6dc0b8fabdfd2339389919", + "0x048d4dc500031aa56d89e799499a86d6dacddea795ddc4571669fa55d694345f", + "0x684b8762b97a9d650f0f0e5edee73b60a29f6e75573bd6244518b11c4a571533", + "0x5d20bbacb93f7b03d92ae0ce8296bfd113a808ab3a8bd7703838d7e8356b6714", + "0x25efac3c3bc3d4f10ed9918fd9581d68eaa18fb72d3ce7ca8e36525d8cdcae73", + "0x48b593a335aa2699a5bb5a60394845c7e4c78046e050aee1c7f8831249f75b26", + "0x6db7243073caa6e5c0442f2f3926885fae0385e0238a69784ea8a00c854ef8c0", + "0x3a104e4932193c644e2135008d78c5153a9331e6d9dde878357c250a3b42b5e7", + "0x74b3b4666fa9811702d4eebf9680053043160be3a6c31a0105c703e07d530710", + "0x179f67ff0710067d3180ec03d664fb3d9936e8777603b051ebad4cbd0aad7763", + "0x38d5fd43ca73f66127a0166ae074324471b1a92e6f4bf99fde235ac408b35562", + "0x1f43748a027e7731c2fe5343ba7b61d7c6c6933ea45466b439a43eee1a3ad398", + "0x6b130b75bc42dbbf76ad97287a3a130ea29122ce7e48c5a8bd1e80a5f3121364", + "0xcd17f77d87174ab6ad6f2dc60d37144aed40b3620a9e6c9ac3e328aeae3097de", + "0x3b7fe9ef499348315c1a2877bd7fa44b622fcabc588687a6de4d2f75aad3f642", + "0x6c73525865791a7ca8410363d634f6babfaba581d7a0252c7f57dc8c8cec583d", + "0xdb16b0220e129be4c929888a8a46d21d422a352ac7b0360711d786eacb56598e", + "0x44fb22efd89e585079bca47bde1073dc052f8ddbad2c27cd8e2839bd4350b18a", + "0x1e6f1395d417a94162117b9371abf3f781a4b05d787f6a38fb0101bc36e548da", + "0x3eddd0764196fe15d7ac7069c04c4bf23070e57931493e9a0127fc521187b698", + "0xec104582dffc06da3cc1af1c8dc7522d26ab2408dc0f62051da2ebae1ec1cbf3", + "0x3616cc0faf8a5f5c19cbeb482be2ea8de01b2a3e81f067366c715607cf29078c", + "0xd37ca9cd5dc7c3c4e2d2f1b3c8db2a016b52444f1c088680c8544b6cea30cfe3", + "0xc3d85c7899da428a305d941e3637e33eb4981f071ee07c1ee1c82aba7c248167", + "0x62975f10a20de37466b1822859f11774efa4f37fb701f6cc0695d206bbb51582", + "0xd940124857e67e220e3d4dc27eb75ff048aadd9b7fb29b680cc3743b3ab6365b", + "0xc89ac3aa4725191e56fbc87d41caac2c692dd5adae638bf741f0ded040ca66e4", + "0x97454878805915bcb60c9915af0fe0558987dabe5d506e03898dede96544dec1", + "0x6ce55ffc54eec31d980ece5204876a3f366f3148a4b8c10cd190153cfc96defd", + "0xa4e923671f4ff6dfde2f11cca452ed4208808e93e1131de4ce0804cbe2e0d3ad", + "0x772d1c2a0e70fe37ac0ea8d7b4a789f92997bd654809f20f0ff7ad76a6d975c3", + "0x8d5de87bc2484465a4876b462ebc1339bc13b8229e6df4f1a9e9b458f5e9adcd", + "0xdb33cbb2dad0eb38613d69392951c6062eb669035691882fdafc526133d15d21", + "0xb22b8c0887f71de2da3d81a5fec2213ccb8a32060211077e2ed1613cf7962e94", + "0xffbc5a82fe0c2b3f3f34343ba6823f35884c8b1dd80fbaa68fd5f33a960034ce", + "0x9640ded5be08a8a7a2e6291a91bdd58bd108205f4cef5209ddd338ad764fa9b9", + "0xaea7f934206d00a592502b8b85159e64b56def4c72db3a790ab46ca81c75d672", + "0xb99ace258fe4e6be541c6e3468913f4f32ef9e9d1375c889e17ceea0c606e729", + "0xc54ae75381803d00b52ea6fa620766662e6f7946d550208743fa64d3aaf22c54", + "0x4e773cd4fb2347b796595cc67eb2b5c7be6409bd8b1944f4cafecb6fc5a60a0b", + "0x263f3826196c238c24d4c792c3c45fc913d4cb94c2d3871827ba43faecbf4d94", + "0x7ae1714256e21b9b45778795cdedfad1160d571004f5ea6debc16406bc2161f6", + "0x0c271dc055d8fb1ba9bf133f3c85628ac3c2b588091768380a881a6183514b51", + "0xa5f41cb430b02fb1027d8e99cd94dd6666516c785d7f618a0894f38f811bdeed", + "0xbf6665cbf1037e0085808897d8b04932a6ced6755fa52555ac00737e8029c7b5", + "0xaaca2ffc61693a6f379e54af473802770b3971f6accef49e5a2e8fc122e0a490", + "0x7a3eb7782e2c02776aa29964689cb1b880201e1b81c8cef39738d7f7235fb022", + "0x7bf417dda75c46efba6a8344775915d2b69f954afd66d8f52576e106d7a7eee2", + "0x3a324507874480d0f4e8466ed6602c99fcaa7907b61e9f2b3f100740f7866fe0", + "0x3589941fb7bfda9bf50ad93cfed18cfdf199a6468074416aa513cf83cc00dd2a", + "0x66b0965611bba105667a3990de5acdbd398d8d6e2cd0276b83814c4647bfe461", + "0x703258ca6154ec4cb1b9162678e3bb546ca6f9e626702f5f62dda98fdc0fcf26", + "0x2a9a8e3537b714cb3e158f7ecc816239786ea3787b1a3bd40482f02eb0b21595", + "0x46104b558f57296b0775d63ee4da42a716c234f3dbd7479204f35b31f4b3d55c", + "0xe7d9d0a86cc8b76526acb8e260de17508874d1db6ad19a4a84210a010212d43b", + "0x04af6e8bd51cf4c4307b2381b2e0c54cd991ca3c7f49b8cdcaff3aead70efe48", + "0xab8fe05db68e486bf2be0c507b834b6e496c1d1fe560cd3210ed7fbf0e9b867a", + "0x0e6b5f226d0bcfbd1f0a2f61189592d8974b16376fef3d0a67f757b796ad6854", + "0xaab68c29b061f8f72d9f3c6f2e318a7125a01010fb0c547835fa31e72d8eeabe", + "0x0446f90437150e4ec6246be5c718e5054d62cbf5878479457d522948c6e87f83", + "0xd1b4669e21c0b175589c0942d4423cd2b438de6665f0bca10818eb6246a07749", + "0xc20d1a68c015d886ef8fc3dede0d116199480164238617667280f833a4dcbb3c", + "0xe67504ba38aee984e9118960827ddce0eaae3d8797bfc87afd4638cb1867e41c", + "0xd3e985af3bf3e3ad0dbcdbed9ff1b04037bd1ff2e71886db3842a29f0ee8c4b6", + "0x8b809d1ae7a835f318f471ce227f7e7ff563a15d1e2463e8fce5852c9a3f9ce4", + "0xc232b56170a5796aa4333d29ad8ba43dab2233e0cf7b48d100aeaa4b2491d6da", + "0x9c338ecb25290e91a83978df4f5b7076b299ba5d87074c36ec96da0b3aa9351d", + "0x616a6134eee1221e531fc6d6b5861f5ced64e9b56505b169da67ca3c47cb54ad", + "0x4afd1e60cbeb40301c2ccc7129042f9a944f4a383a4f34b8acd7aa454fcd0e7e", + "0xd52d1be650ed156ba12b0d6be4b7fda1fe89927bd7626ec0ae45663848144e7d", + "0xa212644d968f7d3d89c6f12c3c3077184943d986dd9cd391d48f8f98eb1bc6a2", + "0x8e3374acfb9d1724fd7f84c22fda25f91737efde3d667f607b364e51beabecee", + "0xd77eb30cd87046093b27be1a09d93cfa5261b780b99116a79d6c16be7db838ec", + "0x05093b9e39e2d9f4fa95ff386cb2af67861359ea6228242be6b323c1eed5c7c3", + "0x8bb25606225d3451a981af24506a549e2bf62a362149e4c77ac72eef6316e691", + "0xd2749fc4a37792b3716634e3dfb8a80ba3e30fd73bc119069d507bfe7efd8a1a", + "0x3b58bef2d77a04b3281e6cf80f984b9067290bfe02a596b2295ccad38e887a33", + "0x2f69797f1800e5da4a4086909058ec857695a220644e61788b24ccfaf7e77137", + "0xd81872c67fbbd1a69d4805cce578b9f36bfd768d3fcbc2fd610182a7696e23b2", + "0x2d3bc9fd303c12ed1ca7efe27d85c7b5ffb8e079e59c86977a113bbbf863549a", + "0xbaef802512a7ea5006cf816c51c35fdae44a86daaeb6e9dd8fd0c37b4f744875", + "0x2e7fb70924e6f0b74541f2f4cb13f49bb3bd577f5bfe1bc29d805b0e7e1a3df1", + "0xe3918602d83478eb416dcf80103b09a051d5cffc71b0cb21461c5031d38befb7", + "0x87dae7dbb38501d6e84f738c11615dd9eda5f7b77e096a765caebea6a8c691c2", + "0xa19f74ad3f4e218fcfb15e4af95713cfff4f5f58169b789167e2b62617023697", + "0x744930fd0046b3f7de0ecf721e3b36e4b36c0f49eb98bb0c9ed33d40e76a2017", + "0x5bc7194687200989382831785b43f7f5efb23105ee2dd7a620a61622a2afec44", + "0x3672af2176d897cb8f64f2decfd924d74581bd85916be85e53f2542a54a24b94", + "0xe2e2dd1875e9265072d96bda4640ec6beefdfa9a91241ae078cec4c2a1c9b8b3", + "0x5866de65d88610e6123b7a57e28e196afac484045261d1a16b83fa232ba267bf", + "0x7224db0ae652be5fe9017454dd40c744c75e513841b5cd11d5fcaff598265c7d", + "0x04438fdfb56d125bb13f6b8bdaced6946299f8a32610205fabf4a8db9c06af60", + "0x9e9af6a569b87a4717b94d8253a0078409bbce7bc08874e091163b621a75b999", + "0xc8a39c68a74f23d615ad49d9d175086bf4e1047a750165bb071e3cdb70e1d639", + "0x10515734fb6d38cbb9a7ef33ec7831646636f845ac40cb24b08c432422763466", + "0x1604dce1fd615791c66246a7cd82edbfe860a5ac48d000cac1984faebc00cafe", + "0x56311f68cc563946e251d8c0ea74adeee6ed8dd7aba8f6ea85367defd5dbdc41", + "0x3fc81adf318fa6db1c4e7ff5424b235943667f2f3dce5119618e0273eb23c93b", + "0x38576704f6ca62083130dca418a9b68e374944d63521fc3f4b7039754d62f63f", + "0x56e2a402baabf470d0f9c3496d75e2c26c26ac159b996c370b118a313a9e9464", + "0x501af705914bfccf4ad29c38eee21641590cd8d334dce9055d90bff57b8fa556", + "0xa734b7f045d2a23ce602b032357a66763714c6e4785768f07d55c22d2f1de372", + "0xc80e2c739a3d142a4018bfe2074da8da33c471b93f5e7b44bb150b9eb63e956b", + "0x7a0b1355d05b1bf4c634651bbb2b6d65cb0a9772c30e4024f5e781e5d404376c", + "0x73827f7c7a15db5c17a986f31dd92de05579b0bb8def065e5f1cee472d00281d", + "0xcd64ee4b2a912d48e6beb06e7d6c9c236b5815434c0ee21cca0a13ff23dfb85f", + "0x768d2fa63c53689ed899f47c6f78844ace885fa18a36da427428f4af46a9e1d9", + "0x643c26723d5a4831d3d07f8692a6dc4456bb6190ce2abf1abf69159942d5d548", + "0x03e20a75c4546d5f54bbd7fd3e54c795c180b880563bf78ec55530a89188a9a6", + "0xa0ea4095dd9fc6f817c656913f8cde4044e2806488be48770de5574c0b5d5f8a", + "0xeead5fac8f3c83c5a10df161d95bcf1d27184c9fb9fbd813ec5f61347c11280e", + "0x5afba4426fcae0f1769e581fa6af97b5ef8fd417771f10405e1c9d09a74357d6", + "0x087f65be7fc2a14f216d7ce418a03fcf1e6169e8620db65c11d1ed6c0afed240", + "0xf9a7e93c40788db39b241e03afe329b6336187fbafa40c97ac405fefc1eccfc1", + "0xb02450b58c5afdd0907ee745263aa6beef662646b96b9ed28b0dbcea4f358667", + "0x5029f1169c92671ecaad7239f40fd93adf3ec07ce2ed0c4cac38b0cc8034def7", + "0xc8465a93a1ba7ec3296d98e0b01ad27bdbf16a347c5517b450905d3c3668d505", + "0xb85cd82c551bcb30a747b2258327dccb04094f918e36c3f120f55fc35abf59d9", + "0x1721b2fb8963696cdf32385fe87e8ec2c2d7fa34e099bb65498e4a030e20a1c3", + "0x6b6dab262c1a32a67353409d2f8b791b1799ee6a8e3c880877af0bc5cc5b812a", + "0xa634110e4766d3451718061efb890238796370da3c4a53a91faa96c8944d2423", + "0x91ec6c6f807285599e0a179d0d246caf10152e733acf3bb967bae35fb36561ec", + "0xc3b2012d5cc8d796d1890d39e2b1730dd53df0b98274bbfef8c93bd969912852", + "0xd036b9b29589cc551bf27ab95b6366d772e7d692d8fba48f473a2fc2d023dbe2", + "0xc51229a0306e56a53bdab1fda497281e23aba6ab17301c2eef3ce3d01f56989a", + "0x2652cb79e0c18dfdf545562b8569cc2775a1b0b1b465cbdc5880b40ffff22676", + "0xf24e0d6c03961043cb41638596c4ca02e2a2522a3e828dc4613a72ce5a535a67", + "0x01725e03a7cbfe2d6c5623829e4d419bbeecd1c7f925dbf1667979bb4da6650a", + "0x3b0c9824b726b2b556c6c46af48b84f856154490a51d775ba06aad48055bcbd7", + "0x2be2f1cb826d7575e53bc5e14f1882d73bfe145ed91b2ff56a885f66e136db46", + "0xd16752cc862f33b14f5976049dadc4f15f147f2fa76c50bafb38a7cb25c8f881", + "0x66b3ba188143bd421009c082031696bfd6d29fe7b9c3345e7e70bf6a470a05ec", + "0x83e017e8701b533c9fd22e30d63c3781b0ac9ec1dff4433fe7fb5c8f6f4e67ba", + "0xe4782b025953c5980653abd26eb95de1bee0524c14a74b970ec5615f98ed6768", + "0xeda29e9b36262e7c79ef9c0b60fddc66bae542b19caeddcdedf439573f773cf9", + "0xbc02ac1f023993253394ca965f4394bb40f9c7822ed6b2cbdd249e4b72f9b637", + "0x8e1bde0f2541d20b7f7e8179014e0f6b98eee5c1e0278ff1de38f4c13fdb4161", + "0x7b762d3d64aded9ff99e3423d7e676dd307b765ca6f1295e079ac53d5a4788b1", + "0x1027bb44ade6a1f82f11e9f298fd3957a9636bfbb97457c319e3d57ce72146b3", + "0x963864b3164578d4a7e58de16593273067a641de752b6df2c9b8bfaf970392f1", + "0x16bdf92929fe3629a57f737d83328d034c36bbdcd006301f28dcf52e1d1cb542", + "0x69952e47225f1aa86d952afb0fa8c668ae710a10cb6a94477d518c8f771f5c30", + "0xe68895f4ae2e4a35fb7e0730a5ef9c3e3030f6351ff6381f77e6311912ced98b", + "0xf28d799eeec538dcb2f371cfc6aa16f4a6808ddef0e6fd0cf72fde291d94f8ad", + "0x5a404922a9bfe57eb85deb66d8d83c869ddf96eae17e7fdfafef19c19efa1eec", + "0x96b735672e85aa95c2f8b4bd5ac80942923cff64a24991b3103e4ee39fb9a8d1", + "0x83d922f50174810fc45daa5a607a9b4fce69d8ab86f428ac57ffdcd9c2ff2908", + "0x3b0ce5a62116eafbf445afff0674112f01e1dca0e2af2b72d0cbbdc452177d65", + "0xe86cc93417c7dbcd4b5f051f4dca1394d272dcc2101a9e94a140b20f5e4c8b59", + "0x99b3e1d593b682e1b6454675593ed6828f8f4c5888b965981e3a7c602d89d031", + "0x81e0eafc2a2adf3d94938c413cd9f588e7525b91f39a689dfc3d0ce6aeb812a0", + "0x699e692ff89a918eee6d19a63caeb07832dabf1eb28d04ec97150c87045d9129", + "0x90ff00b66a14d821b05f692ee6d100dd61abef3234fd29e94bc84574439ed2e0", + "0x2de5779a122ccd84a88c3adc4edf7c1c03dd1d3e89ab45657885aadaa087e833", + "0x775a5587a907aa5ff13bafed032dd96c312b19dcda1b0e74e8a4bd327fe90e50", + "0x4fa48215f975442e6b9ea0629d308667242a7fe89f0cd0eae55ef1d35a3d6ab6", + "0x2e24c24731902f1b9e4042eae9e946b9d884dfa9f733ea5d4f7e778b68daed9b", + "0xf23a4a6061f45b1ff2095adf02ded238b37a0ffa9653fa9c1b0069e37e8552be", + "0x62b94eeb74bca8d9ea91aaeec5c13a05dae022806df28b92ecee99b47de999c7", + "0xbe6c1797cad2d5d9ddac3b3adcbf1622241e2560e3407139e24dde3fd8d3e435", + "0x7df0788058bea0911f2e30133c835515bd777f7aa9cab6bcd27eb3c0a6e360ea", + "0xd87066a4721ce567f44abf179184381d81c1c487158a6c57b5f2455472209a5e", + "0x0aec7d3081c3ee7d61f36e8c7e62ab74e41f00b664b690a341b9ff7feb5adce6", + "0x16345b31779e80499dc01f9ccaa0e9981b2b336500f33cb1f2943b66ccbf74d9", + "0x9ed6c6685dfa2b65903db0b234f4539906121330c5d55e6b2a2fd30549b2dc23", + "0x6539602958d9166335a7a0396ad72be611661bdd40c786cf9b0f382039c6b46a", + "0x72bbb4a201de75b9a4b5cf7381308953234c62f295df08b919c12535febf6fea", + "0x2d37293863f6b90f43979ba5944bec302008957e07b7c7f2292074a0a3934674", + "0x22677859ad20cf8b924d516b9f979652ac91a27459a4eba5455beac7f5f23128", + "0x704c898c04ead58c2fdb2c753359d10934e66b326f104be28ca7a32ef05a2bc1", + "0xca2b1ac29937067b761b57b58ae4069eecc799dbe089342bea274e56fde3d1bf", + "0x4a9773e6a2e75dcf1ff46c8f9931b8170a3609023f47c0ea9c4af000798bbc22", + "0x7e4dcb6c256eca2cbe9d168cc78c2702c373fd6e69c210d0713e2766baba148a", + "0x399ea7dbb66b95bae693402eec304f9cb6f4c6ab729d90ca569fcc2bb24d6442", + "0x49d0e561773458f834c96e8fb9496d4cdf83f2cfab75824cb1eabf8e8962c18d", + "0x80a0a209e41d0c3ff07ffe6a7f1af67997662494a327fa7f3bcb7209340974ed", + "0x2bdd6d6e7ae3f4386fc655817e92563e80f46e1b277be22f81a689de7637ea1f", + "0xb77f32374161e54c50dbc38822760874d966f9e098a2ea7aedf650adf25cc0ad", + "0xb49b1decd65a998a3dae2e4725eaff56276af3f0c50b2a3a35b6e94738d32808", + "0x319f78ae885011458f47ff1a110881cb4ac6a78c7d4d7a2656ddca73a88b58e2", + "0xd9fa2f47bedc0b405df34c98582b553dde76a46d38ac86d9d357ea0aca60ec2b", + "0x4283ac57e82bd08970ada71f4617728bcc467eeebb19c3aa20208a82b18fb508", + "0xf2ea3a5ac3bc77ff64f7c686305044cfe539856fb2833cbefcb283317012062c", + "0x840a9b8c756c3c3de7170c3597bbd085747b97419c01bbe484fc4cc7924736ce", + "0xa88682b957deb995307ed875c4044246d779e3f8c584cad75162fee119613806", + "0x7b9195c23833f65832a44d097290d8573b43e6f3e47dcb8c3826ef9a52fb4ff7", + "0x57bb0076c87f2e7187ea92f9f7643eb5b4b823b8eae9f6e74c8b676dd86b81a2", + "0x68593a8268b245a5c7506a05860755cce1be795994a7d736aba41ead4c025a68", + "0x90e21d5927d39329874688312eeb5296677ecccbbb9c6bdd4400c50c9bda09c4", + "0x773c0cde2d1f44575c89106a01881eb5d9593bc762a40be03ba979496ad7d229", + "0xc1dd843534e9844bcf406cc03b277e71d4e73026635412e25f3555d099f26a55", + "0xdf3f794bbd98096cbfa17e168c0de845383abf52fea618937ed81d31cfdd88db", + "0x1b05b1f316013609fbf813cae674f193a9bd8a75631b55278bbd37513b85641b", + "0x429321ddb251fadec6b6f794acdd8cc9d93512b98af23d20749d93c3c9fdbc36", + "0x6cac90b28ed13c907d094bad45574aabe2355e13e6a9504b6001e5fbb9c25235", + "0x89b43a3f63a2ce4f67071a121f447d7e843948395616116ddeb57a8714becd3e", + "0x6de560c95a0483d51410f66f38884947dfc787e1c61d14421129773010b46e0d", + "0xa0ba45049971dd4b906e73f917fd16312646d53c0cdfdc3eefe53628a58973e8", + "0x3d4a4f7155eac18fb5a126dcae2035155a140a84718f33bb20d2f1461e8cedb7", + "0x1cc19669bd91087d2046770cdc34e8f995cbdf2a0cc62bda70d6074ed58acefb", + "0x7c1c4aa1817de27c62f35d66927d924376798c954d65ba3ba02c0528d11d748d", + "0xf0d67a8f3c5306165cffd44476249c254898bcb26c937f10e8ae244edab1b972", + "0xcc20c5ecb1d3e83bd56e9213761f8320bd40982ab5fb669bed774b4490637932", + "0x7935073eb3e5c37ed1135cb22bfeb0e21727d170d106465fc35de75e8d56cf41", + "0x7d968e74212c501d0bc26ebb816b57a37a8cd2720caddb5bf66f489e13a61bc7", + "0x2c134dcc35d50c63a13bd8868137e0240280f049d7e392b97ff5f76d00aa1296", + "0xfd046f06c1d46d9125a119f786acdd76a85fc596f21cb15f367933b717ba7d83", + "0x9f5f067e4af3c8e92d2d54dd061620f0a13a66006b162a1eab4b1707499597df", + "0x8a6e1fb6205a423ec2920d448a376b95cac7233d5312287bd850471fb49e4f8b", + "0x2a6ea987659383f9885d24c935fe56de39d45caa89e60ba1768189318974ed7e", + "0xc2df6c8a4eae77eeaf11d7e5e2198ec4a33f19f5995caab4db6577fc1ce7b957", + "0x1e2ae8a42eb937749284820e50f11dfbfb606ddac3efb201e0b2664dd0196d63", + "0x4d63bb91f9f8a9965c460326f0604a27ecb0fc56f2126c6b3519b08a895747b7", + "0x9a46c2ec5dcef6f5c5b76d4b08b9d5085709182243cb8308a2863cca8cba13dd", + "0xea57019cc85f7cece4cea7eadda96dc9e464df2689957ebfe8d817b6996b2e43", + "0xb40e930b31dc1508480ffba351b102c8cab53c6603a0dd88bfed1b0da5347153", + "0xf51ceb070d8e7cb998cf4979ac985b4850949b4456980f523d8b9d72604a43da", + "0xddd28627f5c7bd213149bc4886bf4bcb8304f86068694fc743ac81ed749aec3c", + "0x9ef2b3df587caf086f4a9838a829491d1ef45db132ea71c6bc96a4a40d833e92", + "0xc9f7d4e19501c48dda5b0012cd93564898ad080a653e29f3563ecd40d36de84b", + "0x0565db36e6fb7b881eae309fef6fcdcace7c92a7ff148476b627c012aaefe4b9", + "0x08912abab10f16b92ddaa3663375f6e2b656e4ed89f2285aab6e410fc59e650a", + "0xefe9e68ca3bea929722bcccb5150884eb23c32153b14644b1c7f4e033dc3f718", + "0x4b33e0e078056d9efd857f909d1e409516f23da68105463167e23d71c90f6366", + "0x63cd4d1c69c4168798a3d9f15388207ea10ee4dc6be3681b0c7dbce5649d8f90", + "0xc8e7c25854d49022e9a0ae2eda8e7835a6db9ef7d612312e9deae23621ba240f", + "0x22c05e50f27e8bdaf4abb0a045d0639bd7f80057dfea638df6a7184ac49b738b", + "0x4a34356b5a447591ac66c51370fb6539bdf50fda9600082dadd91d33713a74e1", + "0x7147d53533ae40e886f6bc1c3b65c51570d72398f46e3266f2eba7b707b46b3b", + "0x1e49f75a30695e9bef14b036bd1c0f2b322042b2a02ca56604484e913b284c1b", + "0xf2445d48e823bfa77776234356ae0d3c1a850db236b3d2a95e5b00c4d7e687af", + "0x7034246c6342c26f5ae974576358f993d0e5e3c577e6aecdcc182c78082ab181", + "0x965067896ebcb2628ff10127508df1c811087f45ae258a0d8179d576c21e4891", + "0x384ebc34021ebdaf95e1bf0d8d61777b96a1ae65163cd3bd9b4311970a7918b7", + "0x1ca6e203cf1e058f20f5a8b1e33464801bcbbe04c79a7201ad6036bb8aa54101", + "0xf5aaa21a85fa9d502ef278262acf71789a3755d36dd8b3794becab7fb2d338e7", + "0xdeb7dec7ec133b6ac05c3bc0fea3b0002c8ffe58b135f4ae85b71fe0350dc7ce", + "0xd5773586ddb40d4c772541f743f7a4b08e9b419fe5b5b3536afa0b3b888725bc", + "0xeaff5bc016770c7cce7be21952cd8759a8d0eeb1bd849732c15dbbb82c613a74", + "0xb1a6a6acd39b4428accf9120a46d74cca6451ea4a182206425a8a64c6d6be5b2", + "0xfff27e5023fa1fc365db1e79cf3283bee2f51333059bfff47df39f12875e5fc0", + "0xadf1ce203b0acd4cdaf1d9a91cc158a21c823dcfb0740f089ce0830102b1cdef", + "0xcf20c92fcfa22d6fe7a60d1aab2d5a942db39d447d4ba1e9e76888a64694f1e7", + "0x210a684182ea379b50d641aed1baae3bf3752fd84feac4b3dd4e110c5cfc4ce7", + "0x220c5460803cc8db7a2b645dd5a4525b0703182cce173324d20e1c865a157811", + "0xba87b487bfae148239b44f3ad7663fd66cde8e21aac9e1a50bbca7bb7334aeff", + "0x2728161f9f040b4d92ba838d841404604d4d838157fc66f20d6c4c61034fdbda", + "0x3f8a6c7198528e5084b3e8d52d3101c27c5bed8721beb831ff921eaaca4c4282", + "0x2cc2574320b3c7252404db7c67b462fbc8d87bdbeb782ab1bbd257ee634a35c2", + "0x13aae0ecdc6a70d85412178ec12e971b2c4476d5e624938ca0284ccfa611d11f", + "0x6af7161831c3442db94cbe28ee9385fe79339d533b9c0fd3266213c2a5024a14", + "0x06185136927e5bc26ecfbf2299a0fc13cb447df6ca4a60e968be8c2b7ba1c2e3", + "0x70ccc84931d910a2489d50becf82383a836309bb90dddb21026d9e4e4368c85a", + "0x400ae9e4da0f847dcd4bb65e8f9f661a3b0deb78346b4f1f84fc712fd34410f0", + "0x57aacedf503300888fcd8db2138badbfcd663c63c3cf5b3e35979dad635c24d9", + "0x8fea6cc2da76b7cc7062af870cfacf4952b81f09c3c15d31145fbbfe1c0806c1", + "0x5125434cc5d4137ee31b51ed8306b4d665b8dc66504661b46c227e62a9ef1abf", + "0x254bc0b61211e0a57755d73ac618012938472912f855972b7ce62677f5d0e64d", + "0x2d231389c849ea459a7530ac1bdffa4d84908e2c61125a70bfcda932cc8e5efd", + "0x671ae73d4739bcd4841fdff266803117c5684c61031fff16e831a3bffb4bae4e", + "0x64c4db66cae82a96f29296b481619d79a739e2dfce0ac1f659d45f526ae58ee5", + "0x3f2f08ce2f21253f8c9a3fd650a885ca0e77f720a21ad5b4c0867150a0274efe", + "0x98c48268710592ee4c26620375968f2b8730a1bd1777239e6ffb9f116c6e1284", + "0xdc7a5c095c255e1984b4a5fa75c7a1d95d98097fc4eba898e644ff66951d8dcb", + "0xeee7579812ef09ae31068e8087536362a967b2893b709a458822449ea89a48fa", + "0x296e707796c0b9f9a2f55ad06c42d03625dab94af71c2e1c7016a7ef6645bf5a", + "0xd9a3eb363d4a36300dc4d1903a83447c89ec286f8d219f1156335da283992d60", + "0x039adf5a0cfbc394847d8014d64700ac4b6e78b531a1e0328bab256f7c407116", + "0xf9a92c6b1f0b0b3d7ae33cf5ddfddad516bfd7b21842d76098737533efd4f7a8", + "0x5a5d1fa3b8e05a81173e627f14e689c166776b93df401593db8035a65fba58f5", + "0x34f7fda3053b9d06e217223ee06fd194e2962c4a381482429e596df1fe319686", + "0xb4cfd9a71a98ad52c7705d55e96f04cb9064b1c32d3c346be51370b56ebb0f8e", + "0xd46a93765af68d238b776b240afd464a24d8c8bc869280ad618fd0fb6360e878", + "0xf3c622a4ee05d1ce27d59e7b9b3748547f4efdb1d6ff72a58fa93dccb7b76de1", + "0x6cb017c4bd8bb5186590cc4559fd9600399485ca917b10556b98cd7fb61441dd", + "0x7188f59c892b8754845d73f534587f27b7da67f42dcc1c73390fe2970bf0ad28", + "0xb4b17c93af08b9f587963e42703379c5e4f760502870b8096917b09b3950ee35", + "0x03165bf9bc20c87412a41209901d2bf3c8bc03a8586a1706fe1499641cbc4775", + "0x9ef57b2126a38c2dc456c13c272de53366dd1bf1fe768185a93f3562d064fa8d", + "0xbc3660089065220589409f7063dde34aa080179b3f22464fd9df9eed98d88b0f", + "0xbf1cf6eed0e0270d6be602040a97600ca7e1279db4279a9fb7ee643345a264b3", + "0x4cc471987bfae3b32179aac7018ba574c0315b9832915b5d0b804b38e9def6c8", + "0x51351557582b1d821adfdad36536b59b28f9a1f1243115486ce44d4b22d3952e", + "0x66d6b02183b9def37dce37b66ba4e9939241732b49dbc8addd147a89dd9e0517", + "0x47261859ce169e56d4e7dd75c5e2648597c7906f9264710c7e4dff74f353f739", + "0x38edbf1db358c82d0c945a7fc024f7fdc1165331cc19caf6b8943d3ce76b721a", + "0x5231560201678a39175187469f7e36c1c729ae060225012ff4f679f3fabb8237", + "0x763bfbeeab624de07a6e758368f8f61c0fcfc8cda088d2dfcbeb47a5eea9648a", + "0xce910446cce07477d424f791a71a375830ac26a2543b8bd1343e0d775d161e5f", + "0x950ba34133aea3c2947a5e5fc1836375e81c042ee999b60dd4a27e6492fb41fe", + "0xdc24f20fda563bf74ff7540a06f3631af8ab3b3722874a6b383714f463f5fb43", + "0xf2250ef512d3a11144370747f2c86efc73abaa81152bc6083f87aa217d16ee67", + "0x8760d0bc8f28eb2504f3bde3e429a47f0aed1dc2c7abbaf01c68033c07ad368e", + "0x7ef1c11b1f025f7e2aca2624aa9a11781cd860f24ce3fb525e7196e590fc5ff0", + "0x7c4e717fe77c8f9e742e312081d51418614031745b182746c7ceb4ff54deab6e", + "0x56c82f80b8d52128275529fffb3ccf7376f411d7cf9464a15fdecf617b4e7571", + "0x46f7d3ecd09c29d36a62a1a65bd3c59a14c82687b5466c9c130df14c286c2a95", + "0x1d04deaadcfdc7a1e5e612df6eb836f55caafb4f9bf4f1200fdfef4f14229f26", + "0xa0f5e65e99a22e14ebafc71f093dadc96c68883609a7460f904eb15360e3dd6d", + "0x8ea6c444466d4b6916a1b6dadafb87d75e2fa1ddd1836425dbaaad6e99f4d68a", + "0xd53d052bb709813e6dfe218dc4bd99c5ae83b6f5993b182c36a386502713c7b6", + "0x2e0cc1dfae87825d1a1d8946e021dc514dea384241e0a6cb66d5daee570c72fc", + "0xa419612e2bca19a3a8dc7fac4da86c2df4edcc2989e10d3e9050323011676b1d", + "0xe41649d9af504bd273b9da0fde578dc126afb55feb8b3c31a0d4eeaa9c7b83f9", + "0x0121be707b5666d5a78949b2ee263bbfbd013b69caa9566864711bda4c7ed0f5", + "0x788538d654618bcef0a63e31576e19a0872a92733ef7930ef50f8afd6caf110e", + "0x7777a3a4930828cc158f696e6ddcb87696115f473f219ac5582d8a38e0645430", + "0xe15a9f42ce5964358f862fa7a40bff0c8e8d7429a5ca923c9f0d4d0d574378a5", + "0x187bd59945e1cc6a877fb324b1d7ebdf661383ae7e22c56913f2e920de73dd68", + "0x938f100308d20611bd14372b16da0dcbc888868f8bd183d667064dfa8e67a161", + "0x5e61540787c83bfacbb58967280163f55f5ed00e733d6295099588557ef2dcec", + "0xe6625082f4039ef9dccdbeb9488baedf75fcec616ed9d5009deb4eba95cc680f", + "0xd01542aefe234567f106a4f057173b4f6eb5733e0ab9537af2db309edf38763c", + "0xee0174f3f9218a3418b8dd2bcd4132821eb91b31391b7c2c6e5a84d067d21497", + "0xbe26c679aafdea135aa493bab8ee348b255f50bc69592bbe017dd96b0da58b1c", + "0x297e6634c06193ed4725942cec32ccc9b4e77b5d02fce2ec9fbf580e3dfce248", + "0x820d98bcfbc008480ea32b162d15701357f094b1d7c99a1ff92fc0afd9708a06", + "0x82bce2be0a2d468b2fe0d3ba4ec1e5e8eac2d83f8b2e402b3043119a59cafd51", + "0x63ff3569d9a5661b6773a1a5fc10a522ea12a22399cd337ffef75a0d36735ab1", + "0x8431746d8239126bedde7d5c58aaf7f733dd1542c942d415d876ebf8a062f032", + "0x6bfdf119b93ef4da6f48265f4c526f0837a10c8db9c518d0dfe1edf40ae5fcdc", + "0x55aaba1f40c9089c65623f67eef8cdb827282a39cd0778f26e2f73106d3eee3e", + "0x0022a0b29d8188251bf5c6f37c76368dc9c7ed9e00376901162d1fff111273b6", + "0xf4bda8d3cb5b7ad50dfcf2668253e44b98e87d563ce17720dd1eb1a4e1c32628", + "0x994315a889329452a3e08ef029e7d902308022b74aa5a4eb2178929425c90a84", + "0x86a962d1d436f43f6fcad5b61b615f2bd32f10fe8c62428854ce98f4289707b6", + "0x3ce476498f26fd1d0b276ea639d438d7efd3c10451949efee1c91f279ef15ed9", + "0x199b2fef89c1edbe547e8c0b666b7b138d6f94fcfb2f09f26edc429ac163b127", + "0xdf3fd62e7dd0133ffa23a0da13d720373b57e85c28ee97890c355c44323ad592", + "0x92e0cc3bc262330ed8a1f42ad40a2db6c4e75e2d39e24a6ed5eac0855c12dd05", + "0x5b46f058c21b9447f8faaf78b2549f7f1459fa5ddb4211150bc26dd718f8361d", + "0x316b4f0e5b50cea376307236de36f3a1ebad3c59ae28dcf7838339d8711047e6", + "0x2b72ece0cbeaf94140b99cd9312eb891a1264a4d31fd839017e22cd4cdef058a", + "0x0c86b9b2da38f00150d49ac53ccb43a88a44181c90b492e886c54b0d6a93de22", + "0xba5a671174dfd7f877bffd7fb3179b1f3f8444ab14eaa9a0488207141bda26e8", + "0xecf73cee14b1a8fa5c2de5d78c058bd04772666ff455ca4225ac419606041f2c", + "0x1947b6adf9abeeeb55a66cad4afd016f6522faa641c4e14af94cf6e610959ad0", + "0x5467aaeb96dbe111a0d36fa66a71f489fb33ab8d95692695c09f4680086daff2", + "0xa21fd9195eaf856bd048bdb258507351e9a2c168920fd0c550a2340b5176ba26", + "0x9b0cf5690d3c3764f5c102fe1d5139202a1f982bd5afc8967eddaa6bcfb3af42", + "0x32bb410896733f9f6080a5b574b07c0af3e5ecaf69e995751e392c3905c11d20", + "0x5e98b3dbf58bf5adc0ccc9269aa10f9921afd44283837e7cb419ac4fb89f6164", + "0x051cd6e01ef3ebac9f27e1d473b0abc00d870a78cf894cfa8222d00976948b39", + "0x500edc8298fb83a103f5bf779d1df507644e054ef27ae61ccf31d883d85c2a0c", + "0x80c8fd7e50aaa14da3af3ec622adcf89eea9760ddbd5232a49ba55837be5805a", + "0xbb828dd031299bfd428c22110ff5d9f5612447e346e98401ab4a01278834e476", + "0xe2c5f408029af25cb9c130fc8fb5118660d08da399dbec0fa1709d1c0583de57", + "0x1be80d06b4ec5ef612e16bd8d842484039ca5663234174441f0722ca521958ee", + "0x21d755042a542493e44e92b4355af2f06f161c0e2583aaf6862730be7e9976b2", + "0x49b993b77606eb939ae485e82243e530e392af6d68be4ece5ace66a675a7a70e", + "0x954823b80bea8f2007503ebda5a6ae4610f94cc2c9a6ca22088a52468a960524", + "0x2693662c6c0961a92566deaa4a59204a0c436aadc0581b799e6255fe97d26331", + "0x4e80abe082c0b8ae0602c232ab0f766aefa702e744ff142cb9e101a6050acfbd", + "0x9c47c762c73836210a6bd78e5ddf9f2e817951d52b9fea0c823596c3df2a1fc0", + "0xe86094c8da0212cb0cd96f54c9f1b22c11feadc5599f6aa63285971651f11278", + "0x3031451f37f3e0288d61580e5b20e008a2ef5975e5d12345056949dca2c1d421", + "0xbdf90347d794ab3b41da6fb75b5d8d1f426ca2c4923216393e055dcbc89f3cba", + "0x4f7a0c9ebaa4833e7fd0ae0f3ac8dbecf3d97d0036a41ef30230e634142247e0", + "0xd1cdfbbf34bfcabe4a0eb90fb4d8592738203d245d68b753d418c4bfab8ae4e4", + "0xaa56db3fe5b2edc2ed277656deb51e15f86182de49836b4dfe2636de5488a86f", + "0xf67b05c233797d61eaff641e5bd35ee830bc1a8440e06f85e034902bd1023ede", + "0x49bb9be0064ff46c4b7820e7dd08002f3914fbf9250c96873bb3dcc7bddbe3de", + "0x594efbc23c0a371e3e5478c599466ff3a8d985444583b70f275afda13cc05c9b", + "0xd1dc59771492ee0881398f87a7c90db42874d720812c1e105b1512531d9fb1f3", + "0x7462bfbf8457d1df1288cbaf339861dc91c02d772f3c1ff8c215965e555d6905", + "0xee62a752465879dd62d08d7a15a54af1e813a1bbf2035384289bd634e2e99524", + "0xc7c66334011807d017e0df794df5f2f36c4cf496ce0a3589465662f8aa5433c7", + "0x839af48e65e3e1fd3d177d90f1dafcbb0209b107bf882cfe2fd514be625c1396", + "0xfb4eeb8514ede5bc952beee0e7e78c6d7ae544e6c4d935a6c92375b224e40c3d", + "0x38576e990356b7c44eb1dd531fe28420d01d80130e0ef0a42b9a8b01d2687822", + "0x434bb4312789b8cd93c5f930f4305760f86c54ab225b35bec70954aaf2fb4c2d", + "0x19ae08dadbf2f7da90ce777913d59e74592cacf6f385600f7d50cbbf7c4137a9", + "0xfc9a8ba8d7eff3a582725f8fd1539c4f77a87ecf23505de8a321ec6d568cab5f", + "0x20fb269b1a7908ccae92532424cc94604ca9a0908bd7c5e446a687cb3be9e0d1", + "0x9fe0a0e3511056762698573eee8ee2b0b87a8b6daad2141a9ad00c5b159521f4", + "0x3630751af37fd3ae22e78198868341e86735b03432879fb159628937c6bc28da", + "0x427789cffa2250d89b99d50969d8dd9917b5f4c721ed9de79cf81dc59f94d81f", + "0x5ad7e16bd42e35671230458f8f97c18baa5a1f81b675df259c9d2d7cbb09fb77", + "0x3d58c8ee704a934f6de776ef8373c653140e089b85aedd53219dc0b46ff03b58", + "0xa5a0719b16d8771b34e050660ba965b0ebfaa06bad1973033cbe2fd69fac5886", + "0xcd66e1ce23416fb4662d2b29dd72d9f8f981c66098820058451441213f2947aa", + "0xc7eb6f1df45136c9adeacb03eada4557326aa0a22f9ac0d73df25e21beb6bc0e", + "0x890eb4c610c7036e1494514e1f7ff72f414c51143fbf13cf2cd03d8d37a03662", + "0xa54328a1d2ffd9aa3f38a9e6a0539ad2517c4f6129f01768891acc0a2b2a721f", + "0x147644decd98b450b284d05d7332629e3c6444846f7c71dbcc892d3191f2efdb", + "0x1a19c1a8fc7f9d838cbd736243e66b1f637f49b1d8734c2af417227a11623b30", + "0xa8c14722a6f7e7efe695be4e6a21f2d1c8b8d71e2cf69e7645ecc5cdc7b6355a", + "0x8eb33cc1490499aba376f581b68766c4fd40e7d6027f223eb46e27199acc8d67", + "0x1b6a906a5321b057f453624693d4ae6abe79a5b8fcd63a777dffb8b2ea4184ab", + "0x7185ec1f19e7a84c9f914dd223b382ff56464b01a1b88dabda415a01e1d0a1c8", + "0xa172df0cb06617eeb95d362bb36d5e5ac52cbdb2e5f3c2cf3d9b78ef28fad82b", + "0xa11941ce1c866d077fdc995acf3ff2ee0ea0481eddd142f9b343c8403ed606a2", + "0x1958ac9a77c5b9825c401b204001dea8ee2520983fb3e738a467980a7bf9defb", + "0x6b24d043eab24359787ed7e93543967c9f9b7ccf99894c1ee7768f6235cb0cfe", + "0x6ab8c28ddda71b937d1a6feaa67b071f78ff7ead3a192ae63dac34ff24b8d929", + "0xf101e3da7546249b5b6d4dbe960c713cf152627a7482fc3377aa31f430c54530", + "0x22628e903ea9eb3eda9c93ac92d77b1b8a5ee62706dc5ddbcd079c57d5b721eb", + "0x0050467a543fbf0a232c8ce9f66eaec6c38c3c31b8ce3d590d1b07586374c1ed", + "0x4235a1330a45838b2d2aa9873dfbd59cfc0f0cd16e13ca9292f8342eec255fa3", + "0x2049ff9cebd379b51308220449b3568c6d7843f5b49f61b85808287f3d60441c", + "0x50c2ef0e832df29297dc524fcf3af4cd0988fbfea71987f3ac5cba8d4ec34102", + "0xe7260880b2d822d18c9ac2224d09fa18f5c324fb421470aad5af6c2605b40985", + "0xdf51e1b441b9809b26cd7cbdc4df27eb9c7fbb3bf764971684aab6c63e282a75", + "0x597b5c48840a25294feb135e0318ba6d6ca09aac476b1041748738963136a0a4", + "0xc710bd4b45a991f7f1387c25db70a1964ca4fbab32b738424d35a6e06e2483b3", + "0xd67460a50ec79c90a97e25d4cebdeafed6c897593fe8b24afe47a71c818a55b5", + "0x0ac1f2282e4491fdc8d28f1697026b7fa88f46204610cbaf8811d38dc84539f2", + "0xc3352ebc532273e4224dc0e94ec4cbb83afc2b5c364d71534344793032441006", + "0x42f3d39c81e118a7d515d82b6880104909a7915aeaca8ad64fe74d9fe88a7f45", + "0xac6fa42771e9cd6ba31dcff2455d2234c53c282251ca2399c727fd5521eeff0a", + "0x83ae44822213f59d34543a6d4fcf76b4e22cbe5a90674755072613550d348551", + "0x99cdb65200f9d1c602c5c2ded67a8cf2722cd7c1ae3f11d29a2c1b702923df93", + "0x2adda7cfa12bf5ecbc74ed4f4ea419ad7cd3e7cd03a0e2b32e924aa2ab98ec42", + "0x3da7434a58c60b7fc7fee8e30b3073ff4d3c381288fe6ba791f68d74d24ed19a", + "0x9dbe78f9121e6c0d99fa6d441f6aedf54be14fb39a277cbb5f19fd0b846305c3", + "0x2ded5acc49e2e1fcb57a66a81f59405febb50edb6b41d0fa8e445477028f422c", + "0xa46310f11937ce81ebe8d4c60de1a5c8787a1aac35ff3b6e2f0cc793112b7df2", + "0xfa693856fd1867458c335c6e903e5745a950ddf8a43cd9ee76ce8d0b3070bcbd", + "0xb374a194d9edb55d2946d40a16ac4617e4d0674630c6a970f58db17f21d22c12", + "0x651032646288a0b6fb5322626bbbc5b6b87dc5a5d59f5f39073f2f9574646c41", + "0x7f4346336c95c7fcfc1f849cfa63afd46dde8e346ae0801aaaffa9069f989e99", + "0x8bedf8e9f5095b4275635525fea6169c5afedff2ae434e42c5cde973de77ae3f", + "0xf92ac4f6fdd7801f15c8e0ee163241542d1359372d2189d8cd2a33f925933cd5", + "0x806d437ddf966fc6631a8f81a54eb82080fb2ade64a2b715872d8f648d23b57d", + "0x2151451d68f912b58bb510002407943ef6f2cc87a992e6df0765a4c239e63779", + "0x6a02bab7734d8549be10373e6395c368492b8518df793821962a940d5cf93654", + "0x4de627f1d096c86c1c1dcde2a314ba65700b1ac47b9db95e9ae68f8d28f52b16", + "0xeae202c747b699171115bb56652ed534d9ca6de0e8c3d947d63c6d60b5d658de", + "0x7bddba4a7c160445653f62d27c1622323c784461d52aba5a6f19964194a063c5", + "0xddfcf0c5ff899f19c4ed0604e7b4cc645ce5bdb7b7c7d6bcecfe7f2cfa3bdc0b", + "0x7d27d279f52b83afc9a115c71910d06a054fdc2e20625cd05fe35ecb03734f5b", + "0x415f6bcb216ad524eebd7bf177bce80cc3d5fb3e920ed65a8ba6c02f59fa88ba", + "0x570daa81ed1b593529a07396784c2996d5703f4124f941e99e8f9cf6b608b1f5", + "0xb9da28526fe8300989e16c83c4bfe418c74878be1bf3af12ff3b9a098a4c92b0", + "0x691938f83dd63e39be2fb03422682ee8dae8e0a95bf4d09b4727f8162b2da11a", + "0xde168c58358db826c9c953895b7a0419066e65eec0b7fa479c328719cf70df6b", + "0x65a7b2207932e96c427a6c01efd0c3f01a37e02e7dd98b18ea559c2a6c83c8d2", + "0xfe54ee65b1b8e21292fde2eed9ddda163036cd6745254bc7cb9f3dea737832fd", + "0x543d64c2a6b763cabbdc1a9316f37115fd572d96b5c75184c155e68532fdc8a2", + "0x31b41a4f481a786bcf4029b19e84729c699a8d742fef50040221ddf6785d7335", + "0xa383494d908727fc6198035c24afb3f352a16b29b0c1639062e7169618bcb38e", + "0x3da745966ebad677a703f5db94777fdc307f6e3e66a7c3c5ca24f35cff3f43bd", + "0x32fbcb24d42beb2128d95055706b767f7df7ce16c1613e3195342db84dc9955e", + "0x1723ae6147425f5b01b68de9847d79b918ca0f85a800d981029dcb5e3c62eb8d", + "0x997f18b9977469cbeeddaa1bb31472be3806c03ae77973c857e32d6fe2c4d740", + "0x6c27575f33b1d85fdf9643c9ddd27085f4241518cbd5b776e0d2bce19b152ef0", + "0xacb86fb3209fbf57c42eb86d2617eb631e0ba36da7de5b2c7ed63f168a7b112b", + "0xae02559f4868fbe4f114eb320ff0f3a38086f364a2ee537e6051cedfcee76d6a", + "0xc96e439aaa996d4ea4c276d1592fcc06e829d5f3cebf163aeb75f590896a2648", + "0x87debf5b6912717ec3c0846fcfb5b459a15254660cd5064180c0c514b4b15f59", + "0x37587d340df2b40b3f14746b72c5a72c5f51963d208b02c9671d6c623079b584", + "0xdff2805c029c4e3c249de3aa9f5cb3b48daae4f4496deefc91ebe3251c18629d", + "0xa84f66a457869dfc95d625d40496250ff33894be23a43e53ec892481f1eb4fa5", + "0xf8fb34bf78ad6d52be6fbb5472f13322b506f594ad3b585c04f56ed8d0d9afa1", + "0x546937b89a4d3b59817377b9c2ffe9579d4650cce71aa26bf2c76c571ec495b3", + "0x5ac921894e98005d03aa42e8fbde7ad0af0401e350c8ba98c01543a93b37dda9", + "0x3cc76dc057c73f0e0fdff28d484a092747ca42bc10989c599d0f597ead6024d9", + "0x1992cd7e94e9ecfaaebbd08d91519d6b67857db87e2e67c546371738ae0d2d0a", + "0x3604be694574c05c63d69cbfbbddbafe3cb425d75a13e69d61b50fd8d9c947a7", + "0xd1c82e40206d2a89e3a1a40c4a1b63c62ea6fa0847ddc2b25f63cb9bbb4a55b5", + "0x66ba114d5bf45d50e9ab9beaa879ce18d02a8b4f989c29ea7e9ae604593e860a", + "0x94f74c09ce5fd1c8fcb9cbbcc476af20fcfd9cf01c7ea65c14917da7b9560ffb", + "0xa4e154ebf83215c3843ecbff1dc8f646f221505c21d2a76f47d55466d895f1a9", + "0x28c20a0e95e23a023678443d7bf5b2421975b827dbd617239dcf26bf6db9b255", + "0x55d8ddf586d61e137482e3f4bfc1904ce4e04d21c6e7ac4d8c7d29b1483c8c0a", + "0xa9e1aed191a7a1a92bc99604e3b24c02356ea378b16de109362aefa2fa978451", + "0xd543ad635db78b2518681654f98a32d227fa6a1fa9b7043ad12cf58c91e8f729", + "0x102fb87da8b57948fcb763d7b797233f21523545f78388d8d05c6d7f2a4b388d", + "0x4e7273e2a92e897590988f38f8b899879aa1aea754fd5165364e8b98a66e0d62", + "0x5a06544527f88d9fbbc5905742863d873367d99e574d75496c59caa041e2b612", + "0x6a8957954db14594746daa61f907e4694e2a749ff53ea6b1dbe77d7d1f378d22", + "0x0debcd48486aa0d33a783caec0d6fb1256ffcca39071041fed7f047eecde8640", + "0x9d0a9b13dab1888bf0eedda217c501d76f587ee9a8765bb455cebcca0b705599", + "0x30693bf8c9bcb6bb4187606f98e138700e999d8824cada72d3d07f8c104fd263", + "0x494ef870dff64d1d65b4ae4b49ff13c145a6058876eb657751d58c06f62b5032", + "0xee4150e64f9ead8124d50d56fa4b6e6d185fe8ac385bd2a9db7ee991f6e34c02", + "0xb859d7db7abe48cbb9420d008d94e8d47753cc78962e5dabdded9438bed56b1b", + "0xf8b1fb734c345111704d73fe6944d0a274964a347d7dc5c7cb8677104829f5ce", + "0x5dc002623d9b3b872900b0b313ae8520009de730577b6eb2e2de18ae5cd4ac94", + "0x4d63e346ce7e654db6f067e8348c539ccf622d84020812724b936c19ff4f86af", + "0x2ed43f4e5d6889f5379e42d4a06de7c343080da74ff353960e4cf980f750fb90", + "0xfc61d0c90ecb073c022c87098045b6ca3f2b66c94f3723c679d81ac652b16f72", + "0x7e69914b56984b8c7cc9db1732c3d2d32969a58d6662509846e6faeb1305586c", + "0x0ec9b1b68efc96fc7d831ac7316e0ac0d908bac31be330d905f87b136556c241", + "0x32fdf6c25f6c741dfe468289cd7f019ec3a40c5d8fe882ef662b798491c0dc34", + "0x1ffbc6b29826aa58595d1a412fb90050f2bc3cf0ebc5462f308d4c8d85a1eb59", + "0xf0fc93cc2868cb9828ce16463e4cbd59637672d5815dff03aec7f3e1424eb204", + "0xe404321694894ab375f5a65c339f2cd2a53fb5a10f312082ce019681f6ed64e5", + "0x81ab1f93747c4804a85f56b0c6eb61491b958504ef7b898fb1362eda9b394e1e", + "0x1535d439d0043d1436de963e3eba47335bd7afcabeac4d3fc3f342396d3538be", + "0x42da1b95481bfab6cfec59884bb1ac7572636c8f489df2768fe2140cd2702766", + "0xbc3fd861f6e09efac1782d9d383c4ddb9b4268216fbdf3c25689162628e36cec", + "0xcc74c3d8b44a8cd23676babb4efb0e67871582cd5686fde9de6a052c5bf91ad2", + "0xbcd7fe80e95bbbb5ac93b1df5ff0b8e921e7ebc4960877acc1a95c478c65d64c", + "0x045e5918fa69606b9546f5fe83cd9212000828c54f9cab856f85d3a22536a751", + "0xc0f74dbb5a42bf1656698c37aeb904a33e969099f215a7efeeae0024c3a409d4", + "0x36d537998634f2dcab43b387edb63119c0f4cc68b1979a2ceb373089c531ecf9", + "0x87c20426fccdd225bd3b961c7adc1de3f9ac9640f6d26bd183f6e528089922fa", + "0x195ee1daad5c3d0052d6d633eda1c9f7160d488d4bc54f4ac3babdbb678eeec9", + "0xf9a5e6735f9c5577283e8cd717b56f69dc8306b23781755f2e513d15e6738cea", + "0x3e5bc3e78ae33367ce7450c5da7436f1faf3b1a62d238208df207307762688be", + "0x123e7b4f7e6b9338df2827a238a266376a20a1fd065e9f8a4446fcac4c6c92fa", + "0xf4eb14bfd197d49c42daa919322f18228d2d9ae2dac6dd7113c5e7d12d2ef866", + "0x78836678c20a40fbe09849fe190a9e74ee070f2056d7bef85d0f124676a93130", + "0x7986f7321971519933aa5dd507074c7b007328a7dadb8734eb4aecf732703fed", + "0x14485d24b7e90fc39d91ad6051b7f596d320b1f88f54fee132e032753e59a766", + "0xa80a9a5db758bfacf831a54022c85a838e30c8611ab4b17bda0641994302b59f", + "0xedf1814fb78abf675f3c5671c3618e5e51105647997d6dea6a0cfd1f0330bf6d", + "0xa91e9fcdc4f2b5e029abdc6b2523079bb4a2f5346d8a5a674e3d5582b8871d1e", + "0x3dbe468159a8c068285c92360cab488a4c1ec37487dd54cdc0b70e6d7cf074dd", + "0x69877439effb3388639ef6e1cfa132bc605bd8a0da053bcca23d82aa453d0040", + "0x6751d32ee3a1244532e6698ce57cdd0a59f99130e1e7e004c2751bc49d10b355", + "0xd1760a4f6e5a7967985125d2deae8bc783e47b1b85e19fc273e33eb2ef88d271", + "0xfa934c087923cc16f636615657477c48c082623d7cdd35508571655dc14efe57", + "0xb6b1e4387e04c4ddf88ada0aaa162345cd43e54482fddb4297e1eb6f8ba1ce74", + "0x3988089edd46b57c0bc83b1bfeb0050b503cbefdca83e96f1c12e7ea80688a79", + "0xedcb1bd8b522ba5155965cf18c25a090be2f8d7871ce60f0f371cd033d5a31d2", + "0x2f887b56b317e9896698ec9059d36aad63d54d95a01d389aa196ae12e562ca2e", + "0xe6d6b89e1d851fd24cf54f6b60c6c93a8b014ae30906c156374d73605aab3028", + "0x177928968fef8c6da017b177f6be85851616775be043b64f72925e6b8a4eeab2", + "0x71a3de323d9a600e15c25a5a6e05089d849defc3830fd69738f548fa4c57aff2", + "0x8e7d92f316f96b491e4831f52a799846810dd032bd720dc891195739192f3955", + "0x12a3433e8cadc005ac35da334d557c8cdad63576613f07df8c3ec9f528e846d9", + "0x1406da1f5efe9d3de6a829f1219f731f3ac875c7795f72b5a9ad25a57970b9d8", + "0x15a849a0ea56a777e00325b4af4d9996747486cc9893c08b0773210306193521", + "0x6178e69be88e7e93878b731d062b29a34bf2951082b947f35f60fba2c8de62b7", + "0xc4142d4fe01091e82626178b66c13243c9b35de0f07a49e3c5f2ddc15b39feb6", + "0x8abda6239557236af27a2cdfbb4fb91a6b136931c53067739578ed13e1b0a2ff", + "0xf85615d9337092e25080430cfa0b7a24c97effd422a1947a4c07239d5221418c", + "0xf9534d7db3b5fc1bcd7033ade59fd66bbb94a5bae91c4acebbb1540fc8bd3b67", + "0x5ed0f8035d3920d6e94b881cafac324ce5688f8c97668715733e0d00733b0fe7", + "0xeb6c474a0adfd84c79b86090c793697c0bb39d6cb007c725c2ae7afdc98df5a6", + "0xfbfce3e019b0b29ad03fd9146fa368f9965050b40733ce297bce6acefc4668fe", + "0xeda9ed65fbb1c7fcccc91de519f69933ae66c8ed59fb65f64751ca8aa06030c8", + "0x359ea9df33d466b5dc210ef0e99f3b4416ce03a5439f49b4cc4c1b98b22a21b8", + "0x14b2e8729b70abac62120541229182264b78c7ba1a1a379ac8a582aa0bb0d739", + "0xcec0dbdb55f92191974c2c8ed716578c5ba04c4584a0770fc0d7d5cfbdcb2717", + "0x07334b05a08cab079354cc1f7a945caa3c633de89a89c18244de81ed56da850b", + "0xc58e0bb71287fe92564d00b5094ce36b7899c346679011e52b73eae45bace19a", + "0x9dbef45ce9abb762bb9b30b61456a90b74b0b6f5b41af9500699542d933f9535", + "0x3cf848f770e15e7f682075c77f7e980da6750d3d4cb038479983e341eea3c354", + "0x608a4c5958ef3b0a324a7cdeebcc3abae89c1371c949d6b269b2d3936d9fbdb2", + "0x66422fbb9044305317d900702c2f99702317a8a83ccae0911a2832f623356c8f", + "0xe977f86ae4c5b350b350a3d6af7fffdc9baa96d9a7cb24834e5dc4797fe39fa8", + "0x6f56fc66544e099797cc3b0879dd20b21796ace01a0029e0d8464a3764d1e858", + "0xcaef7878c703facf29fde1467dcd08b03761872f598f42f5c56b4cb367b97255", + "0x9055cc0c11cbbe8477c7dd35b37a57e7994248c6bde9ac05e85717cebd2b970d", + "0xd7b08c0ca8abb9f07e3df1c4ebdcb03b0ac2018a905d1c78e6825d2bb5ea1ffc", + "0x0184cb109267e58d5bc0193a04548f0c2b87286ab6b03a1ff7b6d88a725662ef", + "0x3005e0af1ac0c5fd6d58328c06cc7f5d89c8c4ad173106fee1a7e37c9f2dcb95", + "0x8f7f8800d29c66b4fb12334b622fabe1cc4ef06e4ded44e4315efc381987cd56", + "0xdf74e3be6d22159e0e02ce3b8f0b405e6469557ecbd12e4432d52f4ae4637bfe", + "0x2fa9a889f958ddc41bae5916657f946273447add502464674658bcc257f1af15", + "0xbfbdf04ab62a35b2f7b038b02d8c37ee946cfee18e10ef8a4cd5409a5fe81d19", + "0xc4e834510182950161a75a843352b5b46e246a05b7c7e47240b6cdf7e18b4de7", + "0x2534be362fcc238c530f2ce8f64a3366d4003a21e6f32493a082b7efa1d413d3", + "0x628e5f76af96e64ff34c52cc5d07562e72c53e7bd4b7585cbc83b7c9951d0d2f", + "0x41687c81b22f67e4ab6ba0163da6d58c81d94c5db20569b4a42fb58b7321a442", + "0x50f55f58cd9768b611fce3ff13e8da9195b1eef5d0a618fd27f7052f88c8fd84", + "0x1b64cdcbfc12c42e9dbc7a62a1f8eeb0baaab8ccc867f7a7308c88e4968eb9a9", + "0x77e9fd9a5d64b66cb901c5795b9f66424638b24e457024b5e71ffbb79ed8a863", + "0x35644de61c2108bf9d49efef164414cd2594ad4cca6bc421699458c9bace5491", + "0x172ded87912492ee521f79c1ef22e42b1d22f17c3286575a5d419fc00d928199", + "0x3c8fdc337338b107ff5879b3e95cf285b5128ae395c4b89ccfd05a3d942887d3", + "0xf4b22643ebb6d46cf292531792543f9699a99674978045b0c911818211be6017", + "0x783fdc538e4505d4187a0f341b066007caff8030c3bcc4bf49ebd31a8f6b4794", + "0x38e11f176844f680e75b65d5225533639eb522f39495b9ee426135097e5e8fab", + "0xc5e0da94d4dd6e29c8bf3684177a62051e7555ee87007fb07581c885be598edd", + "0x317dc456dd095f9eef53781c214806beb31351cf78cb1854be257b4039324b8c", + "0x5bbf954741e453e3157dada0a69bafb9ebc63c3dbfc0cf6e3fc937a1b14b7356", + "0x56a5354de5acff2b904c5b6b976c473277ac2364571c54583bd682e76bb3f43d", + "0xc37f17385f4e6015cdc8083fc750499ec8c9063544102eb0e3e3b7e0b5046946", + "0xd616c205adf0ecf00c7563fda837e94a4f48be8560ddd15d93988cfd3242b40f", + "0x1ecefd5cb0c61b120c227274dd60b42e6d25229517b20dc3e37a7c3b436f0e92", + "0xcd447982c518db12b8aeba63b68d8caf1eda6bcc44400c9d83c4e4d64b4e949a", + "0x3763ef2d96a89a302260ea66e22e3255001ba2f003770c03905d4f39d8ef6501", + "0x2fcc41e9b574af5402cdce8dc66d79488cbd5cf960209918863ac9526bcb6a70", + "0x17b71848876a6e0a8857f1e5d04762734678ed1a8addb7e378915a7c3f37c981", + "0xcac9e4641f50d52d77e0e77b1a1b5fdd25cae239864367b3d99026d3fb973610", + "0x55eabf50cf101f65e51dd3a54321c1897a67c50512c534ee9398a716a790ffba", + "0x49101d5719e4de5e4e88645de3c22cb3ab794df815555d4f22d54ac6a59f73f5", + "0x509cd8530c28cc098b0aa80d3006a8f71ac7ad56101b880288658917173b8c8d", + "0xdc0e15e6d321519f34d40c6b2cf5f6955c15af815dbe02d84606ed76a01fdbb8", + "0x0b8e107e7abcf80e85b3288786dd79f949449225315c9125730d7d42f0ab9cb6", + "0x07ba997ea28711f221ba26d724a09a52b2737b8aa8532e890490ad811ffa792c", + "0x713775500194ec8691fb540d63e99a70cd443e5539b5f8e2a993266bb58266ef", + "0x3b2ccbf35ac833e845f00329c1f8d130a3f804c55aa83c35421adb83749213bc", + "0xee82c15eb18a075b00de8fd610621683dcad88a19c1c507351b5be0de0c6c4bb", + "0xf874298782be23045971092d8305c469a309a1a33f6cfde7604e6499d2384cdc", + "0x1a9d88cd641f6468fceb32eced3710569d511848f393c2114ae33d7f36c12f3d", + "0x5b2b8c2ba5d3aa8a0503d14e759154d1f2f46d819b363025a77d4cf5e3d83586", + "0x0082bad01acd43bc2c504f66ae28056ce352257b7ba7e2c27dd36d256c079561", + "0x9c6e4e01a831348ce64da4e4bf04cad5f58749573e54f1062b0e2921bacafe74", + "0x600e1b0101161721066952d71401f8fe6e689b66b26e2e74cc924f5e914e8eec", + "0x8720d215255e4d5e2a688096506d5b25c3a79c511d8c0b3dd7ad3ccf542e9abb", + "0x48baaec9724cadc4f7cb8f10549b8daf87b2572151cdf9308b3e96f02b048f23", + "0x2adf0f56fb9bcdbae394025ae949e694e01599887e50c355c90c3ee5ff32eac2", + "0xcf78410476d781bae1567f3d763af732d2ecf56e741cffd1bd3906af83de1f2f", + "0x4e7e223f6881065ee722d6ff9603f1786e4e99292e9caaa75b7b1fe9aef00109", + "0xfdf0b390b0395f007b1b342065096e0a8da957b26ed4cdcaba432a202ec12b65", + "0xcd40d2df140abc1228b2e1f45b5d65a0f3e2ab8b7e740dfb5376b036f63c1c2c", + "0xa491347f128d31f68cd1ae536d8f982fbfa5b58d855a95219f104db741d3d2ad", + "0xaa91fef9cecb842de4df61fd1650267420c8336758fa450f87ee867ff1520905", + "0x75d1574bf7b23319a7c8ff6a0a7cae649313aca8893ccd223f1f77fd71c9b8e1", + "0xc72491916b25756e3f505081b7f63e32f3289b86cbe0181ac9d33d29f666b9e4", + "0xd446465131b34f091673736f70fa0508ee7065c4011359c302a603b6159cb52d", + "0x1380689a50696e1cf0c19869b9773528f01cdf20b8f8a6c6a7165fda31ea49af", + "0x01cac6d9deb56473681c02dc753351feda402a1a1cc2b4cc8beeb23884f40760", + "0x3f622e134dc529c5cfbf58a3ce91d57850578f45b77c4683b2dfe4530ba0826c", + "0x016c95fc875baa0a5d1ae22c8772eaf574a6c918510875f1000d65f3a779dd04", + "0x86e5f579f42ea54a96e622f4a6becdc5ae85e0d0af87997fae87b6707abc8d28", + "0x53d403f0d0f1f30d919ad7212cc5e2e73cb4870c4fb4e6d260d2573e9bc5575e", + "0x961cad0d17fbec30a8f614ff3565d12698af096e61836cbf1f0ea125ae3ed72d", + "0xc9dcfe7844bb4ea845125bc3674f326c0f178c5cba4349b9461e40bd6ec68c3d", + "0x894243ff80e90c4c4676583b4e428f13e077008d225790a234ae215dc53d33a4", + "0xe5fddd80d3cdbafb53e0cf3c095d33904ac8db83bdeef9816111d20384aed444", + "0x5c7ce294d82fe6502045664f7d13d02063ef24f0f4960e4fb62bb6abf08c63eb", + "0xb33a5699ac121a51c0074b4783545a86a428fb239b4307f1e45108c85af88617", + "0x37168f3f0220f50ba3cad0a558cd8b01a7a435b6c3c5cde98b420ba3b54a1cbb", + "0xd50928e60d00c23adfc916e7f9a5363fc8c94c8edb3aef41ac1dc719041f92be", + "0xa08b27f437ade4d527d883194f79927053ac55a3293487a65060aeaf4c4e5147", + "0x326e2d1f45438741b63d346f0da55066dfe0284382f1b4ee54b1d5552c4f7d83", + "0xbd96baee5835d9d6007b0b5957e452d71d1ee31aa6fde99796cce59b17dab703", + "0x1cbe90df49f8929ce1052049bde7d6169efe0b289ad4e05414a8e7bd61788900", + "0xa0b914df37895be6f5341f3f4013ce5c61f108203dbac4ff205d5f1a581712cc", + "0x1582e61974c0bb5f9f2622d70e772f3e9ce145be97eaf5a87ad794268cf352ab", + "0xe946dda774c96c7878a0daa686e4a22e0d9d36a88dd9c93b1776432adbfd68a1", + "0xf88a07db8c0fd2a1354c38617c16b4d2e4f8bb43d9049321ce47a8c03c8430d9", + "0x2adb489b34c480267927daf3ba3ca7567d542edb83fa82e8040ec57e25e3e6d7", + "0xf1c28c6daa3e97466d50d9780bd3335f3dd096c3389b906bcc12426ae4862a99", + "0x4457a8686a3839b7d3b592a1751c25b216bc64e9d0b8a81eec55601ab8d8a98d", + "0x0ea5d5606c5e81f92d31b49b2e54ce6c6314b13ac223c83094280d0196e003b1", + "0x33a91da49deed50914d998615077c5192be56e482ab230bdb3d480d283502e2b", + "0x5385496abf2e351c0cbd7f6fcb5bf5b5345783b4e512bdfa23b9736e77ea43f7", + "0x98f808b18e5778a1bbdefa3f19991a3d008c27e9976db0ce77ddf9e4e21a0feb", + "0x5381dab139fbb0ad6b61afa35c541aba559e2ac25c4ab1cf8a756c2f27c6bba8", + "0xf4bea5f3ab0bc9ba3ad00ad79402d1d62da125d311884f225ad8abe9fc36d56c", + "0x6018a9f7edb5ee7ada70c3e85f22ac88924d06031cff3f61104ef52bf0baa2f1", + "0x01cc4300f1cd2bb4948329d42e17a277c7da52696d46a60442b6f5600d869faf", + "0x330240c95bec1ac1a476cd202aa74e85db562750f860a9fbd76e813f16cbb639", + "0x0809c487d45161c3b85cda014603ba7efd6b67a8c7aaf314cf20c880ec623a7f", + "0x653f53065726f9a7c1b96ce7d836acca515f563a47c9d7d47aa8c5c030a9fe6f", + "0x37b8dd7b2a844e519f9eadab305efa5d112266cbbc76bcd5afc119e0dd337ae5", + "0x385b7031eafc345ed353d9b35dc53010496db172cd906f8e0b7b891b84a65e4b", + "0x38259038fbf1ab3f0ffac98e6b312457f6b2631f68ae477b9302fe740cfb8e50", + "0x5a963aaeadd708291b41bd419cf2ce0585e162e0d46635902b58ee85e317adc3", + "0x881004f4fabe3e7642c8cb5e99dc3909da28451ec442a299f331790c8065e049", + "0x3c721f828959782052312d30d8256c9351a141923a9c2e2ca5b605f3a92cb27a", + "0x3429b149f860e963ed3819ddf19164977d637489eae313331c71165c7eb8f824", + "0x44e291345b79ff4116797899da20baf28fb9d4d2a5d6b1661a0c83b8952e481c", + "0x00078c007b6c0b3b6603b0838b03ee9e8944fe16f99f0a35eda286a288594806", + "0xbcd3506338253f0df5abf0c2866cdd319fe75bad7ac6f18d1f8201164e0b9986", + "0xc047f5f06cc54e4bb54c8e3bf22245d68c18b4787a01d324deb2139d7405814a", + "0x77ec49a04762af36eb63e2bb5c5cbbf15b580020117639ed5546749e34285195", + "0xfce516ae95eaee4067e95a5752494974ebdd182fa47deab70fadc5afb5ea8648", + "0x2ee54548e56d2cecc3e6cff4e60a7664e55d9b1c1c9a61be74bfff7635078cb3", + "0xa79dce8f10567e060638cb2f09ead0b191e59d972c532a7e91b33d27151cc23e", + "0x436b4cf10f5cdbde72be02ca16602190a56c77f1686533e643c885351d4657e1", + "0x9070c78384138f5e17cc9e6148c7cb7591eb9864f042b82ad38ee263383496c6", + "0x12a8d5285c871a0b05e370a337834458ae2159b5d8cb4bc93b6cc83bf7351b68", + "0x3c07d35ea209492f4aa811c51202f081a3bfd6e31705ffec497d70bd59b7a6f2", + "0xc0a99b851e0fc4655cb3cb43547f4ae6c36c350aa71626b61ed3ad3492f04600", + "0x064404380c5969d8e43d759ef990658d7cf5bcb7b4f8512fe58a7e994e199707", + "0x3d3a61c95ffdd3c7f05b3574370bf4cf0eec605ca27cde051b5d77e062315f36", + "0x9259e0113f1e009fad7454eebb238e0c7f4b7aee8118b63b6c05aaa2f0bc39df", + "0x76ff9818e62b25fbd698ea021e200ac9314090b801e000ecddb71bf4829aec8a", + "0xdf0031d6e1c55717102ca1b3a0bd389cc0d227f0f804396d4b84b5dd26abb1ea", + "0xd0220e77632c2353d51b92b1638e909c1f41a7ab0e6801b65e344ab594f48881", + "0xb15fccf30f298101d5ca0034cb8585cf14ddd76d58f3a8ca71a60aff0d0438f8", + "0x5dcb3817ae05b8c8490e197cfdd3f0b701e61d83b8f6423b3f24f27ba0f4c668", + "0xf3bbdc6651a4ba011443f6c6542b3f45b8aa2ba8bc719e7220578d6362cc441d", + "0x1edc95bab3c88a66246393058ad1a9557b371e726adaf261a5faa535cb8fab76", + "0xe02975b5ecb9fb8abecab35298704ecc476d2e6205c2df900312359d5aebdf9d", + "0x2a5c9b033738fe9e7ba6949df526b5a735753464b746e7d1faa29491a8e5f57b", + "0x46ac373df276af8af25aa1407659a8e85ae12b51ea6ae0150ee2b80a76ea6d9a", + "0xe85513a38b54114f4b6cda2bc81a4dcedbec22749cab6676c061d95c7f38258d", + "0xacfba9967af17aa94f0bf73c3b1cfff113e14625742a7398a25a01aa29bf02e3", + "0xd589df920ebfb3c3c1660a16f74213dd6d487ee577bdaf18f6279eefb9252c57", + "0xb2b66c26bd139976ffc2471f8ec71e353108828bad5094a324d1e4762f5547e5", + "0xeac126eb94bb1ba443373fb2556753d95804891d4763a2cdd1d297f1eba0fe6b", + "0xfcb52c727793003a70941fb01bf6c184890a691b70c0aac3b11feb3987de8628", + "0x1c1b6aeaea826ed0cc776a322454663ef555adb0d3c6f50480957ac4ab7f0672", + "0x187affcea64fb6195ee27cdca1096142898be0fb8f216f10913a744f2005f7ab", + "0xb4e42e3a4c94477a6d5d7f3de429edee7d92cff93b647c71d7a20c1e07a35117", + "0xf960751197118967fcea65f10b51d9568c184a8bc968c609d093a0f6c15a71b5", + "0x0bb9ca3521abf8fe971d371749e5c2258b1fd4c681ded047d6dc7820d303fa9b", + "0x52354e8e99ecb5c2dcc1214c08901d715ba62a7463d56c76a6bd1287a74f5c38", + "0x8768dc0cb22a0ea9fde00170783fe3741501d958c186e2c636d03fdf8a995129", + "0xb4204eddcc9c75372de503645bddaffd3f71e8554c3bca09ec700d928a9664aa", + "0x97c94c63bd30754d51abf48aa830bac3724cf77e366965e9f61a100cd0136714", + "0x60dff72f08506ac9ddabe3f957f88a1ef4935f187b6c536643500d65512fd393", + "0xa94f4c353581e474a091655c78c491c38315e93e287f848c17843d807aae3527", + "0x09d90469c97087fd45cf1a2c5471c6e81e0ec1e7850dd76b0d0cfa9fd49aa13b", + "0x298d03c60b8dfca9ecac182b5c0f6818a4c3d84e55314c083f8913a8746fe335", + "0xbfa7ba8daa97bc681bc6ce413494b85ccfbc10e2bc96e148713e0325e21b3b60", + "0xe61dde9cf0c1c6fb0a37993df24dec2f221f97bdd34f607de13fb1f947e7f284", + "0x91e9a9e65d5076819146b246647b9698954bcf55e7f059db32854f93b325d35a", + "0x7bb2fb25b881772f318a10b6ce8896712c93cc85ce9c7c371337020e86817a3f", + "0xbfdda2258ccd28dfc81f83ad7cba81967120257392279c7412f0bb116605a21e", + "0x0a626f29328872380ebf6a10468307abda5a02c3a7b9e04763c0c8c83f903df7", + "0xaa8ee86e9446a125356a96f8ed47c3821da54b003558f68c823c4ac1ab966c81", + "0xe26f3cbd95e0a26683c26adfb71b6d4fc82b034171f29836cb9bf391cf172376", + "0x7cb80eb383da7d8c1120fbe79cf3bff3e5bf19b9f57aebe11f79ee23dd82e611", + "0xc9b85149830b7a2dcc1f613f40ae232bf5cce7770780bfa7c77ecd25ae0bca6e", + "0x859dc28f93d2f3b17e176aa8248d6720be498fc85017491c68d6af5f4798b437", + "0xdcc4dc79cf88601caf6e038bea275a98208d221ac8d3efdd5db3d2181c14c947", + "0xe1bd63a920d45b05efe5d2fb99437a26bb7049ea5b183e99866d6dae947ff724", + "0x4aa94bfe1501f4d37b0c55d77add7bee9bc7f24d444a3ed1c6cf27d67026bb62", + "0x10931498b823a9784c4aa3ece5e88b477050927fe4016e4b10de7e2e0eadbdb9", + "0x7f30cca2119b5a4107cddca59a88f10ad95cfaa879d97bd1e50ae6a347e71b1d", + "0xcd8a0dd7a4fa9b97641d5288375105273c9025a2c9f3d7d9d04179fe3f55143b", + "0x6c8ec850db640544b7e5b22c19253dd1595899a7663d40c4fe13de4258cd60ca", + "0x06ec895b6dd7f299edab3e2e3a65322fb7f8fa8c9a6182b7af4f0fa25acdc45f", + "0x45f6d74f05f7b366770428b49630e836c2fbcc72133ef03a1bcf9953209e693f", + "0x3d868a3921aede543f2bd8ccbe3b51468e7a87f8278e4601c4a8e740e8c339cb", + "0xc808c8fa7b02023e5c64999a141edf6e0ce0239e37656e0fa7c5156443f555c0", + "0x82c273cc2afd955663515932357f19d657eaaed2824551814706ae3843fa1739", + "0x5785f16929a6a73b4621e75d31958e2e9b00dcbf3a6b38bf3ed59672918b68b7", + "0xc8f84b888e55070682103999cfc315ea3d157d0771f0f035cf2ba03f6fe1b1f1", + "0x343a05e1a5e75e09528f194394caf6ca8caf94904d54d89c9d22abd5cae0d83e", + "0xddca7f95c2d9cfdc9efd9158d29045ba92a71d45488c40d28b257425c1c56bfa", + "0x008a2b681c4691d7e0de476180c969aa511467f27755d0d498eb22c9b5333835", + "0xe33fb40ffd6253b5701d24c59a4e217197f9eb7caf7c2223722734f4c74fca4b", + "0x650e8f1c6c4dbc76ace7d6c29b9a659d520af9b291b389bfe3812c1ccbd07c58", + "0xf88c36b8042df77734f99395eb68aa9f4b67a21891c42350e4d5e3e6d8fdf168", + "0x882c68aaa8d1f6acf005ce2ad3a6fef7ec1212ce610dfb8a7bea9417d87431fb", + "0xda73d75513895d5bd5174814da25cddac9a633507960e78ae6884b92e48ee699", + "0xf07d98594c0ecb16cfed18adb9f7b5b1055630b43444c70e6357cd18ebc09392", + "0xd70c5886426c55dda997d615d325b5cb5b652f5673601a045a113d94a17715c1", + "0x3e8dbda1f53c55fa4de65efc7d294a02d78c69a98d59049dcfcdfff6b7eaa521", + "0x67b14249f9c987298fb00e0bf560a976dcaa7fc0d02e816f84c3bf7a4e7c6901", + "0x4f8affa83492afa72e95a36f23356b46e58a0a19ecfff6960d4d6e5b9877b1d9", + "0x09cd2a17655988d2d8cd5fbe44965a6c15c3f123b75e1229621b9ab74d030e53", + "0x30693dcabd19e89bdefff4753cbc64d00c65a4af98f782e6e67b4e84f6b015a9", + "0xf67db822aaef8bdf7967c0dbe25015ff6cf88ce21e8bdd25feb764828ee64951", + "0x9a587510721ee914cf8b9c863859629ca0c8ed22b0aa023e9efb0756d3f9ee5a", + "0x5d00c0a840b96a19679736a7ba555f3e9bc5263b4b8437d6c3779191eda0a7c4", + "0x3e01cf22757510938a5aeb2ec6cf5046b7d3c186bafad7d57b81c7d2a99415db", + "0x0ff2d3ed3c5acfa5db9f9820a1a314865e266a823ab42f40bef6b0276af0a108", + "0xd3207e322207667c614e50be784f6b4d9c3f48362dbb65b17c62f5f33e631ce8", + "0x2c3330fc9f6394c0b8eaea0d156f2b9e2d2da0ddc8837e0a28d373aa779df9d8", + "0x56c8542686730adabbae6717ed8cc8f0b974037842ea5d1c80901f7c85eef3fa", + "0xc51d8a382df91e9f1fb0dd72d416a7d094aa3b8ca4f90561e82fdbb9b78c28c4", + "0x6507fec75b170f930df2e28dc75ef3dd7313834c8a8a2ec837d4ac27fdc906d6", + "0xea23428fd27ff3e5c6681b0640264ff22964c49ab0aa41f592280ae25d380c83", + "0x8e2a629fee2ba03e333bcf7fa0261dadff518dfb0e386b21cac0cdb2c7c514cb", + "0x4b00742b5349bc9892f2d36abe2c723a30c4a20ea5b899a7fee8fd759f066fbf", + "0x5b8d880357c44a79c0d04b5d347dc7c012f2f5cd7679c4d4131e5c481b45f1af", + "0x65d2859128eac961e29c063fd918c7a2b485bf72743cabb0fae8bb288f155dfc", + "0x3db9720d20d90d7d1ea448488d02015f4b1c36f556d704749723ae1c3a35aab5", + "0xd9676bad19db9f6896b2170e6cba496f5714ff9a70252fa1d4c82029435871a7", + "0xa36e49e6be40418bef884caac3b30e63fdaa1b8f622c70ede69e6d7c9c6f4539", + "0xefb40f7d197a63927f761d99596439b7b69cb7a39214258b372450fd471ebd88", + "0x7420e77f7230c7458f728f7ae5f63f0bb9182fd11ccb9a82bfcad17a8d1b4f76", + "0x7ce9551cd4cc5009d28a6048701049a5decbcf7e11904c588107da90f57149ed", + "0xafdbfc0bd5252cec1654dd24c375bf9f4af647cadad403923d6aa525fa44aa85", + "0xef0a4ef158ab6b06863969c24dc7ce5fabbd36181e9eb6d1662ce227b38f8e61", + "0x4e6d1c00feeb4218a0590fe046705fa35929767430f2c33b2176afb45f26a71a", + "0x604a1bef767235afcb7f84a20ef59d39618593def34034c67cdabec8f9436ea1", + "0x5c91553855f3a32f708dfd76c83a7d7f23aa80e5a6d2a7e9d83e82a333c9e267", + "0x48e35d198e8194ef83496392e05e3e14cc9c7ea1f324fb259c08a0f8385b422b", + "0x9df1a27224c2a20b229cc8686d95efb1570e822402c9df4db0b47f190c33dbee", + "0x020eb0cf345413cf0324f7561031eef27f188de5dc41bf38471547aec4e716ed", + "0xe9f7708c2cc8ee4785ed54a0c153730103fd92c42bb71eb4f86a93111ae11018", + "0xe7b3a27e3f5ff6fcf2925db134ee5db522a008db4d54627b729d5502f3968d08", + "0xc9c4b33c131365224675a89e4e6833181ae50661b114da50b14b0669d6ab7155", + "0x8986fba93ce8e336542d3a640d156029ea1cd99c2cc4e946de6d46e040e52bed", + "0x53b6ba779e5b91b5abe44eacd354f6f9b5b2343e66d60bcf5083ddd1a5147d21", + "0x854e090d7d5cacd3e52fed513055b51ae884965bf1146a629825269506f97371", + "0xcaae36c05b0992f80bfcc8f1c5d3a771feb88aa67f2c87b770637fa24000d84e", + "0x6992bffeb071ba81b30b8a6b19e9335f8eaa2da4361844bfd57f08488dab5975", + "0xdb63608d8eefa64871fa9fba1da1776a67d0c0495502c8eb4005eea4a0089563", + "0x57071fc1829365707d66abfb8e388478cf61a14f34af2c864b7299f6bfc2322c", + "0xe077cb6b750e158f666ea79aebd5e19e25b9d3694ac7a44efee1fe58f2bff202", + "0xc8180f9a9292284d2ba09dc40f89595ae6b554e6eb0c96aff578725076881102", + "0x89eb01b1cfe4089ded962a36ddfce84eb0c4337780446cdd88738e7241257c30", + "0xd1bfe1dbb1c9b6a06a1c18472ed66a82ca5c7ea1fdb5dcb9af1347e6ed97697b", + "0x33695a8c53e9e16e1a2255055eb069d9fc59436ce0ed698aa7323cd7e078cd96", + "0xa1c746d3df0eb28100b84c6c91da402c5c0d6a8aaee66bc05095820764cbdefb", + "0x3dd355f33c841eab61323ebfbe4a608b3dc9779a291651b885383ff70b8418dc", + "0x206c8095f502a995777d4756949d8fa7deeac36a106721d6bd1c536994fc8adb", + "0x95a9ffc34a966a157c5e797e3a1d0029bbb86999f1716cbdcca9bdcc5e77a5d5", + "0xb2c4e8a21c25d7cdaeed3a42b8670602580bc99ae5e85d4e36771e5cc2b7e0ff", + "0xc34e130d5fa9ae3df02c54a5eecf210d8420db5342af4041d77b8ade44d2c67d", + "0x5d733448fdde29b3f3749e70addbf4fcde659aeea24f90dab23997a696db5daf", + "0x8d63fe21beb60523466595253d20fe518dda259cb44fab5945943550b4e960ad", + "0x98e584f6dc76ddf7ab116d2e9244d0a0ecd99d180b1916957054f8440623f727", + "0xeb66965a23c4413fc5adbf4925ec5d133d2579c1f7764d6199eb4f7a5548aacc", + "0xc95df33729fa401a40bb0ca23731b61d5225f3ac6d159f243e1585440e16d529", + "0x2052d0e9ec0a62dcc0d0c892e7e704ed0ce03ef8a8e9c898a3691a571abc5c30", + "0x1f8567628ffc96390df8b7b32ce8ca70f6d8bf57b2ea0bd9e724c521ecd4747e", + "0xf2b48a4fef4c6c6127f7194ac76c57167cbbd65b9cff702daae1ae21dbc2896b", + "0x38dcef1bcf7600494424ae0b24956deaf664b92f3dd60b7a941ea144d789dd99", + "0x267d1afa22f77c5fb78434d822ee1c3fd24740d6a30f3ee4fdac95949ba8c044", + "0x0c01005442f62fd12a49115bfee0faf89d2da7572dca5b0e8eee445a0de8ddf7", + "0xa8d05f61408ed491620865b2cef9548d88182f37784e190b46c36bb09dd2d7e3", + "0x655eba047145af7d76cedf34e144040619d2d416367b57c7b7d9362a9375889a", + "0x5233ac6cb0ff6a892fa475b0074f4b6abd8e244f2a665e6649232e528bfa17f7", + "0xea8b2976e790ed22d708bca311a5b26c113e8c0ea4cae30607d94eb232ccb0f9", + "0x159dafbf20b2e624d22018f214cbbfbbd83de406e9bbaaf53ba46041fc3968c9", + "0x4d34b229e010a2ef72dec76c1449cce6f61d9cb17701803560af6b2072850ef9", + "0x32e7064197d2f739695788a00113452e03306a4f73f80ca62fc5e3ec223aa176", + "0xd1604bdf1cf9253b7b0ae8c92d09a2edec43221394c258d29707ba850004615d", + "0x07e0048d3913db33c6a9b45a1b232a2088341441d398b09319b455f57c18628f", + "0xf6492cd50378901ae238c91685319405d9779a1b78f22bf36129fd31fe709cbb", + "0xecaad91132667d0b1a283da22cdac651a4036224bd0efc79bb747d0c5e64b1d7", + "0x20565b022a8a8429a79a56aadbe2e32db24748238fab33eb2b0be5d83d1343bc", + "0x25e6d936a7b526d45ce1430744f5f4b41cf694d2cc50753cc88330e3e2a0bff2", + "0x7130e4b84c6efae0653dad6e16ec677bee7060a8da8ac607bde7a2b01b7511f0", + "0x93a8bf0a86793725e09b480d9098a43fc30a8420c5c2c2bd01ba8afa837c2371", + "0x2690922d4bf86c9a35e982b10f723edae97bb2a842f362036337396c7d9f9d16", + "0xd26efd262c6605d3be1ccdb03b96318613cf2d5b80350eea826758b9fd8bc28c", + "0xd3b2c89961d6cce736a9994f8707f78068a9806044cc2c96004d659f82753690", + "0x0fecacd3eb8c415a8db644b4dfc0ebf04a27f9b5e53bdac80fb927f40da4a8e5", + "0xd5600a3afd0eaedc221893214d629260cea97d7d5335e361d43183b4dc678360", + "0x340558e8951e1af701e95a963221109154f12c5870e9c9b9c4d7f9975d18ff89", + "0xb2ec154d6a59610822ee2318e3f279e249067893f806b129f4f0497b42aecff8", + "0xcf13e6343d50af1b2ff792e5a694531077e67858d76b39262ad19d6194e62df1", + "0x39db02f0b3f062645478457da8145fec8fbbc8a0981be9183365fbdc11a622a9", + "0xade17860c7f456c0b8014490f3cd15cb5f080e7112b789028f1e86ef428c06ca", + "0x1ab544445bb5d499c541c4fa02c5f850b9d18988e94ac6992525e2ad372d4936", + "0x2c3b4b33a865fce54d1ba1909924b0c6cf9a14a8cc4e3a42e1b4eeaaf86fc50d", + "0x857bb3e657f86c864407a7caf0c6b71e42427302adb85c853f330d00433ba077", + "0x79e42bfeb2cd1191783b7b2bea5e0e2693d9d15ce8d230e03dfbeac2c90451f2", + "0x5ec96430d6d1c1e9395a214e1a685e92c3780a78ca94a173d0e38fa6bca96461", + "0x544858c87e845b1f80043fb44f54a2449d31a0018025f1b41309a745415b1e7b", + "0xa26f04bcd6a580b99e9b81ed739ece117ad357facf1ecea246f891ce740029d8", + "0x857eb2767e67873c3f1ee4659c778feebb69b248950068a828d65750002cec36", + "0x7d6ad830b628a38b1753a33e5df98269d351b42d5bd60329e4c205ee5f30584e", + "0x6cbbf7d83f87bba0d4b4997bf336ac52934866cdd77e7dead51de84bfb717fa2", + "0xea77b839435e70cac6a89e891b8d1c495b39d8d6db38c352e10931e70502ec20", + "0x4d6a29a4487600b0e05ebfca7418dd6b43746ce96a41d4f17e25cd6aa1a2b733", + "0x3e8223ea6ca4ff147b59b025237a2a477495e746e7a551045374b27798ece58a", + "0xbf880aea05a3e440f31777f109995f2a1967272eebd9ff0fac241bee8747a8da", + "0x028cbf04056dc0f407496cfa901a4491c659173083ad73f84d457f016e0431f6", + "0x68548e63888fe0f203a333f5a5c950b36aa35e083a0161304a2b80aa626358b9", + "0x385546df2f083f4781a8b9d5b645516f5a77883eb7dc8d5e399f4f563e8956f6", + "0x358a0c7c14057fef517c38de9e2af33ab44f68c5c99157f9429db596e822c842", + "0x5f89b867c11d5258618595e2afd3f783e8db81dad073d8871a33d179f537cfb8", + "0xfd7328d25120390f5982919333df927ba3c63331321678906256c1ac02af9a45", + "0x406a9797947503dc57776a5c2ed6cad71ed975c05e15ef191b310088049c11d4", + "0x6e719945fb48d4db24d57a92e4d6da5cebc1a3db4a64792dad68b06f92c69c87", + "0xe2e7b80879a7ffc1e4e3f901ac99d252c1625b6824000ffd468b2d09d2cffa25", + "0x179979b54792b23d1f1940550d7c961a1373f6dda048817d087ed6d731af73eb", + "0x10b1ca5637aee0b063bf3a2fe5cc1729929b9932cecad392d7da6d567ca82d65", + "0x89edc6ecf4b7f292dc26c29515ffc3367850e5a8dcd95979244f5c57f81003d7", + "0x2cbdbde44b43c5dc078433925dd423ea51886e880b04e90b156957dd6a057d1f", + "0x6953ef4d3aa2abeac14fa44a0be4979bde0e579cc591370b08774f4e65f95d05", + "0x0735cc7c85194d5abf6ca0dec712db94b6b009c9ed74ff6781b7940064cd4626", + "0xc3f9b62bea678c0683ed688b77767b3fe3e4fc86456bbaa8c0172240321242a5", + "0x3640c7a7a1c2b62492098e0b5b9f4c482add16a86c0f88f8a60eafbf28347ccc", + "0x73820554bf239c8e1b92304f3df8290d18aaf765b45c8820f618d05eeb80fd66", + "0x8b948d61bbdf95e634d5c3827c66266e3ee42b49dc0a29100efe0f7028d100d8", + "0x8c422f252ce4e7c981b93c24db0984962019394f50ef5b62cd34e32ba7602026", + "0xd250921e7c17e016360e0b79d61d6c19ca40ca2d84c9a7c8d9da04ae4676c29f", + "0x4e71a2075113014494b5cf8504d48cefcacf14ca6be5d99f945ddafed4b58079", + "0x40d0dd35a9c91dbb1de1df4202a50df1745b2a5e80b256c3542bc0cdd5a2c524", + "0xf77e21f9edcadcf7753c1daa00720e024f56250766ac6c31a89e8afde10c9056", + "0xc70a38751d11c4240f2e94698c0a13a62d0b3cd825527c1dcc5e653186034f07", + "0x0f4f7881dcee934f71ab555428e89e26112ef6e99935761f3d4f314bb5504a20", + "0x82febe35f996dc229d6f6e89ab4c15f5659860505d64d454f625c95284a307b1", + "0xc557d10c1d19c90ccb9a504d31b0d91bedfe9a82388824fe901e8325a9996dd6", + "0xa241dbe076d02feb2b67d606b8592c970d193b84309196191b19087dd74b5eb1", + "0x4f687e1fdd09e68deac949de2738583e0dc2bf245790b5185e2f4e00f5e8da67", + "0x076b44af8dbdd16f859d9604f91e8809f929024eeaa6eb457c30db2657c03430", + "0x1bf2736aed60997b49084afc7a3d2b429d8b8836183c9ba71fd61afbcd1b5f0f", + "0x18ef59174edf670a07ed5eeae04eaaa08345d384d33cba45abf2a08af2415a5b", + "0x30f123870658c6cb69ad9314e6260a5ece2d5eeb4964601d4243aa1b56f4e021", + "0x36ac3e3193b6fa52a7134b9e4c7db6ce746619bd7f4d07201362062a3f98be0d", + "0x6a9250440bff309071b1493b2db2b4134c725ae364fc8a8add7e108f7434de4e", + "0x557876702f5bc2bbe17f13c76d0cdecfa68b0fe281f084b2f343d130405bb80e", + "0x5bb14f5bb4abe8e79909035a11109385ea2fa77c4208946841b61f1dc8a5366d", + "0xe7602f83ef13f3755b1f99c740fc46211f7ade9088a1942b8ecbd5a33482c093", + "0x30b8ee6c04d787ab137e7bd6cad1073e4e77a74db657798cc74c79676de337f3", + "0x01067e41f6b5fe5a26009378b7ea4b0515aac9449eef2730de5efc22554ed10d", + "0x73dc8e186c096c752f8dc2a69805e1b24eb5edc7553be26d36698b25829ebfb6", + "0x23eb0c950ea1467134caced1d86eb89d4addda6f8ebdbcb85d9127a5ce0427eb", + "0xbd0f1080cc7c2adc0874fc6d89207221155bf414e1cfa3f9360fdc98c820627c", + "0x0bdad5419ef94ee6aa76e4971981e54f7d6560f3faa3531f5fede35cb2e211bd", + "0x8a339a58e2ffda5cc2ef1e18a078fa09c3aec4b2a8cf9b6094ff620fb88860dd", + "0xc9a633a65b909af3133befda06a57b3058d625d816ac978f01894fdd7b3295e0", + "0x6dea631bfde98ab2b7db165e29ea75316ea50137d15a30a9a3b444d50d419e10", + "0x0a74031d338957b9564500f28f0e45aa571f48e4c85cdc52d6ac8d472fb66661", + "0x5f9e646f342e665b2fe387bdcabbb381a71e54f766afe9a5ca6c2cf999b50e4c", + "0xa8691691561a9e3236c0a26593f1c49b42f03c94ac3124b16b4aaf07fffb14f5", + "0xe806b7ac21b2e7d80f0e4583dec620b2b3399f4c1adc82a246bc77c847024310", + "0xd588437c72ddaff5ad3a154915700ade8da4023421008956b1b3d1bf164705e4", + "0x2f12257a5c3c0097b274697e648df08c31a3f8cf0833e45e45fe76091c7e22da", + "0x88eb766b8fc471e455e50a183b728e6e7fd3b5a152440bad5d1c7f49e173dafb", + "0xeee35cb04632e48f5b4c94aae1a40c372eacf5ca773c9dfc2fb3378803a6fd2c", + "0xcf9d9bbdb883ac7d171f808738dc5ad4e632d91f45737be4de2f9a2605141f81", + "0x94ace01f0f2f127e2cb47dc05a491df26fff49f68cd4f382c12e7f332032bc09", + "0x8f261b4ff772d1c675fe16f0764ae644d198231daf66a600d56526c1288144bb", + "0x95062df2fc6e23916b7ec403eb5dfdfd8f0aff49ca15e0b743e5a3294552d619", + "0x9626d392247cabfdf89c0254dee12f5d82118b5449059b78b4fdf7ed62ffd688", + "0xc7b341b1a1464207bc1996364debec53e55a3212a2e18211a994d2c8e864e234", + "0xa5d247c7e7511015cf63aee2909dc9ea7bf56b9c2e15f1603b229dc7ed11a6b3", + "0x551f57a199b684836b3b5d6e6cea2c7cd58f830e870d1689936ceb93c652ad8b", + "0x0f0a17a40f9cafa38559a7b8a1b3848514f4b5dad4c4565f8915d04163f1b51a", + "0xd4ffba1b3fbb46554137cb0114feb898c9a1a689c0fcb4dbdea49a313c593aef", + "0xe72848f46d7f041226ed0cb38549fad946e14ca379fbba4cd52a3bc3d6b94c55", + "0xe34036fa757a07055a5ba89f39f90066237152468c6c3fd8e60484000dee38d7", + "0x0984ba7640b44fefc22e2b53463b91b6686b909d038a29039a6e5f84e25e1257", + "0x2fd4072edee29b9b611c38972835d3cc985befaeea149311fad80dd0a8bab088", + "0xc64954228a4067748447b768bdb34d5a434cfdfe01acf86a11d8a278ee7d7433", + "0x7b10e8fb7d81fe90362c7d3af0c153460ed3df92c1c50b6f9a993fc81e0f29a0", + "0x0c33f7aefb88bb9f6cb9061adcb5fc535b2a3841a6ad94b8a4adce1954bc6f25", + "0x21460cc4c2bd2d828027b9c04b047c06b1eaa83f47640639463cbcf603e4b7d9", + "0x9ea560bd5c0c6a0fa9cf2e0e14ddde39cca6c24b11e02b635bfd4ba7ec826e0f", + "0x47c9dc525e0e1f71e159ac75943a32d541596c9b479639e0e8f00a171a29057e", + "0x6f32319d8d958c89295e38c41c2a6106d9f6bd86ea19ee6cd3df34931a2701a6", + "0xf90b80919f035eaa3cd56d1c54f9c69e60ab2445a4995c7969a4826a28220398", + "0xb9ba6d207d1d7866e6205d540abc36bc3198b072aa5d52378a1148f6a61210c5", + "0x2f494b0db620ec08b2961a12d79585de2f6939bbe679a8ae1a580535437bb0e0", + "0x65ecc619942b4fc71b4477dc5929244161cffe2933c84ef8e2d5eb443394e0dd", + "0x12f573e148bbef501d4325a52b737580d413c8f999cc86cd0e497d9201a006e9", + "0x709c2a2f2276d712070a10d20baeb7d1acc602e6cd0d27438950707175f68faf", + "0x472db00ea142b38a076569205123d2ae53f42c1ff86d38100742039440fef89f", + "0x536a68e966effeda6883266a1f6f00b42dbd874d83956a3312ac30e430607bbf", + "0xfda5031fc6bef618ec55de146ed9834dac41afcb0d0521b34e141cbc0617d14f", + "0xae912c6ae86e69a59c61a3fb95c9a60b37c17c3ce2b6e9ae4930dea5fb5454a9", + "0x426c6889a4d6f3896c5209b662d9caa421adfa1f1770f33262807a3c89983364", + "0x6e72f8cb2b6cd35fb0c090f8be71b1ba790cf2163d0cc18dc0bf62fcb0658fdc", + "0x7259d06d38028ec544eeab2e264f2d4ff975f245c3697ea8e141ebd59733a2db", + "0x37729ab26688e0399334fa3cd2748818425b3fc41304fca56881658dee0b90c6", + "0xcbb02add11c0edd8105b440cd44a041b6f55a94712ed12ffeffd1817ae8a8044", + "0x156e069b3b63fb302693018293bcc0ab60b2ee2cc8aab43e1cca3774e0b743b4", + "0xb3a7a06a4f2c1034ef5a2fa5fde7554f239b0193093c74db11ebb5d9b1a18f03", + "0x323b6d191477aac18e4761baf8ff9ce70b1274a995aad02fd582f87285f8a0fe", + "0x7e4d202c5dc858e3a3c45a5f43b0804a4ff5ed53bce625ced7eb65db74e908fb", + "0x75446e5cc0142cf4b0f26f560995f257f87023312697b3574fe0e1f558bcda05", + "0xf53cfce4dcf415ea49360d84188b33a1b6e3c686c6e59f1a7385f68f3e160a7e", + "0x43ee5e27e64e778f31d641050b5c975fdd9788f2d5821bc8e3c188a91a86ba9d", + "0x6a3a73772d1ed7ebeb82eff2419e05583049939493e4ff396fbbce7e2012ef05", + "0xf976ee31f6b27e1e0f359e1f96b5900f34c49c89e81bc753456599d2e5f4a097", + "0x00ec8886d567bd489582441964bda82f3e297801ab0c5d3e58a3df29f9004a4d", + "0x9bd7ecb0d91d576640cdd3022ff0bfa64838f057e55cf35ca945d47f98d8d107", + "0x1868b1c9dcce55407f81879269ef1296c5eeff32ef4f7770bcddca4bf972df14", + "0x24856220dafd06f20fd0914d4468713654f6d9a8a8472a3cba537c6db45c1981", + "0xa05130241c7260630ce231a427081969d4428d33dcaeec08287e7aa80541384f", + "0x4812c23621b2399a68e81d9dd6fe59b0f0953b279104a69047d0df3678c8b628", + "0x4c00bb65a14a1b995a38afe285ff4594c51c8b10c137e73376da3f2660f00044", + "0x3cb2cc9dc9b1c997b8e73ee151de0cc23f5bc0d7dd27d0402b6d79e1b50ef441", + "0x25c0bda0d092dff16a5cb70ac082a0e3c17a42d74191c9c90d46deaf34c85ad5", + "0x8a75c8a0ff4aa70a0f1389f5ddeb0a1b7aca04b94af03e7c2f3986a6a9e8f8b4", + "0x9d9c63e3b449623e45de0542b1ee4d102204137a2ac36a25442f3797668058df", + "0x932b4ab5c339c9654cc1c5e343aef426dbfee3a98b7835efdba1bb583238aaec", + "0x8001e5592beaa70277723223f033b9f830a23d4dbc64fc42efbb80bfbd7e2a22", + "0x1b84fbbecdf3add7f514e0cda2b1c88b21a65d82da4264d06b332ab216179230", + "0x79cb6fe9cd675e096bc92d449093e78e59c6c4c813b550c25a76c2cdf125e582", + "0x4fad1261fa7d06941dc436c1d38188e3660b300dff7f2001a7efa7b8678bdaea", + "0xbf81d3c1b1e781a706c6acdaa23c12f5e900fc3f191d6edcd1636beb3d29a6b7", + "0x36cc017579e8daaefb5592bb0c5b2d2fb7df5afba9fbf02d0c750287c2353b78", + "0x0cf0b82b4a102f35a06f590481b72f93d570e929bc43fc188e829e01fdf0bf9c", + "0xc0b67d7c6100b042bd39d0b4747e854a0672fa2769dff0dfaea01e05621a368b", + "0xb8c49cfa2147f651bbd73f97f02b694a5cc3cf9fd79d47bf34857804206296f9", + "0xd3836371f2d0071e45176aa82ecb05b5185e06e79043f69fff184121380e1093", + "0xaf9e77ff0a9c1bdb16afd7c1d725263ad04394e4b73f013829e63da9600bb35b", + "0x43082e5b9b11362b6b5cef0c5614848ff4c8cc9dbbc7e2b179330b46e7b3652e", + "0x6cb6fd2e7bd5550dbe63b9875814764e64036a921be1e5413ab1355d771cffd1", + "0x1631a928685b0fe688899b105aefa54fe61e564a4c9d8dec99a34f5140e6655f", + "0x095addeb9c0d14bc7e18f547259a68ea3dc982e5256f4a97e3f627c3b2140be2", + "0x520f53d82a67e09c157f3480b4f504dde53d947b9e2238f814f5832f84b8eedf", + "0x433777fbf6cded05adad6e5877ce0ea3e34342af6f65042c6141b4f4201103ba", + "0x077878ad6fd501074b5c713905aa3caeda3237a1b58087e6275328d9482b0577", + "0x6037000d2014c601b14bab5bbf758098b300e68fd3d6f2a0d5e6ced1657cd6d0", + "0x481b8e11fe6ca5cdc881bb6c3d7a0d96e8cd2aca705f950ac542c089d7ca0cc8", + "0x2b070c54b2af6cea0e0ee76d37a92ab3f4e9e04f3b581f41ef2bd5d2631b8b87", + "0x01ead0aee81e4611b5ff7cd64037ec0039a05bf0d02b18b92da6acbf45d4e6b1", + "0xfdcd33327deab31927db501945c15a82f278f34a09112b2d7f74219e9a364555", + "0x0fbf377a65289b1decfc2fef4614b1e5b3404e0a0c9c7d0d147cd86bed55f23d", + "0x8cef4b3d09f838d4acb5e21f777fbd906358a2759d24b055756e9d154b177ab5", + "0xcced9e5d45e86423eddcdcae5fb2080622279ff6f08a0ee47012b33af58f820f", + "0xb1e6b5dceef79d8ebd0b84a8990f724fd645be2434a0a8339e78fe61c2ad3186", + "0x24a11c3547f5fd5e5eabda12369f90b8f5c8ddb82568631b6e704c2ab5c94ec4", + "0xd6cc197005e41f553308ebed885a4df650a2022d0d40d25f37bfc74a94e5b04f", + "0xcac28ad9ef5e3f9b0d2184fb3427dad0838122a44538bb1e0ad15baf08ed7312", + "0x8070860a9337d8e6e016e0ba5953968bf410100bcfe5e567d7562e74b95b5d0d", + "0x8ab5cf8538537e591e95fb1dcb9522067ab5ac783bfd622e6c9bb131d3288ea0", + "0x345a12de03af922ae9e6651cdd4c4249f75bc2aef1f1651692dee6d27a490813", + "0xe9cbfb97fea7afed66cb3551d9b5f6ba697a4476a5dcb3ecf25bf9a41e54bd85", + "0x4028a3855c3b656c1de109e250412d9596cb6fc4aed22b8bfca6d2a60b1454c3", + "0x85591c0037f549f6d807c91b929fb0290c1b53f23e9305bbf4feed86d5483cf7", + "0xe3178cd8d8b7d9c71d9614744a937add2ae6c21f6eddf508fdec243c6408b647", + "0xcf40b5e2f93922022aaba8558b17b193c50f6440359826dc78b58e9b9e34074f", + "0xaa30846598de0f132d8c18084859e6c67189f9489a2b8019936a151e7d0812d5", + "0xb908ee8113c1e60abe60fcd0d7fedfef07ff0efa562673d0ab86f6399812a8cb", + "0x8f9d9102f709fc1b4308b677e515173a1db857b4989b1de2961b801aa8b39db2", + "0xd74e36d71447b437a4a4405dda388a9779347fe41152b7c5515e02edb567b5ae", + "0x5aca44d35187500d73b544e71ea8a12100cf011c219fd8b83e44b4792204edd8", + "0x7196cd91ee48f598c11527924c83431dec39ed7cd67a225b64a9d04ad23211b0", + "0x52584327a0b33be95ebc7040c0dd9b60d2bd0d42d1247b8d2ee06b0d6aae9f58", + "0xe2517f4a4218e9741b501cd6fdbc7e2080cc8827bea231d829d1717d24ce4e3c", + "0xc94771be6c7b5e858823a03e620670cc604cdba8092da13e429c76c2077eb2af", + "0x3f7f556817b418fccb808f7ede824ff17b119e7fb02ec1a4239a71835af5ac5b", + "0xd611cd2fcdea70eafce698fe405f361ca95b67d5631a9930d858f4a7cca46358", + "0x5f2aa6ad1fed0ce4db64bff6de7bfa68e060d357ddf20414fe5f10b4211bcf7c", + "0xe8b5d5fae7903602ab3699ff27f159367e2fbd8fbdb4f45e7b1628b563081940", + "0x31cef735663de763db98bbb0846d5a1127adf45ce41837aa77dd5e4008718711", + "0x58f0b43df5b6c2527dc3e22f2f76cdf7817e23d7c3b9a9732fb91e6da9a537bc", + "0xd13734d21521985e4c6c14bcdc34139efccf1f0a9ab92a72e0b9e639321dce70", + "0x99b982d744b14279defa1771bb358ab55f4f3730a8feed9e14023b39c44f2777", + "0x827078f5ddff2088e6d16039c439492140337ea661cb361fe87e0bb7fc785bc2", + "0xb1f7f5fcb807c343ebc587314a28ac008f849c24753383c3e40c9a12826c9f5c", + "0xd60f786c664eadca5ba1af303f8d8e88d781ec3611b9f781cffd5b17610c19b0", + "0xc514f1487e061262e2be76dd593300b8402df6812700c41a2611ff5aeeddfe45", + "0xac6350441c04277a76c019215cbec0fdab8f6e46087704ef0b75cad0356dfc32", + "0x724a5ff7c13fe6d21249b47f47082797b2470159b298ea281f9616d6b5c5269e", + "0x70dba710ff65ecb7c9fef28b366f5b175e12a63bd1f7530ec18da36027033497", + "0x014f4aad56ae3ececae45610e6d28475e588fd39897127d20675c1ce18479939", + "0xdeffd38ba5e4e685603ea1da27571d48830018be17755ef7c08db7f6dae63647", + "0x1e6e324967609029e28e768443d11cd5d99ca713a88c9ff47144d0b16b9cefc1", + "0xb2a2a5d5583ba070ab2b8adc6f5eca48b621b5244433a5e491784ccdac2e64c8", + "0xdbb937edd70b36b566e397fa369a5a3a0b45e606ed012277c64234eff00f2157", + "0xf043662cdf2a84618401c619fd8aea26a54519add9f72e43a520fc8129c02000", + "0x9b84dae2d1a0d7e23073c558e13e16ddf3a28daab3569c89271e0f780f134be2", + "0x93c7258e9e78238eec47497c842a643b339ef9ce4f236ac2c0541872a427a1be", + "0x8a8fea29216df1683fedc14a7a066226f9299d1be50021d3d2aa4c0585b29f47", + "0x85bde8bc039cd1820bc1b1262545bbefc07b03de47090008becd1417ad3b997c", + "0xa7758356e4555d213a19f5c343de9cbb986509aade6d8237baf1fc6e07084b9c", + "0x546bb118d2a1176ffc967f90bc342edbab4350f28294ad6aa29eec2b0c9159ef", + "0xcb50bf5a5a25b95962b6caf51b5e23fe60f6449f69b4df5d6b6d7fda2463d5bc", + "0x1730541314d8595b13f01281189321299fc3d2e9d0b9aa354099d6d83538570a", + "0x5b57218719bb9816f4341ee1938263fe92cb95e798193cc2b24fdc3836abac02", + "0xe0860d86c780d3bd7375ef6a0d75eaced9fbd90283f8ca8335205ac3d3a3dbfc", + "0xcd65eab452ceadb388b945eab3342dee7542c76bc912dd738e86bfeea1588f96", + "0xc15efc0c25c4c019937ad27026225024ee6992780b9ba02d3c70101a73b354a1", + "0x30e8665a5ac3f3eb1b9c2e67d61dc2dce761e4123ed801c1a6f207aa3828804f", + "0x6c3b5d4f836b7d349a089280c1f4488de60461c7c1a7a5fb3ddcc69c1366195a", + "0xdca4d348f2b9806cef16e320e0b21a539769746679c1a45a6145f2298db496df", + "0xe8fcbceae567fde12d871fe54233ece0d74ba8508fbfbafac0f154806a9462aa", + "0xd79328e9ca262b6a91652efb67dac1fa5e8c3282dbcda58d4b93b8874d226966", + "0xe0fd3af4b67510c68e8968a5e25e741e1ef71c9347e18b8de6139f918a62f6c4", + "0x70731ec895bdb4914a76b97ddda78a8805a39a56987aefe32556b93e2c085d97", + "0xb387f307e22829ce20c5d7906037a5bc202950197bdd75ba59999c2a09778864", + "0xde1ec63948e3c4aaa005630545cf73bf9d20722a1c35b8176cf44d80f4cb7f0f", + "0xf9156bb506ad9a12b3b2357450c443572a3e3399e97f68cc0166ea22155c9277", + "0x3d5c1ac62e043661edf67446ac9f96b1c887d07ebcffc2faeb317b5c3ab596e8", + "0x70e9f96a6d21fa71ec310b99db848e5dde82ac9410ce8c6d24af115421527223", + "0x366fa3d63bfdfd2fc10ce44522f36ca6b8f815629bd36a26c0a5fcd6f95fc5f1", + "0x34b6b13187d684972edbc097949de7ed4f7ad2658f9889e1798e955845f0de36", + "0x1ebf9da97a23393f6dc5cda5c54718f273eda8ac6d1977981a0e1570863d9833", + "0xcf8888cc905df1ee1127f59c8ea7f9243c4688daba7890908949b027f4af92e1", + "0xea4ba26d5fdff1daaa42625fd88aabf7f91cd400829268b9beee5fc09875c630", + "0x639faea36eb1a652b024df696454c856be53c3667e88c7af5299c050c1092bf2", + "0x1e67283656def3ee933332600071fde44127ea3caa9c42f992ed16e33d1122c3", + "0xa4f53ce6159cae14ebc60a69e9c446a2abdb4f4f5cded75b1c5814a84c487528", + "0xf2840725ecbeb6e7396551fe034d21e75a5d34b4cbf8b3b18dc5ffa06a3e2d85", + "0xed7396b51a1b0d93b2288a4bf60ad49d236bc14b0cfeb40dbbdb6e9682d3fcff", + "0x9de490ca8067c84f922547ab496e57b3e1fc4685b744de22f1cac7dff687b930", + "0x3c3f7c57fa9ef833accca168540766407bbdd2c418f13adac42838f205199462", + "0x14257d1a35fa99b3cdab74c8445bed9bbfd25d1604e1b9123fb5c5bf88cb3a29", + "0xac74953d33cdefa9037a415336672144c53310ff50f75d865272ead5e0460799", + "0xa94b857f4dab303c1d4a5213c7bb8b91a441ee8279e69fa92057718f3aa40a4a", + "0xe7c67bb2e440f1062f95e28f0924d0b29bd789103521cc13d13a95673cc49179", + "0xe90ea613252541d3c5237a27d4d23780b579cfda48c057b7304ac14751166031", + "0xd85a4fd06114870b3fe19cba9924405de1e14e026372e84b24b4ab39e7879545", + "0x7d65651c6e789a3b6113f589f696ac6595f279bddba74a17e955ae6ff93a1846", + "0x5e44df731c9b0905ccc33ed49669b78834d065fe3fedcbd0fbb7df95f706c51c", + "0xc90d3dc4bff702b9f17930d27b039bfcb1b7879076bd82a5650177252a526dd0", + "0xb5d0f4ea7136a5f10e47f6a802b46ba0c7dbcd4ee10b4be65ccd55fd4c940bdf", + "0x4f7647e2529b477aded041ed2f4c8e01d5219839950aca43723993c2432105de", + "0xddf89de514a09c21918af718834060348ad0bfd3b86e0953c247834634eb841b", + "0x325b15b05b3c863822647b25ddb970cf9cb52ecd32cf58e6c5e8cecb1beb9c89", + "0x3cae2ef569b1e74770ed80bc31da2addeeadd59d8605eac8edf3dad0fa9b0c37", + "0xd7409a715ae5f091fad14187121bad8263caa2f60ea0d0bd7c524065defb564b", + "0x5cefbb199b507e3b64008e5d639cac8f623e9ace1292fca190bed4b7aa214899", + "0x2c2919f07eecf553b473f98d06171449838bb03c0a468d8a7cfd8062a574df1a", + "0x5c122d8416b78e0e7328881efaa7fcf61be6851a5b7572ec5c341693fcb9c734", + "0xbb81898e64769f0a6f1c20a2472a5128e969f737d1cba5be885372453ec18d1d", + "0xbe203e6f7c0c86ba994fde55d0daae0f066814938debc3b5a44884dda70e3ac3", + "0x73c7842f2480e3d742aed1a1b7682ca1f322d4d2555cb7fa402313024c2a13f9", + "0x5b95cde26a2c2be298a03252ce36514dfd3c9e84f5c5ffb75a050bb5752b6247", + "0x9c7cfa9294869c1c42db3cab3bfb737696b8f81500742bfeeaf29145e2b5c79c", + "0x6cffe595d85a32ad1656c81c87d476e6e7f602609fac052a0a3e3a951d11eafc", + "0xe2ab30bf8127106a4507034cf6b3589ea3dd19bb10c765434fd3f3f7d75c1a4f", + "0x01d7bfcc2d4c6fccf5e0599f9985af838cdc0281c9c8cdd7006b3b0abc775cbe", + "0x004114dfe63995fd66e6932c62cd7b3f40108e5e2f6916d19dc436cf016392d5", + "0x068c036ea74e85ae8d8897589a8dc775c8516e38bd619ed584ffd51021393fbf", + "0x682f4444c85c46d28f5858a91874e0c903e97def4e2a4302ca90ab69b54b4f49", + "0x3fda79ec159c2878e9ce65c575157daaa9561f17a14a0003d95c0c4264985707", + "0xb41874256b5cd3ef80af1536a45a8016cbade06b4a06b1dc0942c27124d934b2", + "0x0eac150f30020a7651a006324da1ae240d4fe623f077c061a954122b0e17b0a9", + "0x0b174907572651a2453a14e0326e7ba836781dbd939c2d75db84d9b481391824", + "0x082beb1974f7201be32469b9df42d9c30a520f4dfa696fcd991ef20367cb6eb3", + "0xf3c3ebe6040e1ce5c5ad1f6e08965ef387adb6633581ce3fdd1858f1da4547c9", + "0x6ba341211e75ea7346853a3f63ad5502f83aeefeac98a479aae546a70141af99", + "0x3962cc5bb73ab7f48d98bf65f3f7f41a8f3c52b4d7d2f12a0a89cd876f875bcf", + "0x5b49809641f72f5c96bba6b27e0331ce7fc7dd3ef18a4463c93d1f685b7a29b9", + "0xd2b2e8eec102c4b68d94d8bacf71755386bc3008d15d6090772a4739eb763300", + "0x704bf1701cee4f631f4de0e330873b1621490faad46203fab288cbd0892da567", + "0x2f7d29943c2b3ed9f59a66ad175d298f1e4761218e3fc52b9a67b4ca7107e93e", + "0x2b370002b007d4df272104b77c1224c24eae67de3e12aa599968b190e8d58c19", + "0x1f25435148cd815f4549de1f21ec227d42f360d207aa2f7de5466c4d28afdd0f", + "0x86d745be32470f409b5d77f92f2412aee084fc523a7ff7e57b53f39b11cba2b6", + "0x86d57512687518e3db56834f819bed57ca4f2e3845ef6affb15f29d1e166c333", + "0x9ec0e54aa6361293f68c14b7ee9dd32abc52d9649522b0d62637ac25d3a978f5", + "0xc2dcddcdd616160a196f1336e9f11c7685c5eaa4d3f5ca7c35d7eb14199d21c4", + "0x03a14db3cd22bffc91ce24e510421d60431db71bd68b8b040c89f85f7664967f", + "0x3cfa17c8017ee8692c5f440e6ff825b2bbfbf18d01466234bf69ec85c3c793e4", + "0xeb12362e925a0b082268e0e006165720dfa72ec2628dcddb6cbee4a4a0ab7bcd", + "0xb8c68067329a16ccc14fa3a5bb373d8281c79a20e1a15f74dab053efb881d13b", + "0x282be7cff399ee51b3b8ba7d9ce73daf0427cb11151b9a81ee0f6efd837c6f6a", + "0x357989e62c038a11c75120f990adee58fcba6e7fd49cde265296b2ee0c7f6db4", + "0x3ca8e01da313e17c3a089b8b99ee118d10140a497aca58d62c25452f1361f0c0", + "0x9778186733b0e642156d6af17ffd8161608a2ad791cef0dc5d6f31e5ed4ccee1", + "0xc309f7651776d4510a9696c89aa82e8720ebb2c41c208e7ba8ccdf1d26dcfea6", + "0xbe30023b89befe4495b15daf4578f415e8cf25087428bb25b1af06b43b04b114", + "0xe7246483ab7e0afa2a6ebe69819744cbdbc588a5294c1c59cf04232782d89c1f", + "0x54e18aa712987567ad36173ccaf070b127277ad6e9db2bfd1831b7868f56c660", + "0xe5c6a4c0f07bcf3dab39def282e3af9f7dce84a7b2bc71c9bc3bcaf35bc6bdea", + "0x5d78d891bdbb232e7d90370b5108ee03ceb0c5abbd5bc1c49c53431a94fa2309", + "0x91f3efceb05e5c6114ce0fa2477d8e2a6d9979ab1d3cef4d964d7d804399ac50", + "0x29830ce8ede37d875e7203bfca97b104b002aa474fa9aa9fccc11b2baf665f83", + "0x93a0646400cf92d5e7490638b12408ee9fd7696f15005287d23238ee5fdba9bd", + "0x47273e8e24cd886a25e278d327bc0b07e4c3a6b27634fc17705f46a019ec042e", + "0x3469aeb8bb2312fba8a530a002d75b75bce0a4b0e7f48d3e92d595dbec818594", + "0xfa8abfdb2535d9f04933e924e967d97c248b62900ee645fc991a47d5ecde87d0", + "0xe9fc29b24fa7b2a6cff23170d96faa84aba582f68792dba4962e7fb53922c568", + "0x506d80c18b5cd845e0277be32d0553130549a976f781c315c674545b1087516e", + "0x676bec126c59b4f69ddb2ac8141d9e90b78a2aa1b5e55e6458cd479fc7f98a10", + "0x4a99d2f7be333ced3b6faa2aaf15f792e00717da5cf15ba2e9b5b7dc02bb1bc9", + "0x776f5be74f05d1200273ea3c9b1919637fc911c76d1a9c3e1e3accbb9ffe6e37", + "0x09b9f219a053c0c3c56581e32ac15fc6bfb4fe69208a5291dd4860cfee263d19", + "0x65c9e06136563c4648b76cb1e7c5d46bb7501773825a10c610f2b63bfd5ddbdc", + "0x2e31a4c4d6670c2155b3ba877cbc6f086c18059b2903ebfcf2cbeb6f73e67bd9", + "0xdeeccdd2dbb206be5fe2bd4e122d6cfa556d00ca0021384138dd914fa3aa2413", + "0x0c24527744343d79639a382412ad22e5ef2e610151e1a19f09f725dfce287ed4", + "0x4fdcebad349c83d27457ec443a5103b375f26b6da958227ff00916cb900643b0", + "0x4b06063a48575a6f89ae7fb8deeb316c30e6ecd080898c47f24d9e7d4f6db960", + "0x463b0fa1bb74f1473673a2760a7e447def169426f9f7cb57ae4c6d417f58d829", + "0x01050ce1aeb140cc812f24c6629f9a171ddf4891b9150b43312fb052ecb29de1", + "0xa9e4bffd5ca3834b5a80dd84bad6ba4dd71138f02cd386668aa8b73f437f3e0d", + "0x379e501e6acdd0f94195bc851c50e7674e103ce8563bc61d7b0e6ccdadc18def", + "0x8d93115aaaa77767f70287e025a445cf6a4c7f455a67615f38c42e827c95912b", + "0xde2d4d8337849ad10a32b1731a0c281eedad191a09b26764568e7cd9769200df", + "0x575de523f7dde0e52b68c15646d22a31e245a037d1218edf86e295fba9b201bc", + "0xa545dd5a5e5dca568a5a28bd387417bf3743e184189106670b03b423b9e5bb08", + "0x044d13ecdf9cd6989d3e5a1d8354d4f5a7d29439a5da0c57505496fee7b6d054", + "0x4d99efa30d95ba2f0002565ccdc0ade2bc3f21d3153c638fe8ad9977f1da8360", + "0xc72982c95de4754f8b0ac62113a71af4c760c3c63f18d230f1fdbbe3c0b379c9", + "0x7a2dc8e509b0901646afbc1a6f9b5b27ff69f2fdaf4377ba027be555acd128ea", + "0xa3656ace4d66ddbf55477ce61954f2e1f165f570b5c7d028d1653e9f879cd080", + "0x47e4e4bbbc704f65e3979494487b0dd51cc56a928f26f97d6e29d76db80ac14c", + "0x5cec964b6d806da75f96c67c1db66d7c539593c476c69a2207be25934443c82f", + "0x685e812268ffe51415ef5e540bd4d2d65c2f34977ffbd54be14c895e4f004abe", + "0x991b2344ae224901f5ef89be9ed8313ad2c217e3727ed8d24f3a35fb71df3982", + "0x1293f5ce59c36d3189ac40e05bd8c0fb4b69008d8d457b224df1ef1e0285b553", + "0x3d41f27e644e2f7de5173dfe7004e32d6dbc8cb56871f578c3b2b943210a4c47", + "0x2decc2a4e91de0ae9a5584cfb03f6a7a4e0a867e397dc74df8f185bf241cbd96", + "0x0aab7f05bcd3b3633184b45c81dffd70b3f1b1b23f28d46747ecaf54fde443b4", + "0x8bbf3aa92fb9ebba36c5a2756dd394adf505cb753f8d3809393e1d967f78e075", + "0x13544a2979e57f73bebdc7cd1b2a1c9cf8911b8f24868aa1e775c8c53d0e2572", + "0xa7497c9f04590c706fe0a3909bd4af5bccc7ac31d7162b2b856d3a36bccfcef8", + "0xb80de8392864c859aa8e9ca078c258a6992bd848de129350ba29548db6aa4afb", + "0xf334d02277f55288c189e6ce79942ced25ffb9ea7bd5aa5ae562a985eca6e57c", + "0x83a563681180ecc7a1fbc6e47e0ba03f5004a87167fdd451d559a573df30533e", + "0xa648f1462985ba8ff73c7aa4d19153843e6a9a454d976533b08f7a14d2fa8902", + "0xede4ba72831451bfc8651419aedc62e221bd8acfd8d4ebe426d5b84d862d3b71", + "0x2ab8f2dc9b620b637aa27f9303068abfba56bb3438905d29c9a6faba4ad014c2", + "0x225e5b7232c6edb127a71ea313501e49dd86f4df0a037b9c97dd5fffa8c08cd7", + "0x85606456efed98380428d075ac4791140c9595b83707a397b274805c8fdac4ba", + "0xe298a5939a283d03311d1a19f83805f63c83efd2d7affa7586be8868284be900", + "0xfedc0db97df763328cd9a8c8bf1de73c420ca33dc3391acd6e4e847eda793d7f", + "0xbefdc3c7e7ad41deb07ec2821d0b84893440f797fb1603863e274368008b8e74", + "0xba3b21ae193db8215fa341504fc5ca46b58df994c473340bbee3f3fe90d72497", + "0xc45fc6625b0f784ae2039747aa93495b05243c00dc5c2bf46dc372c62beccf4d", + "0x32d182e51018fd1e19b576670ec68d59810c4bbfd406e2bd162e1f17a0555f67", + "0xa8886b1a9d7bba27219fe7f563ac0b592b82a1411392ea71a4a5bb288a98d6a8", + "0x396bac50aadd2dfc853c144091324a12ab8661590fbc738d3cab77910aa2d2a2", + "0x50e35af52bf6eac228c5fbf6fe5dec85989b76f44811099f2e8f4950e4ab86e2", + "0x9ba2aebd73945b6dcb9f5171155c0fff29db8cf40baf83b1689a7ad1004912f4", + "0xfb1cb1ff78859e3d5f0db0656821e12b8d247ab3896e6670426dce2055f1ff8b", + "0x230a6f6567f066e76413b72e7650f7cba9315090abc1bc7f93b861d85aaf0c68", + "0x4dbcac91377ca858927a01f5a5e8659b4e718ceca20d4962c43fc1688c4d7574", + "0xb13061dfac0e8f22dba518fd46ea95024cb97ef825c970cd5e452ccb3d7fc6df", + "0xc5af27a85235fd0e1da29b5afe6955d72fc2245c5709a0f29bebcc7c49eb4a0f", + "0x7937707d20bed2c7b68dcae39ebcd93b84bca9f471250e20f86f8ba58bb10fcd", + "0xe1398b71406488244a0c205db9c793be090349bafd87fb147c1aafb9d7d7deaf", + "0xb383706e1aaf7149b1ac3d258f6628e8e6d40be0dc096647b4bb82a08585b707", + "0x2c07639c073fd57cd719e5c67371e5c8db30f34855ffe0d985070b4b36e27cdd", + "0x7b264ea13f78fdba57d1097be39b6b2dbc614ae36cfea1f99d44b9966b3db035", + "0x04d942f60d32a80d93d12fb7c8ef95439e0da5c8358df2c01e7547596461ad79", + "0x71c93b0ec1e403906ce7e5a38d168b72b14cbb7cd0e832c2a7e73f485c7d6567", + "0xf7060c7f697a68824bbc178e02dcd6b12ca204da9bbf2a17b69ca858e2ea9574", + "0xb3b616f183145bbc77d8e3610504189e00c0aac3e15975e4e01f1b2b25c5b5b8", + "0x137f77c2fa4e911b6915c5a84588bfe78bf54ce39d09ab07e495da9283966d19", + "0x5949274e5465952855c28d70a4089644200927b54faa67d5aebbc4eb2b891aa8", + "0x1c695bcec5602b15de8099c550a3b738aba98acc46377cff7a5e58bd7f402ce1", + "0x8d1ffe39767f285d7f164018cf2fa4ec6509194c086c33af7ec8132e3572fc9a", + "0x31331d50f79ace5444f242b279be905e076d675fe4d4e1d32de728e2654a08a3", + "0xce9c3e8fb9a75e284c81925c6ef742c4f34e6f0bef11578a61be5325692a3a60", + "0xa4cac76b0729c42927d1ffb0c870983830ea66636e9abc6138b943301c59b96e", + "0xbcc505e608198cc3546899012cb59a3da60839c9060d2952f8ecc178be4bfd82", + "0x1b5ab87cc34a38f4be26c5e3e05903538e8e3af350f6e2e1258b0cf344ad9f39", + "0x85849c1cadc5d3bb555b88b1e5720110a1d4f7b79f634427a1f8d7e88c2e043c", + "0xee63ee939a6dbc6678415a1af9969526083bbb754a8c55e97cdefbd2f02900dd", + "0x50c63ebc1248164b057854b8ab8bdee0510a97f75e864e1d83feaf59541a64bd", + "0x58daea24885faf1556b3111c06351fa506b40b9f1ed365633a2246165abf3819", + "0x0357ff6bf4ef1b1bab206c3c3efe770c6493cd85d0540fa29492428d0a878c6d", + "0x52963cc6bf51a64c1f8ccc21c520ed95d5ecd0e43a86b85defd7b0113082e9d5", + "0x5cb8353b62e27e59824ee43a4bbdd384a2af41b52f9ea5444a1a180482ae7856", + "0x2815152239935641536e549578cd0d33c74a377ba350a36ef04b038e5fc49142", + "0xe6df1f1b9949e17e0a683b6fb7ec9ede2b49ca3d479202226ab4180445f86d51", + "0x3af2498e3ae79447c4b6b3f025a37c790622e2979462dee5913fda778882e5dd", + "0xd498a21e50c930d1f0fe0afa65c6f977ab8da037175f34f4478e52f4c1631d01", + "0x12478043148cd0413f56918565cc2fb0fb9802dab776f0a055093ee8ac131da3", + "0x9acd35608a37ac8e309e884b88609957ed24ffcb5816477788e08a874e6c5a61", + "0x53ecc517c7158fb6e99863c54795107258b61399279ecf74f443d49533a104b5", + "0xc74f9359d1b15de475fdeb56497a5745a93c741e5f2c370656b2e7c269c06511", + "0x8afdda4ce115a19309597eee883cfd257182db46070c7cb1f24955d9c872c8f7", + "0xc4036bef9a9e692ebe72c946161b3ce5c588f4421b7d6555b5d65f3311a5b0fb", + "0x4b64a608ae22b5a655cba7ef78624eb69f9f8e2b2f7aad8c04cc6ee95386e9ec", + "0x4b5506aa505815e519b5008fa8d23488b642a1f347f6cdbf53975636a677a6df", + "0xc251b21563070f1b3895bb4512bdac4395440217c5ce01fd85e89399dad72b53", + "0x07a7bc11d48537654d24eddee78d35e4510f22b755f1f36c3b81e98087a1ce68", + "0x66a0e9bf542363d8660cf7817ccfa3f4262e4817fba45d2871d0154b6fa7e969", + "0xb2493d6e033e1c29f62a409342beb82f692e565638736fd088d80acf7666b9ca", + "0x4c55f2a4ceb60544682cded4ae8b23bf217ce7d87ae90abeba156d9b1005f397", + "0x32b3cd5438edac8902527ac353356e99effb1dde5209fbe1015673778f7c5685", + "0x4066c6ad2c7170b434bbf3e7ca0fd678803351c3dcf1c56e84bd6c14ac2f7712", + "0xe74fa1fa353cfe643ad94f6a609726fd3c4b06f9dd7503431f84b13bfd87b06a", + "0xc46c3e5bc3c3cbc604513909999f1523d704578cf5f025a33f1a5273ff6cb81b", + "0x261b489751092cbd70d6d3010b5c5dd68c9041063c3f998b742e81060107e17e", + "0x37992c7e208c0b09309ece681e02e957f6310c6f42401702b31f752646fe738b", + "0x2b09e6bae0a34cc6c8c83e97c3369bc847ef6410551494af91a3a39929e7d949", + "0xebc85167d3a2fb3ecdc5b07d78b6ba3a0d8294901f75d687087449ed78b305a1", + "0x8fc0dda2085f4e515491cf0d5a525f10d50c58a0a86a58954b07264425bf1e16", + "0x5acaad0dd003649ef9705e73232b4f9598c3fa14cbfafa1691d0f987639b914d", + "0x41cb16b9f5120095aacbde94f52b635a1ea9f347af8f4092660e84a1b87f8535", + "0xa5f2fb17e7fb322069fe66bf093b99f54ffd9949fa4cc983d2266013d2dac2ec", + "0x014582ecf0cc003d21b02662531b8c0422d499d8b74069533ee24b9774c1b7ff", + "0xda9554b8c2b3fde14390f91282a91a9eded5473cf58dd2f5a6e6168cb4d24d3e", + "0x55fb7a99e9e6e3d9fafd8c9f65dbfe821598f2b5a63435204c063cb4477b1d2e", + "0xe54e3c51b6eea19c23875beccb7e18094e4db26f3c94431df1dec26e6db98773", + "0xa7c04b495735a1a829c64f06b94c486c0880a7c54461defb31a420fe0104e1fd", + "0xc7299bcf0202163a946ddd5d8ceaa209a1d81e28a27e5f8fc660c00505df769c", + "0x2526f9fcfb45966a26370e08b26cbe29fd5aeb568b0f945399a6ace1778ebb57", + "0x59b3d302dbf5e3919550c0c1b75bf111d513f2d0d948ca8cab6c44fc38459b3a", + "0xa73fc3b85209e722b88374b2ef3fa3df240ef81c9f9e0d4e7e422ddd124a5ae5", + "0x0dfe2812db18ec7836f8d2227e35263eb98fd2046f597c203f2b499b538a308b", + "0x1f7c6caf872ae90f4cbd92c7adc49ee2ddce61baaff37186111ba7d5347bb4bf", + "0xd67aa89ad3f03b9d801d3f1cb1ef58a5d9f6b8e4cd9d6fe9b862b697f60951d5", + "0x9d760e7ea703028be2d197a0ce28d4057bd8fd7638781e9846cf5d5886ef6611", + "0xe9bfd8ff1dfb81f4f5e5c3a3f821384f98d7c6b753ad356952fd10527e08ced6", + "0x95b6333df70dee92ff0d880239c2ec7a4016c6192391c08e797fe24e06bfcd0a", + "0x56651120494e23767700b82c6718a9c1abe469da49c38937582d08220330cee2", + "0x70d3bae96dfe1a093bf9233d9f8f4c149fe4079c5f40087dd49c6e524cdd96d5", + "0xd29445a1ef099b0ce227c88efef59677abe47763149e034c3dc96d999b66cad1", + "0x7e2fc31ca7a02f965757f118797ae5093cc95a89fabac7e25a22193f2346ca57", + "0x3b7ceebb659eacad955fe0e95a6f141eb4f59f4fa70e52da5c85d7a9467b9298", + "0xdabfe5efdd2d7a44022fac35b13c8acc8c3c1d69ff360d45d997887feedffa93", + "0xc883f0d5c38f40861f9466fdc84170f7605e9af5ea4d6f9aa5088c6c9e482b7e", + "0xd5b14197d738e2635f7294eb8993b01db1ec02de38a545fae881a3f11f3917a6", + "0x5d2b9e3f7a490660bc2592cdd4e04fc9f5e32de1de4c9a8c223b177627708bf6", + "0x2e94c911c88a1cd80e94acfc9f27bb5675a6ca79dab6f70f38a4df99f84f7bbe", + "0x23fbe80ce230e0cbf881279ff259642d6ddb579f0711c5f66e93db3896ebd835", + "0xf1eab3ddc0e2c231cc78d123e20f4195808a88f79c21b9ec2149e3ffb9b1d5cc", + "0x5156b02d5fb9cc38a14e3b4cef86fd99d01db773f681404889e6f7b76a6b2d51", + "0x4bef16dfae5442b8d2451abc13f610acb565fde8400ab2ce52c44f54f68308ad", + "0xa726272620270e5649309798d90fc52ab80b779fa03fe639fc8ef14256d5b1ee", + "0x7f327dd9c23774439a2c080274d3111e0487e1e9c848a9e11c14b2e5a9b307ed", + "0x711fde0a0f1474e0ababf802d8cc8da401d1bc4f836868f117f8ad3756179296", + "0xedb4b7af3699fa441ab53a6afaf380b5760fb86c6b5a0f2d73075fd9da23c8ae", + "0xd7062907f805b2b54e9573104b7248cda283ff1af3d86b7d77b4f9a94d420200", + "0x540b2ade8a4d3571094a14e7e337cb4ff66a86e3cc9fa5da85e93c21edfb69bc", + "0x3c06c59332db001ac1cc72e9b07adfe31155df74c920d7a897592fba0d265a48", + "0xe24179dbc1457c23d05b307e0b42c1ab276db666e49b48cd3e1b3dc82e285de3", + "0x70675363d1a4a6db8b803e3876b171c4ad70b25a56790ac7e4cf011ded4c9c9d", + "0x80dc30723f933aee8e126815fbc226186c07d724cb13c60bdd55cb470f159c4c", + "0x9be135832d600074ed784053d80ad3fdefde87db55088a545a1f8403429d86f0", + "0xac742c9ddd3e59c3467473ede8a794a8b5d1c8299a471c7510cca0b11259ffec", + "0x3089d8ef215e1cf33020d6f2dd005c96d9e7c8bacd2e272c788b79e3fe016caf", + "0x7b22b3b82634041abaa917ce6ac8738e1ad5ada1038bd1a583c84f2765640e0b", + "0x5812d6270239d7566288bdf58df80a2f692731062d3a0aca56d3df972616b553", + "0x0cbac8f96a15a1f57b3ea657e5888598f7350466f40fd46735f7a8229ae7c528", + "0xac6d9f1c216f28da4b97cf2f78f4a7d6ab38636e57fd9a4db71bff191a8007e4", + "0x8dace71e1c1a12a57dbb4794cc92d3e6641201ee75a8304b28b670719cd9a179", + "0x03d497bdc46d7189b30bdcea32a7d93ae17aba1851da4b5b7baa241f0348649c", + "0x9b2316358a104fd1a93cbc388c1419b1db9043aff711d20510f012bd135a1309", + "0x88d613d910c664cee5d50fe1733340853900df4000225698ce32816f457c30b6", + "0xcd9d22a2cb07552bf921cddcb89d879e49ac840a5cbca91da3324427d7d2b80d", + "0xe7d213479605f340cf3714234eeebbcdb63805c5e9479dc56d4a4b2733997bfa", + "0xd899fb4bf3a918a9cfd46d23152fb1d5e54f97b86bf270ffe28e6e55e924e391", + "0x14a971dc6aed1e7dfd4dc3ba613548b8966495628182ce99c4fde9124ccd04af", + "0x89800cc5cfd0ecfb45bbd253dad288617123b3690098e41b38c0d51cfc10234c", + "0xedfe6f669b7b9dce540683400260000ee191c3481577aac6efc163afd7af6154", + "0x70b50725e51c7a5fd4818be7286bd1cc9b15ec2ed4ab6c1bf7e7203c4fa8f25e", + "0x22d02fe95c6f959f72ef4c96329dfb31be8ddce701e0c3ecfc8398119bedf656", + "0xd7877a10f7f883975c5498cfcb07f044400a09d906cb94c8cd29f7a4b93e4b5d", + "0x2e47d9590efa111e19419df7cec6b157f4e06dbea4e64108b7101017bd0cbec0", + "0xbbaf38881063dfcece265083468830bebdbdbb833a57bd7844044ea0c57d1e44", + "0x9269c959dfb4540e3d6c815aa0135b945acb7f50b38fff49f6e34425477ef553", + "0xab47e57f72ee8c8d8857247f84d3419edf43fdf6470c9ab070d8733cd8ad617a", + "0x2be450e3b77d2d3377218412be18390e984fefa2df07d02edc07ebb2d64a9312", + "0x6cc64bc8709eb51b5321b25453e77f871f364a8b277ffe51afde4b8c7a181338", + "0xda70fdeebaa9502e8d0af2350824ee0807e31cdd55ce4195f32a639f47f399cc", + "0x2dac4b30d219640aa01a2d7c69528c8d31636711c915827a64a9219524f2885d", + "0x50932f0dbacb5af5785065dae19245148270f1d0d3515b8d7e191c5702047b6a", + "0xd919cd9f3f6bf7ff66340bab7c562bf53eb969b3e00fc950d1d3b0d9d815e351", + "0x76a276f09fc452ac94cac15d5226ccf3110080d2bdbcb01e8ad86597a03f21bf", + "0x83bd36f26e7d087ca641848f5bda2313903ca64f8b61cdac127ec56efbfc6ccb", + "0x6a65903a006c6759aba3191ce06fd45b0702f127d822d9c889df12b2d52c7bdd", + "0x8e440f04254f81737b00d3857d1a95bf8709f1475bc0ed15d7347c94e57cc7df", + "0x20929894b05fe04fe12b11d336bbdf33ef983eaf6c501846d48813a97ee4b5f3", + "0xfc727f2888aa9f47d486f93b266c6d09b09b949821b63bf86aaea830c16388f4", + "0xb9035314e27d890b6362db7cbb0953e953b57163be0d80e5ed36759500f3160a", + "0x6d2ba56b3c06326a0fae498467f439b47bce1174862817b5c703019e8d448c4a", + "0x6b92e2415eb7349014bdc3e705a2170a5cc09796930d94e861868f77c45d5802", + "0x83a57de8623aa9742b33b3c8b3737bfb198f738111e437d9bab12baa0660cecb", + "0x979d381266e5105773f922d3172dd020a6010b9e435f3bad16ce6065b537f384", + "0x3fdaa18e7a2ab12c5705b17ae33e96d8df9ab3be631bb9c46d31052ad423a4be", + "0x439e461837340e67edf1c7b7fcf633d5c3d8636174335dd80023dfd61f66c67e", + "0x3ba40c7198d6c75a1ecd79218edb9608b7cecae9f779b37d26873d040d29b308", + "0x66ca7e3c8f892bea4be87afee3db3c9352641139ea4b8d459417180c2df8ac5f", + "0xd55c6d521f3a145379a1daeadfede8f837928315c9c2f1c2642ed0e1a7e87674", + "0xb848560abba9f0e19af44219c2c1a5011ca43eff4ff6471555b3c1c235c40119", + "0x1fa19a85d008e7af8585eb7cbbcc8d61ed6248708429d0f458f1b497ebb190a6", + "0x72a4e2f8b7fe422eeec318f1127b4b4e4fb03e40a028d45f5444c9b287a4a764", + "0xed88ca02a5918d6f621fa1e945bb1533e33ea5c1d41f7915672e3c4e4dce78de", + "0x60ef0df2f7f5c6de3dd7c02fb202c9b3a13f48102f317b54b25b2f0f1f49b6e1", + "0xc49153808e765883dd21e1b58b5725aa1d242f920ff0ffe0c6089a5e00719c82", + "0x0c8581a354376bbb53379f45c92e914e46676b68305e8fcf16eb069c65e87cd1", + "0xb562721b9433cb712b3969d193e132132786434bde1d45916bd7423194c84678", + "0x060cfe84bbb7842e0a49bcf9f8753635d9fcd694de3b8d5827239606269f0cd1", + "0x84306039a875a723780ec685c34474d35ac3431d6ac8d43b2b6d1bba8572eb9b", + "0xfeaec570403a0190c889e5d2ecf96a9a6c720b3944e4b703049c81a35b56d820", + "0xae002e7d8e1279513b037ad09695e93f80868c60d2d8b0ffe6efc8e0ca8a51fe", + "0x20e1f3248ebde32f2fca51a576abfd0db3fcfe359df399f1c3102ed2183b027c", + "0xdf77e0510d24818676727c9d56b58b2495ad63902cedb04e2f3729b58374c942", + "0xc33b4b53e7eac8725f5b3c27a9431dd6e4f966b1289e3b2a1e158474f4a47f4a", + "0x6466f3aecc922abbe6f995a3ede8ae650be7f1c08679c5f6355e32ae95a4412c", + "0x56322467df2291a50bea2baf66169caf34eddd525655cecf6d14fd2295b2a438", + "0xbd81e7bf5e30f4bc1b87c57a4eda09293cf6be979bd2bb02650ce5bcab8da996", + "0x3d611638ca06abfde10ce7f02152069aa30d97949dabe3dafe8980699d49ca0b", + "0x12723caf905e0c044344c83d085f3d89c2eaa695c9d70c0a831d487b050ed453", + "0x473f61c421d202e15d4a62d4513bd48313d253004feb09d9b6e0502c6ba276b1", + "0x9583746c372cd042a46ada64048ac44b30d3b055b6e22ca3cef5404e57a99f0d", + "0x8decffeda7b7de072da8268776c4b9969cbf3e7ae9433334aa7e1e7c93567f55", + "0x543f5b6b686035462d17ef969fa09e0af3e7cd24d13650c2d3597516e62f9909", + "0x5381b2412f6383d057bab3fefd23d08384f345960cc2fb80d7311a63be5080a0", + "0xd96b7933fd9308f7aac9fc42e8feb9f2f4b586400fdee23798cad69611320461", + "0x0982300c344d44c2f63e1c1fb5fffdb44c23749204a0e012733317cde6efaa83", + "0x6048706531d18c5f9a257448b2826fbcf7a72bd08d5d4feb2928acdaeee61768", + "0x2bb89086896edfbe79407ea2bc8535c6be143be6c64ddb1190e626e091c7e802", + "0xd1d6697db021746970393fc0151bef8aca67d202b0e54f4f2702a5f86c2fbe2c", + "0x5c1e1a43ba2578bf4a302e18f37bbc4f1a67441fe6a71ee856662739a5821db3", + "0x1ed663708c0709027c702ad5ce0eca6d3e0f22d6a01d4517adab0a3d25f5eb26", + "0x6ca247d5ec5ae33cbecf8fe88c1aa64745f7a8d299bfd356bacf764141d410be", + "0xfc020b5ae74507a1475ef8e2c0bb516b67bf79aaa2b61bdbc472ba2d75ef5db3", + "0x1ef0990b9051937ff1fa02880131aed9787e6d7d41a598ce7b5094eea1daea80", + "0x9e9e9a83fd6907dc5407c49ea34bd1745919d9ddced756433f374440fa8c704f", + "0xbb3687f8723712f39a8e9f8865543100e048acdcbe2045803ad5a40b61c4a36b", + "0xe60d8a60edc3d7e31ceb356e493a28fbc845f302ae2a8d1e7cb80f53112900b0", + "0x294039b994a3ff53cbba7718280dc827fd582ae789736a026eee1d39284b35e7", + "0xcf87c0d2ee79a0d2506a3d557880f3ee9a20ff51bb44c20caae0849a85055408", + "0x0d6bb688dcf3430e46de1512ebc9e411db3380590bc72dbaaabc52a5320216ad", + "0x9f2cd8a43695c78c7a8fb1352d581c82dd9dd0ff04e3485d5bbdd5e3942f9c4c", + "0xcb32930f407012e479eaa7b4844107167f519deea6c7fc0351cecb93c500d63e", + "0x17e759d815596e0b89a3dc4ba12b9d10ec59988fb0550e1518a8b1cc4f331190", + "0xfb3b36940c6675249451c4c857f6742bb0e1fd3eb126e370eb4deefe238d7d75", + "0x47d619d7d8a9510290dc0b8b2518af2862ff6f761ff09786dced91e39d8afeb7", + "0xe8f40bd7a7bb8f7dffbc63addf31a27e0a987a27c00525c833f6ea8f508537e5", + "0xca372409bc160e5eb7fa70e2bbfe8daac9763b374c7bdea0cadcc933450443e8", + "0x6e234961784273f80136dbdfe0f5618fce6c0d63c2fbbb5d7fd6823632c0ab6c", + "0x2a6cb327e669de9f9783300ef6b2cdba5585236e286ba94dca114de92728ebc7", + "0x0e91e6a11ea59f840d9bc47f251043e10159880276bf69beb075557e38715fbf", + "0xd452ed733b985db558b960ed14310215abce589d4149952a3ebfc7604082079b", + "0x7fc984fb9d191984b5141a9dc7ed1c9657742c63e7958c7652bd896bc6c9f985", + "0x2ce2f74343ae9e37153b5c071c4ba13adcf67676ed7789379c364107d76e32cf", + "0x0bb95a7856e5f61bbe47d56aae9d7f42b994fc4640b50ae80200ed8a678dfd51", + "0x2ab80f2546564ff01e812a39341ae227b69ccc1b38c7f28e61c31925cf622811", + "0x1b24ab582f306305400947e9e7e43a49de6cfd62819517a8ddd904972bd8eee7", + "0x852b65355f93035fdf4358ffc3566d57dd97c9d59a1e545706bc6a13690025a6", + "0x6a44f88a6097b5e3c822abcf1823c98362b26b0bf3753b6fafaafabe9591a07a", + "0x4e7c0a92561e904eed52f2a2b906293411b97795bb194d9c92e335cf9e4ab200", + "0x6ac01d96e58002f8881cea4e177ec7606c69e21d252d863787e5cca65a839792", + "0x4d95bfeb96b7a7978c890842544e8e780f531512c182cf22a73a71b55f1679db", + "0x84de4313a7d87fd748e9872db1164ad3ff9d48993ba429b74dad497dcda5a3b1", + "0xb5ba8e71bc844413cc3eee7325a949af1e0ea81405a3371512fddbef87e4e9f8", + "0x2378cad3d3f0558c0df47cd179791604af7df805f805f7d1ec67b52b2c330d6a", + "0x260d00d98b976fe3aaed233aa9e1b8fddec1092595c91336a5b884fc07e51a30", + "0x7e3e9859270e3a7bb7c5f6d7170e98a8a0a681216e21567c303fbc9e755a4739", + "0xf9aa5450b6036bc61ea2113fb163997ede1bb212f343ae5df0b55561ff32797b", + "0x465cbec75cc303fed26bed3e2701372f9bfefabfcd54096a9189d73994e7aa17", + "0xa86195c2696fa647cd5971d47587212d48957f3faf69721683c158a1372eccfb", + "0xdd104c0ccaebf94bc3c0a6abae1852a71f9b1eee974d5e622f5386ffe0949b7e", + "0x005f5108714efe19e512aa83608e9cac46976b0afcc7a010bfd682965af39d43", + "0x60289c653af2f12a58b10c0f81ed6072b3112eb270b350facd79d0363be2bc8f", + "0x8e22bcefff3aea2767ad9b118be1253d1aedf1e1da502a4855f6ae7eee54c335", + "0x3ec7f166314a0c594eb8138b75a050082884556f7664702333c096bc93b67820", + "0x605398473b453589bc31312579ef3b5ce0b74e3ccb95b680f8beb30d2fba34f6", + "0x51dfca1880e15660901b5f755530c3fa4d652050c134a769b6ab2e1645755cc5", + "0xb24e9463fccdeb2178e520fec46eaa8f2d1da5380d48815a2fe1816f71b79b8d", + "0x97bd624937de7bb8915d7e396c31cdb4afb739bfd4eb6d96f8773ddd0e4f4933", + "0xbe17101284e09bcaa9eb5cd150983b05248b620465244b603b598bbaf9bf312d", + "0xd3c2ce415ee6bc3908cdfada4fcc76b5e0e9fa4f1c6ab43a3710b2ce81f150b8", + "0x8d4918cfe78489e146c071c149a7271ea81dee2ab0615394ecc35827193e737d", + "0x6a7e51675ea6214d36acc7fb193911d2608e41a2df747e328afc6f5a465261c0", + "0xf012c5f418c7e265bce72f9f4e2900084216c9187900927d9aafc899616ea9e6", + "0x934c51d4f2051bb7aa555b3f44bef81ff782b690e29f7cc0a9411ad03ac74a3e", + "0x9ebbecb11efe195d2ef7681c8f1f8af3b501f7c65a0f9ea916f7ffc9a6bafd74", + "0xe28247949b99de84e721641d5e3b638dde927478df0ed0f53b8970b4febbfeaa", + "0x6491ca6bae8781055660837b72622f19daecc7407aa58d24088b45f5725691f2", + "0x3a56f6fdf34d6a4d742451c1f5b6e575685f9a6703541315df1cb8aafe531f7e", + "0xc204b9d22b7cbdcc9132539ea475792f4ea231cb246747c485632be8df4ff5c2", + "0x6188cd2938f72d2dd5e16525574f240b458316d42daafed892faee9189caeba7", + "0xa272f3ccaa93e016333dbc904183db6309e31d06720da1d18addb7560b9bb427", + "0xdce0b5f11909a90c1c6b8fd2bdb3113a035e7784103e05ffc972364530ac36ed", + "0x6bcf3461ce1447e80bd3da2d91dc4530bb649b98333304fe3e0045743c0b96ff", + "0x523496ab97b10356b5bfa8e17b4927b8f0f507368391e24250f218cc00be4bda", + "0x6dfa5889c65ed8413d6633bffc9c3e648621d38eb70e57ada781b3f4dd62374c", + "0xaf1a300f73429dec7f12d0ebe9706cd113e15e1dee6cab37ff11503a836cb3ff", + "0xbb8aa95b40671760e1d131cb269c2d156f29d89911604db04ee7f87511283b56", + "0x93ca5bec69be4ef613260e2dc850668d5a1c839e511322d95ec25203d74673ff", + "0xd7cd3a14db02b6c705bb6cdb03140b50b6b989ab82d733df84f990a9c4d6b292", + "0x9136b9484831f1417ecc2d5ec93fe31b25e79b35513cf5187e50e3b95f862269", + "0x1519b8a6581123491bd0df07cfa3a40b0d098e5cc6ea981368fd073f7c927ff5", + "0x08ad5c68577e9e09e5b00035c65835b404437b792ff327950d07ef227aed6a84", + "0x4e989dc2f09df3e9fef7e50e7b7a9da85c091c11796665602a0f8294dcfcb2d6", + "0xe4a311a951e3743c0d3d05db87cc5d62ab0ebbe6b2e85e035c6452b0803c4be5", + "0x4a64e0fd19dd4b2dd7be3810f870cfca0cb4303d44204ae329f3ef1cd0a78420", + "0xd13981c9f5bfc2efe70eba25bb4f3d3f7bf13d454527df015e951bd79c649c50", + "0x57af6009a040d74b628416de645cb13a58e16fbd63035c6a6d8c8a0bed102ccf", + "0xfbb76c69f42039da5d672776f9e67fe1fd3d7eb0d7f5353852fa64558a91cf88", + "0x07808058eb2b620907baae2b053ef2c5786deb73df750a1b715bb1e0dbc0e14c", + "0x24f1e75fb9fd88b2628285f3e49233ea6f59b474ca05f5823810a8b49ae4cde8", + "0x5cc1e13c706a5c18aa40d8e5db49bcc87c38a07655a814b2179a35b1a8ca79bd", + "0x8ce52067eb546774ae3796de7cbb58f33395438a7976eef1f191cca9c6f59f76", + "0x094311f783939ded904c263a92d5db558e60352a392d3ba77045ff82114978e0", + "0x399ecdbb06d1421fd3651cd625376cea22cce333c6dc200b9e572a001b794a3d", + "0x6a94f126de560108bdb47dcfa8eaa5e9895b3bb9bdf7e7e3078fb725a1ca18a3", + "0xc0c7a71a8e3547cb067a73a984cdf283f6480524578ff611902eb9ef947c4c80", + "0x8593b4417b4d497d0f1d68c21b5f27433be956b6e8f94d0e6efe983492647fa6", + "0x616dacbbf17052280e093ece29a151df4c78027d652ff2ec3887a48daa916d31", + "0xbf17d700c78628de624a49125b764c1240f3d59b85fe376a64cc02f44fd3f46b", + "0x89f0b2b0b4b0eff45499231c9c5fdb53e95f72c589e7ed04c734b4d07df32a69", + "0xd4399b262ddaeec84cb56417cb84d2065664d79a51750ee566217487f420d8d5", + "0x89874f2ef4e0b53e96afe703f4f9e5d5c7da81a621acf00df29f821098142898", + "0x84a9a966381053a4e933c1ebae4fec74d3452ae5feb2b1c90ed59c92fa0f5250", + "0x748adbe8f803c86ef6f20ef7f178123f46d6c45dcfa332827918f4cfa9417663", + "0x0c78bcfbe149b1b2de2253d443011aefb4e5ea0c7a48e2e13156cd5276437557", + "0xa8d86c719b15c328e5117fcc0f4b381df4b8bab346d522df49aae19820ee128a", + "0x3bce6f3055593daacc3ae11b67d5dcc20475e8eaa91eb3153f83bfca6f2e7c8c", + "0x8af84754ff63a68b7b8ba3948e255fc172c53610aa90fc2f5f633bd8ce1ef7c5", + "0xcacfe2b9181c60d0c3d7b48403b18ee184e7c7032f81eebded3f19078c01d7d7", + "0xde4bc2b17855522804fdd6352f36eec477baafd69823908506b949c017aaf4ee", + "0xcbc7689bc06c9f4f04414835a89650a845884a2d102b6900f3abd4d4c8f8dc3b", + "0xb9779ac13bc739d5bc40bdb927c3543310ff114a83bbe35192c250a5f772d441", + "0x1239fa2d0cbb2255d32b82177a976ed5c9f70f0661a5d5267c60f456b9a7f44c", + "0x3e81ff86adae141c75c8b1a91d47db7c6b196ab00cc883fb2fba7655fdd6dca3", + "0x551e92e6d774825a2a48555268c86ee52e1b613e63c8a6e14275ae877dfa80f9", + "0x27a7d2faa486508c7fa20b818d6aa130a914da688d5bc8c60a3547c241937aa0", + "0xd10995979320d9d9d64051e4f721644579b4984a4337de86901b03fc2c042e21", + "0x6f9308ec6c4eb211b8c2323b68c4670db6a8116ac4a370801ddab1da0066df58", + "0x17d3526dec54f66815d8e4358028b0aa91d3a134d843d2945a47dd5aa56ba788", + "0x3a673e5904cc61906f6806b634ae6375de45f4f0d63713555d13a1e274e1bbf8", + "0x39dc807657774ec32abcf299b9c7f03371bfb51a864d11800199ccc7eaafbb4b", + "0xe2bcb8da657b830794b6d9f1e7471663e31996c1bb08456f4d8802448deb8565", + "0x38c7998e73b21038659140e5ae8539cd8cf993686c90148b38d6308a3e3b92cf", + "0x4b6d2986964aac5d5101ded91aaa4ff78a319dc04ab18e550589ef09b638495c", + "0xd8c4da66b5525427cafd152c365f99a255ce2e78af3e3f3dc408de0dd16fee99", + "0x444dbcafda5c0c74092577141df9fc8fb1822ef3375ef0d43eb876fe29c262f3", + "0xc030bec71e90264bacb7c09f9de3a5e282684f9f1d45a2b177c8f19f9c7180d4", + "0xd529e4c2687c7b40d1bda81201770838320b1183da1e18c59c83cc4772296921", + "0xa1ca4f57cfc4ec4522a42cda37df9aa74406d8aa8dc4b56aa62fc78c70d02379", + "0xdd30dc03a60b0fc21dc4b75629124e8190daff2e3504222fd6fb772531bdda85", + "0x2d9d4a9b9b2a27cf863a292a7fd112c81b0deae05457073fa0d5bf7e0dd755d4", + "0x19815e0f25090a9494cf5bea69edb70e7a56e6bf56bd19ddb1856198f54399e0", + "0xa7fa776c8227838d27496a3c659f3da3f5acce22da70701dfd62953edfa2bb09", + "0xe55efa9386b2e0fbd38af545106f197868361f2dc44051cb4a1ad540396283a8", + "0xc6c313738c3c75d434da4083962f8e8355bb8832e17c7104d037b131682b28d3", + "0x756a6309e8c0a374b99b2b2534a851496bc74db36e5bf1c950c0549914f0d0a4", + "0x36f64ed32258a3d2dc849f4abe98db30d8b04df28420c56215e29190e8a447bd", + "0x5273c4accf93338826feb5bd75117a7a0ab5a01225972532ff4ac1d29b289d8c", + "0x6146cf6b830f0222a8bf9353ea26deb973a85c5c4a005136061ab0fb48fe56a8", + "0x97b07c22662079a3a448b373fcb73320fed4a0877125228b4e9a5b74c0bbf703", + "0x68d28adf72884756b688377fac36d371325a01c65f5b70fcd7ac16a2dcd21444", + "0x2c27150b4cd8aea85723c4d264b8799c2e92bd4430719da6bdd3a0290c024a21", + "0x6b553b884acac18804cd52c7139e4a245f2d263b6d014fb6c28e31d7ea08e63b", + "0x64bc2ff8936395f794702b110041a88c1acc9cba50e12c2c5c9730976e667ae9", + "0xc45b2a7e308777811b6c099ffa3287970e003001dfbfe448a2600edf995513b8", + "0xa89c093a0b77cf4ad1ad7ffee799872a66ee38c3989ad39fb90069ab70b1fb4c", + "0xe8d0823460eba540c0c86016014127c7b77b0afdd199fc7bf8145a556a7c523e", + "0xcb2ce7a29b4c67956c439195a84b53f5c54e273c20b6cada43aa68ca7b1b59d1", + "0xcee4cb506d3b0cd84b763f405cd68e2bdf9ec1741778a004eaac9910d17cb67f", + "0x357376e9a49b6c7dab7c5cc95d4a90cc27516f1b7f56c33c4c0125516153819e", + "0x77090e31db86c2f2b031cec1a6dbfa3c3b2f464db7e8444b5def6468c03f5308", + "0xf2b0dee21d7b016c0c9e1a02a970835f934f66c552d653c9d5fcfd20aaf397f6", + "0xfd662e1a27c14d5e8b1e9bf6fca699a3ed7c5bb883cc626d54f53a721c570557", + "0x86194d492a5adc474f114f9cb7b0f6f6795d7680614b29bdbf25e969513a3276", + "0x2bf3ae6993adb5d85fe62bce02a836beb598779ddd37cc2db1f44b1cbea616ab", + "0x4321e3a94d12161ebdbc1b5c0f9223a7f1dc9050792589ce95771c7951b2f176", + "0x79154a76904f2a3c59e7151fff7cd448a3f74c003b866b9faba330481c6895c5", + "0x9c9e7e1d3753804e3644da89248505116009585c6e6d42071cbc532de20749b9", + "0x4dc1441b23210778e4df8417be9f654619527b5b42247bd7a8490a4a5f50dc49", + "0x79fd11e85b307098e827168a157ef45b0af5f4bc073a2920f42c6ff332392a58", + "0x446e8650a156bbb1b96d22e0d09619f90b8baeed34f8b63ba7bf3da3b764e219", + "0xa86cdf11cf5586d8b0449085e7c153a0dd55aaaf930960f3f31f80d099011d70", + "0x4d30e55035eec495badfd3cb8a2174295b2d2cfbee4e669e61bc148d09ff2342", + "0x2f8f3bc3c59975caf160d4a5581cab3499b84a524cb7977e4977de10a74ab875", + "0xe08b4473276f706c7399f584797cf07d33a91c91272ad79e0a5004c00a0d3cbc", + "0x1e27eb957ea54f1806115824c61d78e265cb75807f68d508da5ace6c7dbcd9f2", + "0x8304bbb4592daf4cc754c67dd78a2e2008b1abd8d966521a2291d170c9551e9b", + "0x8298d1605af17c8f47afe0b34b84bba22441a064a3d5311a2ea7e45f76565c8f", + "0xdc8014aead4dcb61449918deef31c64ad8555939347bf04f543d6a1158eb1771", + "0xca91e9581535b11cef0ebcd2e68dc00c3a18844fb4d6f05acf26eb3cd15f1047", + "0x2b26282d94df586bc7d4bc0cfab8ffe1844800c7045621527b9f9f0d5004949c", + "0x9a92f43c5a697a097e39ad12fcd9279b8fb3c3076ea1d910ff871c5ab3342a47", + "0xe33707e3e852b3b6a5cd375d981810399de6a3f96015bff7a4e5065f9c8713db", + "0x132ddae1f0244abf072e6d8115470ad4afb24748169891be0a4b952271599333", + "0x2c1236a98f16a294a9de1c24ea59739fcd6b5932b3f2535c8d131bb2f92c1dd5", + "0x989b0a915bb07ef5e3673a99ee796639722b9e4cf5086433cf8072fa3264f4e0", + "0xbd871c039e619de1514cb6f9223299c44d0555b5eb88570f79fd0d593953c197", + "0x7fcb1ab57bca2410a274f6339927bc12ea6843c106816fe10fc9576b6c7f7cea", + "0x5692b49ef3c3ffab97ab9ab1bcc10017e6d0527e1fab5b257210633dc4d2658c", + "0xe105a92cb6817fe6fdd585068363e0ffd45686fb6dc3658504c70e2057b165c5", + "0x97e65f3bb842f242f51e9ce978320a90720858dc9c535c1d66bd1c269dda0286", + "0xe5ba47b574c389d060e0c5f99f69829d7b6dd8b3bf6e64c315c28521a329c392", + "0xe971dd283f7ed3ca0e28a73d614c490a959c36f44bc30dc7fd79bda064f23aa0", + "0x0c786961cb4df57adc1011891b90813943a13a06032dcb2b7f9ac38dc8b3458a", + "0x3736f1ec97fdfecd7c2e6139fc7ef236586bd9507f65a99913a23bafdd5f069d", + "0x5c6cefd0c6c9c825668f99d1d595f6fa55a45e6a43e23323e901900e02a32f40", + "0x00373765ace6950b4728871a0165aeff55ea61fa8ee07d51d7b8bb8114c20380", + "0x49abb5d78311bf743008c2401f074e4b190d9b29c59cf6328831decd83068172", + "0x0bc28d7480d5a56588b937a530d026a94becf9ced1fe71c6dd1ae0d2922bde50", + "0x45e4ffdd3b6d480ee76f0ee7f6acd7c039ef564d77e5a91546e8269d5468ff99", + "0x09600f167ac2e81cb9164e048908a5b410cef5b48f92eb9a801cf84104430172", + "0x00ddfefc3d36282e9aa8e163d54df86f10737416d9dcf33e786d1713ab54052f", + "0x5b9e3159e4394f03d05ed8b8127ceed638ebe147beda7b7097b6dfbd8342df53", + "0x85d2ae2bfa381b7f5c1b0305f8e252f703d295edbd7c05908e6ae564d05443fb", + "0x5d93339013a78b3344b994bb474fd714bf5495dbcee84346a30219b214f1ed27", + "0x509921ed07765eff19b5c5b7885c4eeb30a8329417d1d819f3428e278364a192", + "0xe004d5f07b3986916f8cca4ba84f9357d4550c26d408f79fb49dee47c5afc100", + "0xcd0f7446313d80026c33427aad00e4689ef0c9966dc5faff93dd1ad258a032be", + "0x0bf64f9c84ef26104cc0d0bc61594bdc0d22f9bf25b436170df1c47351fc8746", + "0xb2e605741fe4b42abeea0ad054727950485ac432754ac2f98db695988c515d1b", + "0x9b6ef4b72c4c5b8159c308fe0395c8f74119bfc495a64e0529209967a1efab7b", + "0xf682c4da2d193bdc8e23cbd2a35d2d2eefff9281bb053f86c84841a3c88e4517", + "0x19cda96cd533527a9a93fe8c38184778cc79ee8ce389c181e67d79971c82fa6e", + "0xddcf6596740ea21e3c5135e32166e5e7944ab1a37ca60c57d9d005f83015865d", + "0x4932d76141f9f33ea5193e58e1767f67b5017ffc277c41fb8b9cb020304b923e", + "0xcab96730ff161fdecb5c0118b34b2a8c6ca2e53cc38ef76b8702284fd64d862f", + "0xe042dd86029d97b89ed789847c9651d49b2790d68b475f194c63c89974704b95", + "0x548200b226d36c3092fb9d721b74b829564bae7f39a63c2be0a78ecac5c69694", + "0x26a162476b85f3f6e366b3b767eb39227ce358a4c78dcbe6c8e3710c6ae05c1d", + "0x6f388c498dcc8b1e986c17332c8df84af7e8af9fca5c5a59600dda14f74e125f", + "0xa342f25dc1194e225f4c8b4d89b8992bf59517cffee52a1f2c2a0cc4727f909e", + "0x5e0d21aaffd603c4f5d73e5eae97e14988b03e45beb15bc44776e2db9ce20fb4", + "0xebbbed03150c85b1a7c7e7e6a6a67fe0483fc7176bdfe4f94bdb094ffce5bb2b", + "0x40e530eaa7fc24685d8cd9cd94a3f4b01aff4cbea49aafd448cd1f7ab4b0c186", + "0xecb1cc861f12d2be9b1f39bf56363937e6bdd5eee6d7e5e90426e7d29bd75e65", + "0xc0bc404c877856648f5793792aba95c9fcf2768eac65028e0a930c57ff9d158d", + "0x3e50fea97445730cf5c3fe8f05c1d03c2298fcd52a7d9be911d1c989f29fe204", + "0xb512ff3c024347545bc2843bc84f6006c0b1a91f49a7549558ac5d8d331c1fce", + "0xc0fd2941f49fe9ec9ca375d0745803539dd3a9750f1bc46380cad3ce29c76264", + "0x7f37105755852886e86d113ada4b4f1f68ebf0aa36dfa36291584dfe28e773eb", + "0xf0942db3af7cd949ae31d1f690f832c6e4f8a3b9744ef9bbf8e7a90b04a0ebff", + "0x6a9cee1f0f3ae40d63dab9547ea6bf342efb99176fd30d0ed2d8de02f1be6c31", + "0x2c2092ec0adfe352c46ade57b3c115783b7d4a92fb63bd1effef32e162d4b34a", + "0x4aae695ff67508f2d03f8674282d58e4f1038cd0d4c2a6a841ce425433e305a5", + "0x543665bfaeb5c10c0dd4d180475c9aa18a9edc313e52405f1c5fdc151538744f", + "0x7473934014d90b821ca0076d132c716728c19927f5680482b69163e8ca5d79a1", + "0xf3f4efa6bc4e493b5e09f32cab59a9cfc28b5a180a59640270a79927058a4f43", + "0xbfea0aeb82cd88ffa0269c56eedfebe83759a4af9345ebcd2156ec234d99633a", + "0x827eef18a3c2e24021dacda3c00187b8cc87e071ed1e2e9246be0066135fc284", + "0xd567403ba1bcccad81978857599647c0a7008cd3ab1a3bbbffec1217da92b060", + "0x74c8805b9b589e9493ee02bc73131431256d18b79de4fc3820ae5220bb5498b3", + "0x32afddf7ebc9d7efe51e045446a61fef4b156a3379212517b0971a91252e1b2c", + "0x4d050a932e5f971f33353a23c5b3382d163319321f55368598bcc3cd8c67f91b", + "0x9c01431659ec8c4db0cffc566ed9da3d04d5db610c6d6fbae260ce3011fb68fd", + "0x0814da2cbf76f83196ccd5342638df799d881eab6a526eab325c06d75b7f8e01", + "0xe669b4a2569397b901dad843884668d52ce85919ac6703671963d55c0923df5f", + "0x44762f71591afce826580a50fb4af763d7ceddc75d6e74d4f40deb3ec4c6ad13", + "0xd3231536bc6b897a24e7925909da660e7bc2c5154e529be0dc590770b5573023", + "0x8934b9858529b0bfa879142e0242f1dbe68143ac2ab347517be826e2cd8ab087", + "0xe833f8513f4e71ec56adc114106d5a8ae19b1aaf95d91a5ce18398f316253102", + "0x0a5d3578d418e0eacc2be66f8eb365a7cff71e6b287459e25a921befc7c55e79", + "0xc11db91e90bca5f39221330704193e670815920a5319eb06676b5d74e1d7d776", + "0x04f1e0808c62821a8f088ca0172820f469d327dd336db66d9595932826fb73dc", + "0x1861241e353c68afcba164f24f650eb3892f219d984e376336f401902b4038fa", + "0x142c7d1eb631e40562c24d2a271f0fa21be1ae76d6c7d98491599dc0d0580d27", + "0x203231cb071fccadc815f222900beca55777075f7d42563529682e6449138a17", + "0x304bcbcc7b6dfee9437b8f6b255accfd789ed115461b41e933140730a46675e7", + "0xc9f2359de838acb06278d7967f2ffdfd3bda5f46300b21939a760914a7e00568", + "0x1b470dceebbda583263a9373a4ddde80e2523b3837ed3c20b111e6fb9aa99a60", + "0x765ebffc2d48b2fe92c3fb14b301cb2338984f7760d514373b01fb34de466b33", + "0xbe814242513e1ef6903600ffd517b8f678cf306e057e01f3971eac7514b72ba1", + "0xf313f2b3c05a1dac53de10ddcbc4cc38b38be85f89640aafa4502631c0e3511e", + "0xdfb72e306c68cf4b22f62e9bca906ef3ac627b2286d2a261489e2c922d700dae", + "0x0783bc2129066d953ef7aca86ecf53ec3ff2bfcf8920f6079ad0a4dd703fe331", + "0x71f1fbfc2a9a232e2674e3e36547ee874806ab37b22728d8c30ecdb7ed2ad539", + "0xbb098368fb1529222eb83277af668535a1173a78825c7e3ef86f4f45429cb838", + "0xc49eea0b1171263bd8df058e6279092d59d1e8a4f108d1b4004333733bc6e7a3", + "0x6f95c83060775d579005c4731e05eda62753bcd0f95295b395b1de22b21f3b0a", + "0x9869e93ab6e4ea9da4cd12c279580e211b4c870a7e7dca098058897795804e76", + "0x816a76e3c912b639ae1e4b5eecadbb8cc173c3aadd796815a9ccdbf9226d58ee", + "0x29f33d9d30c64af6b372e922414c85004655782d024916909834b95643fd6096", + "0x30a9763617e8337203196a11f3e4b81b82d9642f0cf26b2c654c8504d289a17d", + "0x21eb2108b1ad465397ed3aa8016c09a52000c60aaaf42e13d95c271cf394c074", + "0x59d8b8fe9dd951d5ec540bf46808f01c9ec2a5e9dd0247b34b2622c48bfa498d", + "0x71b8061902f451c6fbd95c29ff960353afaea2b0410ee11cb993ce0ccb8af446", + "0xe69938e7da23b9d7ca611326dacaff95009cb5898abf1858593060ccb5aff4f9", + "0x0aacb29673ba3a0dce850ac772455c2b092b1a0fe61ed34965e4cdf723d659d1", + "0x18bf2fb69dc62ea39c195a702b8e9514be4b9d5eba18af13974a63f74febccc6", + "0x560b7fa0d15ec6bc0add83b6125133b97672b39477092cddcd5e2936f49c51d6", + "0xc8b0d3b55acae88939bc9426181dcc7d965bb5f85cc506d26f966c60a66e4ac6", + "0xaa9c3dea2f0184de1774c47923fb7f6ead25bcdea96c70b30127ad61a6bf67ca", + "0xfa90b6e07511736519ec741ca85d23d2912b509ec608a5d319c2369aa358a82e", + "0x0ab8709a1c9ac4e9e516736b4836febf938a0055d5b4cde960ba651e986f2caf", + "0x03e28cb08abb6912d3a25cb45868d699b89bdbc180eba67590b2cf13718c967d", + "0x1617f5fb8c39fac172251ac4bb1a9b8e20f9c36cc6a47e7e0545ee38fa55a6f6", + "0xf8cbfbad5d5e66d95dbd5e83b2968d08b6eb41d28efed0f1d9205b2297168dbb", + "0x4adf7de19d0498164921d4aa39bb070c6183e8511c9f987bc91d89cb54d8affd", + "0x7b5b34085f3267297b40770c0f27095735fa286ade7521e81f500005ab63d253", + "0xc2943d2b12e44ff193ad957440620e43fd9e8da22d74bd7e4b18846eb93fe67e", + "0xa461d24d7d4cc4fdb8016476b3d5e44017bc27609b7fd09136c3a884915c9761", + "0xdcbd32d171d8cd8702ec3093dc2f149c31542a7a35a01fa63043facfbf7ddea4", + "0xe7c4e881bd4df86737497ae6e3fd65fe9d953b8e1c45ef1cbba2d291be860dec", + "0x1fc56bf433f10fe704662c0f9e69a878f243d8832fe723852215f4d2ce51f9d5", + "0x5d22da26a003567829f9e2fcf0c2be4d0f791d44400936ff1132a0dc367c316e", + "0x985c40c0bda98d02e3bbf9e33d13be1ab4b1b917c94e06255a0d60de8a547513", + "0x5aacaa6e4aa6ec649fa272c1ae2cd0376270a0252c39d1bfdd973f03cacecef0", + "0xf2992b858c902441bd44cfe0e2b3057615b7ef6a7d129bf8402e4270b711b126", + "0x690eccebda6832cdab7adc9a56b5d8ad7842aba0d7dfa0aa073347d835e72703", + "0x41f48f7975d1aff8070e4d787b3bc127613fe74cc0207e6355d80c930577348a", + "0x42286416ff16e06c1b8088e484e1687ccb93c134a880e06ebc621cfd1fecfbd4", + "0x241f3e48bbd35c8743856e8020a2def871ffef7ba897c72464286419a8e67e28", + "0x3ba5d479584f036f4b4f99942a5bc2f51cc9c4af24527dc9ced5c66178fbec00", + "0xecef4c63d3679889106352d9e56b56b7aff5e1f1408e3dbe86e35dfe6ea6c97b", + "0x2a55f99801b5437fa85f91046e933d5cb898ee3150c6a068f658e0091a303576", + "0x0103857974871ee986d9d5d430b5c3533c0b1187353300d25dbecc2aef14cfac", + "0xe2721431cf8bcc77d5652b519e879d0cde2524972d74b6ce3e6a78eb0bdc5c80", + "0xb577b9c2b3348feb5bd8e283940c524d940268a3f90c11e35dc9de3438ff038f", + "0x5bf29a628a6ae340206e02f33eab362240f99ce0e3cd8d440d002ed4495252f4", + "0x5b087ac28a0e6555830f6510fd275bf464ee4d50e6848b251dac4b823de6b995", + "0xd6ca4c3a14090c0204fe4b9ac487debafbf0f984c289cded1de950f2e655abd5", + "0x61e776419693248d8a6b8bb2ef9b9663882b57e60650ea7fa22f1251e201befd", + "0x84d0ee42adb4c9b0e127535cf76a00a0d8129396f861d5d41dea599dbbff3d0b", + "0x509683f63b390fdfcbb699a8a30340abfb5425b257e86015170d7b7296b33548", + "0xe18de77507e00ff5a9097ae81007e793ca9abf2c11f65172c1cb54a189032d3c", + "0x38a8a3c1c0c110f674a7e69039258593e15a9194b1e77ebe6176ef5caf09c6f4", + "0x7e55232c46a25bc79bf9390c2b105d0fb342015cb526cf0decdb9db23d1be43a", + "0xb745498c642fb70abdc71c707bb1e4baabd534c5bc503e35545a6395cdb48918", + "0xa4b968ff3f3760b1fa4b352ca6eb8cc883f4c902f8e7baa2644d5a7726694031", + "0xee106b785aa0d24e57532819d4cb34b5795ab0af3080b38c73168ad565103b2c", + "0x1535e68531fad8e1edcfc2621747620ab962ad38a033ba25d1d6f5947381d03d", + "0x98c83d74aa9e52a7eae636a0fb54475173fddddbb56ca42dc314998c5099c649", + "0xdae0dbf33fc395f96a4dc1a8da5af3285b8dbabe5b34639e47c70b0938a9f64d", + "0x91348b33bec70e0e68756023f1432346ca2aebbb6a43df28b7388f6f9f19bc7e", + "0x575859a6c8463bacb07ff4902b06fe1c31ceb9552bd781003d4ea2e15dc81e4c", + "0xef1a187b7033a67ff5dc0cdfe353f81d8286c533669ed4b0c0ed5168f018cb19", + "0xc671086723929e889340d42392545c10126be24c357d509ff1c6c1a5f9a57d4d", + "0xf4f1fdaf74870f153ea8375391b3c446bc3cb9b428a3426164320c720d755daf", + "0x32caf4a46065b4094869812b25138ebed9b9fe17e27bed2f1e1f18485e29a5e4", + "0xb62d0e1a873015ebd2696616378f4f3f39c5e9396ddeb750110b7ef04f189222", + "0x410c675d1f6583e8364939108dc46223cd9835623473ca18dc333a4b86e69390", + "0xffd66aabe2768327036556eee6fde0c9bcfda2b13280decc37d82798075a0b75", + "0x3acda6ba4917e64e977f4135e8c74e9091499c212e6345c58c399b4dd31d6fd3", + "0xacccfad59b3f59f16431348a3078c1dc0b662876754c1f373351d0725dc1df84", + "0x3a74d9e98aff2b6445b9776cdc21c0dafba808326d917f47d57250f150891bc2", + "0xdd4e0bb3b84db7b6e16783870f7c9bc563cb1576834eb9175721eb9cf75f748d", + "0x35e9a92581c9d402a83a7baa67bb72fcd0d9b3f3d7b1b7a143234fdadd2e67d6", + "0x64ead38ff01f1fb408829012a033eb847aa6ce3e9b99dc5e866338aa9c355b4f", + "0x78607406421e95ff55b3b952d2b4846c8b2224b2a6b46d231482ccec5de407e0", + "0x04fb332ad235e8ec13b07cf30b1c1cb6ba8aba4031f932868fc1da5d82c03dfe", + "0x4fcbf75d2beff58cf1645f74c2ea804c29e1abb6ed8d33eb6da0f2f7939b3cc7", + "0xf58b87be3dde47b6a9615315d2eeda6771fa3b31bdc369ea706f7769bd857af8", + "0x7aa5b0a30ab24a79a54080b1b56befc3c88719219ca5cb004cd45d4ca1334dc4", + "0xd2f1129f7a6a0743995aea48e9c3cfdc5efde47398e6a67a634c1c9865b15366", + "0xca65cece85c379cfdd49b9ffc5ed7e9b8a623e06f99bbec608fc3725e4a1429e", + "0x2e6942d93dc94555d948f3358d7ffef3774889455de4da3565ff883a96a590ea", + "0x063dc2dab7f0c558eda8bf9baf3901e1626416f517352760180557bd45014f06", + "0xc633fc9bad22bf62c85d4ce1c064f3ec161014456c4eff5ee9ee197230aea32e", + "0xabab885f2c04a640062289106e7bef857389db6db0a499468b45f5e8147c5f14", + "0x96eb606a5d165dc66e5c293fa139a9e8e28fb1ddc8515279705afe7a57e318e9", + "0xacb239d8e12502e378326dad3b338700d359095129411ace179e5b921c07e731", + "0x8cf7148ce70d71a754bc04049ae797e930a9b16bf4962dd3eea2f13ac6f75776", + "0xf39d2ae39131332c16508e09eb9d507f4c6bdaa284d1f4a9315af8f6122186d0", + "0xcce4df2d5f9484177965c2440bc54d1fbd0429060e82bb76c3b90f444b5246c6", + "0xbe77cc749e5f436a3b76360998ba7e6e263d39fcf792a6dcd7cc4ea18c836990", + "0xcde5a6e02589515ebcc307e20dcbf163ec85e5692ad9542bab23b43de55c487a", + "0xe7977eaf5cd7cb8c7f4e86a2c3813d52943a12baecc76f2b9d1eeda569c29d85", + "0x1011e0ba87c36df65ecf37d2360f98e0d7351f27ed9199fd7df166806332c139", + "0x9e481944f0e07b91eefc66693b69ea71c852552cf8cdafb1bc93336b971d6989", + "0x2b4d369db84d19be84a7af630b0c8a4ce0974418f407463cad8a8223b208a82b", + "0x7cf34185f5e8229b657c57c3c775987128434e909d72d06956515440678e6a25", + "0x5956c7ee723b161a0e7d74c69e57c96ad28261e9d7358bf25bbc16560a8292a5", + "0xd9a932e6f59d547de8699965c4e5964e0f663b9fd5bb9f6dedb4417d356f234c", + "0x59f2fae38f9ae4b74ba9abc5f06d4354fb9eef65983b1c8b1b025720d1b47d51", + "0x1c418c58dd888b1a546a1245021b52e83b1bd3fcbdcd0fe9bd643fe05fde502b", + "0x0db806610e23383046de4a35f8098597f1889e4dde4bf40a244e4995324b29d7", + "0xed51baa16beffad522b677c19935f07d7182b0a4bdb04330146bba3d8e8f80c4", + "0x2ecce838cf6ac5d0589fea00bab4dc9c7b107ed7c70886ea6519807785096f23", + "0x8df70aa241b84fd616047258f87b04249fe23219808a6e14f3d9fd0181c2f352", + "0xddb9d88567f42cea65b5913369c9791522b4dc4a23b0afab2003dcba337a5595", + "0x2e276865fbc34e7035cd50dab4b9b72c980abf8f7dec50988b86995ec57ae497", + "0xe82487c950c00a1e4a9ac6d2c3d0b80584b44dc27d28d6352dcef8786da3a7b4", + "0x724b23460aeb403ae7f9b3512a1e222a63fe721a2ffa4e2f4f3062da8bb5c224", + "0xe27ede30590638e194e91a392993fd9a9a1f168e32e3b9144d71d46e507d716c", + "0xd29403c683d5b1ff60839587e60eea5a6054588903e7c2c0b6f9bf030bd0d659", + "0x4e9464c5a51b3f2c6a829137b67e266ea6381c069e1701f0bce7ae7742e9e49a", + "0x0b107abcfda0ec094a6946c6057564f60eea9e6a55b2c762d4af5a7ab7899c65", + "0x5f908c956864addc2b57f01074c567155bee41412da6d63ba72971ff2eb8114e", + "0x9c00e148df00d9fb2d5847bef0726a48507871baf12be51373a7bed2a0c43f70", + "0x63a2fc58db6de3a2de3bac57255503791c4204941fcf15549a7839ca8ce26efb", + "0xefd321eb79658c3706f6f2a18663361b3adda792fe9064de3785acd101535223", + "0xa73176de8f5b3a5bfe87273711cc35a042c191aa998dc5a67498b0287e54be82", + "0xb8e2f03d134651957c31c47fff8cee2998738a603267a12f665f577a450746f1", + "0x3276e6d7618e898d6a8e1f014ccf9e06000f7cbb279dc9d078dee38f93231d3a", + "0xd23b5d1399be075454bc8f3613377113a7b65b29c1bc1a515f9bbfcc30b88174", + "0xa577feae921d39efcafe8102252452202fca0532681c2967c06eb63d00d83294", + "0xbb2231f4d795b6ea3894d802ad5f303c19edd2a25dde9c3a21ed1b578726b51b", + "0x81700c9bee6a014df24ac76eeaa2a378ce7febde11903e62a3d223ef1eec39fb", + "0xa1e05fe31cd3a58a3c11cbe47fed738e0add5039a8f97275572c7f66431f3d6f", + "0x8b5d0ea77b923d4faca65b07c9621467f2c891a925ef07009353b9e7ed854760", + "0x3566b43040f753d8a18edf7b3c89d44a2a3565aa0280ec673718ee81b82df24e", + "0xdf0672dd1e1bdaba83c0abd1d7c41d420ecdcab0019cb89b3dc310bab32bc8b6", + "0x2ef7e245c518654108cbea643f8b050257b9d3c4927493671a3a094b1dd0674e", + "0x993a3c5fe23e9636f525a4e5ee514949c5113f3b4db21ffc993a8b6bc3a55332", + "0xa023919b4e8c34cd2a1c7dd1768eb8e856ad2a1f5b101c8fed88257fdede3804", + "0x247fa5256cd95b9cc4431fe13466483f0db6707bd2453b6374934e1edd034b18", + "0xe63370f2acf5893c39f3728b66907ddc78d9dc9947db14ed6a7b5a6a876c69d6", + "0x397eb84160515d8b2beb3d37d7dfe167fb907f8a1a6cfd7457b646b95a18e9df", + "0xd236e18de82fddf7cb7f6df91a4d08fc98d9aba622e50cda7499261d01d9bb9a", + "0x76a526408c824b6c9e8afc5a0d5e5492a71f30cee5d70b4306c2298d348f0caa", + "0x00525d5481988d4c4836dadc936aff84036d99aa42722057b35ebd933c61ef3c", + "0x94e54fe2e05dd7d7e4026c0048d5e64e5314f235607e568cea8c26bd31dc3f51", + "0xab1e0c92b35d49b687188518a7af63584cfb13a74c3a9ad800fd8e1a4541faa7", + "0x5e65f148c1a914b300aea241f07de5c43709c38d279ed118bcb40ab9a3a09226", + "0x9fc8a8843a0eef62d8c16d49c70cbf2f3fe84cc155cb741d647f17e2a664e7d1", + "0x8257ba8acf906e46b7cd0de0d7463ee96c62ccb7dcdbe0fff5fbb6bc0da28d74", + "0x2a57b487f4281cc28a5b107a643944796ef2416d7989ce879d06bfd6d4caffa9", + "0x0bdf8efb30c449b26d5c574000646ac316aff27fa49d6e20420a08e441ed5f96", + "0x5d3b67c6a6324936305f405067ae70a35146759278f77793e3f7c4b90ac0c7fc", + "0x156f094425a09a09f394075d02f5b5d5aa6794bb5cf62d824ece1c57d58ea993", + "0xe31782172a116b92ac0ea9de1cadb81c1586e05d5b3993f10f8f695469ff9e81", + "0xd8f85113147a72b1950948000d75d6005ae183997c798fbbf2dadc5c439be9aa", + "0x9bed32bbf1f626012985392906016db1c993fd8ef351f8c72e2ae832a2efdd66", + "0x1c6f7b17c8bd64e03d21ca9b6dc2df278cf0b8c8f6f60c60741659fe5b34af81", + "0xe41e4494cdfc0e92f16fe6ec78e19b9d8cc3db73700a1bb02fc7670c92e4df2e", + "0xca1032438230b4faea930fc0689dd966604487a8d3abbaf21554b3e078547fe2", + "0x2bb999d1acc6cc7449dc0cb965c3bdff42e49b8ddb09cde885174c45730bc2b6", + "0x4601be8295359bb23f6f09d7f053c637ab2ce7942b762ac55b1da6d312a765c9", + "0x13fcff0af19f7f11af35b360a0199bfe610a09864dd1d42b0a6570bac17803d1", + "0x31b567fe7d9e6a9a3c15c449e9aa0ab8f83a453beb2784132f25b0919abfb428", + "0xbd4af1360219156ba336fba9cababad31ee78e1393061e3ff62f7ac785c41f19", + "0x2e15f44010ce7a966dfd3fea57c5124c120cb60d80a635910c0b2feec59fa977", + "0x68ed80af93e72f7fd9198d036d8b995e5baeb0f97c6f2734379116a5814b601f", + "0x6aeaf5d0decd1a5c8eef52435bdad2a60cf1cc5f79e23b90b7afc0110d830a3d", + "0x349b95da9a3c65e1d34533bd08f8c95c934c49b7c20e6c7e38ce4db60239c94b", + "0x2a0053d5a61602e26d932534d5e9a753f75642edf1410b3ffd61076d27d5ec97", + "0xca53c9d106169cd3a7a870efd2c2c7118ff953b8aea5c5b9896dc2ff9b2c5d59", + "0xd227181ff80d67f95f4fa11f86b1bb5dfcf37385262d82d6025bdeecc6bf00bd", + "0xefa99cf897198be702eda71b3fecf4cc12a27e7c90a258c4230aa847b03e16a6", + "0x0788c17ea693a049784eec30b17c49e66e7a71175893a064db7bc6e85a0b536e", + "0xcf2bdf91c2f44cae1148ae027688f70ae27ee65b8c1159cbca3e41ab7755e5c0", + "0x32882f2cf31033d40d5069e68c799f3e3297a9915287fb317bcf657e078fe6d3", + "0x3401436cb69ba8552d4731fb2f734a9a659cb10ac666f374318420d3e299b98a", + "0x988943c9b35e50f6ab03dc275de1dc770aa32574cf9a90dd0c13e7263b46c129", + "0xc282d894a7e4346a492fe495319c5cc9abf0c7f95e28bdf985710f692c770520", + "0xd7f8e14bbf8c6061a0927e107f53123f78448b878b9562cb8113b5d93d2d9142", + "0xe2c995419467eb379ee043399d89bb13a7d316b9a680f9667dc9defc7fcab80b", + "0x567357333aa3c5cf6b1ba20a3514ad0e21eef11f5a5c4ec999048abb78c5ab7f", + "0xb9f31c6c771e610048dcb0f4553629481b6d243980e1ca9ec3d1400a56ef452e", + "0x924533f9da72137f96ba97b39a95c2c369dba0bb09658aea3a387f3141b5a34d", + "0x2f17e624e0f3213c2d953107e72aca40b5f764f4b31278c8ee32a000119aa3ed", + "0x8d301cf22181c65bd6db20ca01df6e3bf13864f88958fc04861c295a31b9a86f", + "0x3bdb760c302d348d16e634c07f437f793b888bc15fcae52c371675b7eec2e241", + "0xaa20ff689413c62b1d9854ed1c59b1629e9fcd9f99512bee40933e722e4d143f", + "0xd9d0f8cb5b86492abc172c0460cbd819d13c05f055cc1306af6285459223373b", + "0xe0ec50a77f89631ac2a1c38448a3e5d8ee739f1cbcb542b23116005ff0726679", + "0x90238eec2af4ab1e1445ab94f422f90c862afbfa8cd6bec154d2f6f40721a615", + "0x5c2350ae9bd5f2e2355c97b0340e96621bccd43e9a7e4e867ba1523f5a5178dc", + "0x896a7844bc430b330fc094554ef21c162e2c5c890b4525720a612c9f16bd80ac", + "0xc2aac353dfdf9d7ce52240f6b84e8fec9e66d4acbd77402fe7218f55fb76e834", + "0x840ca0ec7af88f0e26d3b9e54473fdfd038d5395165b22a935e941187d529136", + "0x5e1274869d1d7f072dcf83d631844ea7e750f90a6183262622f2db72eefbebc9", + "0xc217f1324e0ba4e36cbc896c2dd4418ca5bfa880cc64bfa913d6212cbcfe8a95", + "0xbd7893a4798b0838629ecbf21a8cea963df8920a792f5282604b59c536ca91bc", + "0x85b22d6088f30f1b262369f869a72e1354036363f70c8778b1560658abf75902", + "0x829935ff52d7148a3c5548bcfc72b736b184e4f4661b251e660313895432d66d", + "0x4b0d3238882111cc0065b1e2c9a71eeccb34876b4ddbcba989a47faff0f505f0", + "0xa619fdf363c41d69d2cd4c8063e3abedb18066b8cb6ed4fcddd99686d684f450", + "0x2dad790e3f5f6be580f97dd37b22a1e80a6555f41726bff0639aef54f0bc47e8", + "0xfe2064175fd61af4c646ff0745a79ad689d9be2969bcca0939393603865ccaa5", + "0x8a18e5e22dd996798181fdf8ae77cbc7929e5bffa0145996b00d83c5e7829c6f", + "0xa7adb5fc7ccbb132a8e22a861cb5e3e1940a4ec7c5add1bc767ecc668d1a84fc", + "0x7ea8e25d742691f53294dbfdac087b07d688cc40a4a2de28fb398b2516de4bfd", + "0xc162edab705ae176b26b495f7ef7205552319a72d56c5ded30be9770860d6530", + "0x5406de06f5e2e819ec8a7efda23e19cde88bf8ea9969e3e3393f1235c4be67ee", + "0xe5a6b4f946655b32549531601ba3571fbcc45bf58a7b18ea24b5f4677fd58815", + "0x5bf157c76ea5a10ca8240c44a72450537678bc949f57cb9a748b445907180d8f", + "0x4f2f7c966d440ab36a1ebf61ecb1a9b1ea4ea6227c29e4fc1214a8c63cee7d05", + "0x81dc3a0dcd5ae99dc7bcda8b30cfe89aee00094258891d445425e8e304a71f08", + "0x915c3f6e8b37680ccfa5dfa941ad2147fce2f99842646a7835e2d45e50e4d991", + "0xe616568cf1a281f42a32686b65dd712e2fd003a84dccbaec32b890440dd206ba", + "0x70526aaeb8a25dbdf93b3a7cf9cc638292f2502b7bf78125e88df90335e594a8", + "0x6b3e974c6a004beea5b38dea401870dd2a68c2902ea8b3ad5a8358e10f04eaf9", + "0x99b17fa583f9f80f81edae98fc54bd5552ad44aeeb6123e99670696541cd0442", + "0xcb13a1b63fb6f0b511876a699ac017aade97d8dec84249680e7e36b3729d9744", + "0x2bc84717485fb9eedb00647c8da26e201fcf05a0b5c42e2e03072ca130d1e3c5", + "0x7bd8ffc908159c25a28a3dd97064ee7a76bfa40628ac54066f83e904596562e5", + "0xb9d16b733cdefe95eed9fb024d5737f90723bdc46260f0aebe2adf23712ebb05", + "0x0d6a943a7bbad9fdbd107c4a1df726f7aa61de4bcf1e1c50c8a32d56828e8c72", + "0x7a264f356294d00e55ef0dd56e8ba793550c4366347d60c7cd31176d79dc8486", + "0xf52baa383738251b1085fd6aebdd0da48414bb993fd3bc427b2a07a6ace8d39f", + "0xe2958f9d5bc0f1b23b5a3923d87567a58dfa31cbc0a63715b76c501bcd022f65", + "0xa760fb572f3a44ac43c0cfb75becf5bec1d7dab5e33222050b95a6cb8938b146", + "0x004437e7463a43de8edcd074a4c2f03ce72e4716f88f03567a50b6440b69ef2f", + "0xd7268e9610100bddb2188bdb0f80ffbc479b67bda2ecbc5aaf18f947667f3ecb", + "0x176ac5d88148cdfd9049d3eca742750edf975c32e649be8372b15e43ce162d77", + "0x118df9c7631bfd903fb46cfa867c8ef861d9e828e6f57de585f17ad351819e25", + "0xea084c972d69e9ffb61665a27fa4f2d0006f0e220007c0b2e4760a95d68c6c01", + "0xd6e2a8f3df290a204efcadd3a34bf57eea6a3980fbb68749029660e661282f2b", + "0xc538e4c7b704fa8c1c123f8baca05bca5fda28df7ad7fec099638a4a7dd4fd18", + "0x419823e612d6a0055fe460ec9593b4fc0298ea94e0ce838fb302ff1ae033bf40", + "0x304e214664a6703ad14fa493ed333cd12f6db8f4f6af1223bf00a348fa3223e0", + "0x4de744c5af198cf5a0048c4a3c9ba578ea3478deae31531b87eba2a0e65b6fe6", + "0x523694986a7277170342c7a53bb710b86a432b0a7a3d96e141fbbbc113ac2e88", + "0xb81dcd531f4ea6eca82860d7f45063ca7de742a2fb41d7b6c1d62202fc1af17c", + "0x205a95c1d7e7d2cd684bb666dbaebd2533f4af28837a6fd2f6a7d4aa68816dbc", + "0x7c48dd0273a7207ceb5a8a1e3b33352f6d438e2a7b45d4c082dd85135e21e5e3", + "0x0e3edf65e5a7502793a8f139a69f3946d567a959ec411088af96da979047675c", + "0xa0b8886550aad717f1b5d57519a4bd82bdfa30e3c8ba4ff81a64be341d828aee", + "0x399f2cd7012257b4991343f191aa688915b4375899ca9519630b5ec6c62a8b49", + "0x56068dc17a965fad007ec7f23dec7d396dff33b0a60c4e9b8d0f75fb26178f05", + "0xbb62f47822b394fa87d70cce239c9e57464157fe2012c2c37e8f6b69515d6112", + "0xd6a068fdc6d4cd90203209a07363ee1eba047703e50ce9b06dab471e0dd1a037", + "0xe5a62c74d81ad110ea0ec13847fe64e4c3e8e48b1eb053f1e381abc0caff7bad", + "0x8ca95a015ea27a649b0bee134eb170f01b5c03cc45a8bb2c40557c1598c3892a", + "0xb124e101738d541ac61b5666c0fa19375417d946a2344ca40baf308fe8449a98", + "0x1b9543937289ca48720675ffd354464fecacd8b251a3f267f42906b7188f184d", + "0x0b48dd3eec04741e0f78cf61937b2f263446d4ba269e8c7d4aff9c00a2fafced", + "0xf72ffe4699fea49e7e67f96fb5688247746c9bf25fb58e41f02b0dde4a8003f9", + "0x08328b322ac26a02e89401565b91a3dd9abee62fe991744e2ecb2458c6c26460", + "0xe9dc223fdf695c9b5480de56cc91fa640a4b73a8cfeff30ecf4db4d36727fe21", + "0xa83123655348b15b947d83c14a241d8e303242614b25c45044fd1a1ee28d928e", + "0x14ac46b1f556ab33fd4199e5a46e0584d00bbcb2592ebfd4d4f66efffe31bfa3", + "0x71ad4b7b5605aebe1059ee484b5ec791e9018b50f92ad2f8d4f3c1548a99411b", + "0xcdde5fea3fec154058e16f7ef877c70404b577cd74f98f7dc45600cb7b598b04", + "0x330f9d20ddac508dcf0e08a4c1eddb55cb5d7f645c13f50b3683a41bced9e244", + "0x76de024aee0b03e96765dc6d7c71acbf253e962b4f3892b94196487821381ade", + "0x1c37a50f5e3c774d9ea4438a629d497705c3bae728e8e89608ee68d7cd2b53b5", + "0xe16a37be64f82bfe54595c9c51625ce3b69413b70e0b119a04e79c5b8d593c22", + "0x525afdc902879df4c23b996f34a5387fac6e41300e1a7cc9e24c630a1a140653", + "0x845164906086e678bfdafbf4719cf8f80d988bca007aece4b031c3ca5df08db6", + "0xa4d4bca2c51e8118d16a4b8ed33d41a73c275bef73072a6674005b9ee7bbb793", + "0xd0759f637aab37f4981b927e688f3e51f17cf90660931ab8bdfa40363a6931df", + "0xf54986144fa83bc3953c4a1c91eebd6a4abb185ab7b188cf7492a7ca430b9130", + "0xa31de426ecf5f98c1381c844e2fb7c959ad8adac39484d71e3bd07d3b1094118", + "0xf64fb1f4de6f01317e242b1198802191a6cdd39e1580d356b9e5442adb69c8ab", + "0xb97a74c8e47d37b3ce7c12ba09b53811f23dcaf4a8d260dd370f45e9ccbacc3a", + "0xf118ce791474d987b9a8d3290be077e8316a6fa3bfcda3600e6c2698264db37b", + "0x547fe45b0ca517f898e6a5fd22929cf533911f505e15de083a5685c8eb1ccd0b", + "0xd74d307e3b5a166a64056f07eb85f60fda1d9c17368a96afc6f8141141f85c86", + "0xa315936672e2737800c6d51fc22b56d918126ec329fa7e1ba5e31af36ea4f87f", + "0xe928505d97d673588a68a08ba6e2a4bc25843592598988c1d168d5c938e230cd", + "0xa6bbd3b96bd66597eb68c4059203275421a529c61471a69cdc1d2d9211aee400", + "0xa46efc7ab47e7a0f57a54203a039a4339d992207b31bc707eac98ade8e8f6fab", + "0x46e903455140f009d1f7e9d224ede2e29d1fb3f72cebeb60dfa64ff059b7ff40", + "0x1eeba50e5530be85464456af3ea0ee38855276ba79bebfe305e49fdebd0dc97c", + "0x30e149bba2c3c0db9038c39871325392bcb41169106131469b6ea7994c5d8d03", + "0x9503edfe4cfb20c38ba2efef043ad824f2b17f39e2ace445fd9ce73caec93c75", + "0x608f294da5e0df707b97c4949b775f64ef76c055459c26b651010888cb888037", + "0x8eb5960dc8e49951c41505ce34160bbd588bceb74468a7dc0898c6744d75138a", + "0xb020dd8cccb6beff1e7d996a740b876609a55ce2041ec0e9f09f683bfb22466c", + "0x9e8333dc01746341ff7181ae95ddb75748cf3efbbed24f3b16885efd0aa19da3", + "0x2a97bcddd5f0a7245c520bbabd77e48432c39f3cb17a0241be9c62ab5d185a1a", + "0xa81cdce57af311f79ae16dfad6808b40e8ece16115978131dde0f3edb29aabfa", + "0x8f321249562fcb94c94a80679adf69aa701f0719515753932548a89a28cdc7da", + "0xda37eaec19bd44bb1892d12d842a77ab7dc5ea43ca0a1a92aaa3ffed0ba9d90a", + "0xab8c920add1f9e922890da5d92ff199b384a5f042f5eb4e3fbe565f5ca50ffa8", + "0x9f52ff4d39142c046effbe6e552500886200c9c3154dc68abe0f9e4bdfa9078d", + "0x1eebaf84ba1e6667e825716be63ddc71a963688f47227e0d17d78144c820e17d", + "0xd2c2c19eacb26695c89b51b75fd616de5c769d0c7169794057575e1dff3800f8", + "0xc5ad683c4beaeb409a68cbaf81532e4edce6f64b60853725e493ffdd93e69f7d", + "0x768303ceca362b8a3996a4823c4d64ea4a4ca5892e91ab0433f2917b96486806", + "0x88e25c3ba8ac976c0382344f4a8fa310bcfc7f51e09efab4faaf222cf6dc5d67", + "0xe05f9dc2db75ce9b0fb59cf1ce12581cd10910dc5b91d744791f564bbb87e176", + "0xd75fad017be9f908c431987b10f25526a9c9d346118901d7e0b84e74a44724ff", + "0x83cd50c6634e2edf21044fe789e82850667862be407faeaa90f9bc3b0c60f9ed", + "0xdf6b6b1134dbe14a48678610c630ba5927f3d75d45d01e56534204b87ed575e5", + "0x3e486fed8ba04ace837ba81d61086b3443ec22a803cffaca18e10e0e0f1cf679", + "0x6b7c8f5e560ce6b6eb94ff8e4f811b06f2ba91048ebc2440e25f2c44eff4e637", + "0xa7a92f9396380b5ce01e3666acf035dc80a297448e1b95530b9a8bd9eb19496b", + "0x7df4150c891991e89a5938c12bcb4e4ca1a3bb3ed17e1d14930e78a3b7287cd6", + "0x9cff0374f59c5c0a8b6b8db636387e0d032922e34049356ab00ffa3f2cac8f23", + "0x85a5ca8ea29b19babb6aa45861de2cd9e44e31ff13f7161ead44139e6b2de019", + "0xe418e0eba34f07d10ba270bf4316b78b15c49d2a920f3370b403dc584cf2bccf", + "0x8500b89c737ce038eb99a443d4ed6dd02e00ab06c836b8f03de3e713e485e99e", + "0x0f324429900c3bb11cf6a0c4099148af93d8953b748fa8974c7cc5d942f6f36d", + "0xaffe95fb50dab84128becf268413fbf2c8ccbc2fde2b6f6d8bdad23cc4ed9312", + "0xcb93bb3ee92074161da7d6345022f415accea11b20c412cbac48247c64d099ae", + "0xb5044dbe63680e5fb8479f899caf746b778524a6c6ef3f56614d3b9832cf0006", + "0x1d9eb2e2fd6d8c78a5a4125733cbe69ff25b95cba736f63627bfab166f736c18", + "0x4bcdb35310f9e23c6b952933f3adb4adcf6b43dd88dcbf80dc2d9ed4f8cea505", + "0xf934917c926b2c975bb0cf0ee0eec66727da942e06c65ecb1e168c015f957a65", + "0x7375ee9c763fddfbbf6fe47b1db34faded65f5123dd92ff469d03a41f1fc47d4", + "0x6b4e2a1c3ad70f07688662e228faa861496294b068e21f040edf90cf9d0230bf", + "0xa64458a7d295ff66658de59d0f166a55dec1f9e9e2be6fc2a8ecdcb77b72509f", + "0x4e50f8712edd21e913834cbf4f8d6baf9b371f0d4592a0c6a11f70a8e95ccd26", + "0xa132bb777e81aa07f8d5a6696e3ec6c800a1c0743a946618d04df4b0668f1c8f", + "0xa552543fb7ce61cdaba1d077338aa31a6b69cbc7e6af69cb5443e2d4e1393cf8", + "0x05c451fa47938025e4fb6835d09e9a92f2db33cc99e21b44b98a1f3b0c6071c5", + "0xac9628c769038d220a38801a43aa1449c24b2277df287b04ebbb4082d1763f7b", + "0x6d188b8c97ecb2e45ff51e573fedeb95083b40c8ae15042289753ae65caeb681", + "0x0de60d18d4f052a11a584be1c4595430ea8f5c943dea397da9af2d27518e2646", + "0x02c7e9849aeadc3011c2d36d4f645aa0d3f23a27d19a8b7eec61e2ee723dc675", + "0x2c974900dc848a8a0eea1e248aa0e2469037038bf9c0768e6e46d2781530ac4a", + "0xbb4b7b7d9ae81c7784f6a8e7c309f30a9794f0240562ab889d4113bb1e775697", + "0x463ece715ed0458cdd0f12cec6ab023fb3a3cbf6eda4b55f3b4115921d20df52", + "0xd535c260190be6f755d84d8812697c8ad8801533b939dc95e2072e2f39066564", + "0x7f3a0e061e646047bab6b8dfa88b092ab003c0e84240dd82f6e7d407bd5a3bd8", + "0xaf4803ac72aa8419999b383e5765544cd61b5ca0071f7dce952d7c24d89ff8af", + "0x1c53d5aa090bb88a8302fefb12080eba29c2f9f198b08b073587049159cf4245", + "0xf71ee084795fb52661d5cb7957c7e710e6171683aa691412d5c816a764f61f64", + "0x9eb207ab5d1bc7d1a44afcb2790f32d7c41f1c54a17b277dedcd8ba1e63eaac5", + "0x2ba6c0454e857b17903fbe79d6396a472216ddd825b81d70c696074291e71b1f", + "0x899f295af86c53f6c27e75e6cb98cf428a5da102be6dd8a8e2e59b446a086a18", + "0xcda6ada90684f614c967b6fa4c37e6159522e2dee2fc8663b6a8478be5238165", + "0xa59f5518f36b97d9fd077f736de67de7856d515f5146d5b1ab1b2a36112c6400", + "0xe7265df96658699ef8781fba631750ab18dc9d62c0b24820e0538809d046a2f9", + "0x4d9fe46ea3b33b6e73cddbadbf8bee4aa31aa830c4a1abbba4567f21f78a014f", + "0xf5d3147fbe7420f7c55f6b06e045ee7d2b2e0ac7f2040ebc8183ef24108ad70e", + "0xc8dfe6d026040fedb27da79dcf77aaf83fdb008792c6366256d5988e356eeb94", + "0xeca183cd9a46eddf04e02e0a82fa295b1f56322e5552a7c7f0aad090d209b9d5", + "0x8e26a0ad84d0c8b5e64b8a57eebf3bb86bdd02e24f24ac95c6222959638a3037", + "0x5b1cdf956d672b244ecc6bd5a828cec7b80867a4ea2a547cf7240e39793cb5c1", + "0x48c8d0fa40f9f6a49fc6378152972b85cb984ec221384484148231ef88cc3a97", + "0xccf14e2b03037c17bd6d47ba41460aa54c826e945c0132692d08140f156fd115", + "0x331791c82f8717e22f27aa77b7530acc83beaaf9536cc74ddb90533327c5072e", + "0x6c621acf6c972322182e5431049874a5e78bbaaf1a3f49219fae2c8425d6b5b1", + "0x5bd86b4984df838b2ced1dd0f3e37ae19d52ab1002a8bea859065f8cdaf6bc38", + "0x3143ad07e92a4b2a24b6482b5502ce98d50df46923ace4845ca35e0948090363", + "0x66e2d61040285db2e895e1aac42b69b41f556e6fa82116c1e84b49e67478abbe", + "0xe4f3a6c6761a3e17a5a978c69d0a6688439d4d6de3bbafd2b830b5066d809e0b", + "0x034280d368d7bcbe1f1cc63bd551c3ac2406f612f8f04801d24f98d89e75c444", + "0x2b9ed64e419ea19e5dea807dbfc08b8d21bc13903e8888aaa15741c6c0481440", + "0x72630a380871aa5ec67bd06bd672fb0128b95499582be5d34a4073645d15eb6f", + "0x9ee6618d35b3fffd4abeee984f1e9f3fbd200e5f60c562cb0ae3200b8963f522", + "0xbb40172754ef37505f4ce8077382eed0c45b0f96c882ac26b7d209b951d7cfd1", + "0x76e973e45252e97e2cb31bb8b79424e5391c3e76893cc7be0c1c1101bbafb57b", + "0xa4218614e301d35b94bc536160007b9b88acb5c9987a44a27c514f6456b28be6", + "0x0227fa09131444917185f2cc802ed389687a4f968f99bb221148ab7effd5fd5e", + "0x0a93fa4f9590996785fd599bf2669b290e8eca7f02ca06aee9582357293a8493", + "0xe1a277823bc99e602027fd18db67550f0d5e60045b94bd2655e49531bb152f0c", + "0xfe8ac01e4e478b4019dad76813449f8155de23b4ba2a6e2091f4c8ba82508bba", + "0xb194b4f530b832a2ecdc88c1bf40580474847b91c300751c810bc5cc408095fc", + "0xf1de598992e61dcc7bc9e1f1490d80d10024c6319954aadae6a4df4ac54ea564", + "0x38138e224065ad8ed4af813bcbb35535bea444f99613d686f0ef4ff00c5a3fe8", + "0x13e6a7016f28c856d777e1a7f54bce788a3e21b129cc1b57d8e5ec21e6522d3c", + "0x1c5d57d845f18557e61b1b3761d9452eb26aed8041a4a3073097259546e2045b", + "0x536848934654d65ec83f7cf9a0f69adec6ae974b8e5944127ca819a30a20b012", + "0x1653d5a4610454d67236e8049dcee0b1a531e25d5c7f0bbce913a6a524a60db6", + "0x7bb7bd63c5985b492c4897d59223335537ed0f8928c5c7383b5ca7a6fa3c3cb2", + "0xe4b8e08d3444b8e14e390e219684a6085fa335d11c1c77c530582e2c3c4c8e55", + "0x5fb6b09c1ac68c1ad0fd2041c27f1fad5a83906d4aea5af0f965cf36bc3cca3b", + "0x40034a02507258439d490a5a282956f9ae304b4ea4730ad6386005c767eab5cf", + "0xec6ae08d9c0033901514ef409a7cf68e1a682a202dc97c5c467259c7b6022e2b", + "0x9082855abacd99a2b634ad1f50d8517b0f1b091cf5c649ba377aa3ad2eccb65e", + "0xf76c0b9744305baeee70b1e274f7eaaf3670b2217fff6655bf69968b5acac517", + "0x917198a97cb8f704471f6500aef3e6f014b09e8da719ee03e87f45c95605f2ae", + "0xfe1a48d29d6ddaec284dc0bca96cc874ecefbbb91b74c8ea6030a9bf80470c73", + "0x9ba5c60cee1a7d901f9832e3024ceb9db24460c6636b98df81d008d1678073c7", + "0x7cba18b1ee4fb25f1536708ad3f4c95c43d60930f67dc2cfaaffaee2f91fe1d8", + "0xbd2b278edd0e75c6a39aa2f43b334d8cbb52900c152b2b8e3ccf7f27221c0643", + "0x65c3a4efdb5a189b46db8b8ab60968f6c16c1b56f9f2311b3380c275b7914383", + "0x45de07d3860d9be6f7b90dfa928cdf0da9592c2054b00b774ba7608f3d99324f", + "0x91a4389a9bd65f3dbaf092a5a49f0dc2333bc5ec7b59c3a48cffe97ba52213c0", + "0xff9342e526815c132251c3202d20acaf0012be44ac7c47f7640f27fb6f2d249a", + "0x48854fe3580cd19aee63f0eda576f1af518f3ebfa9f87d24da87a89ba227acad", + "0x8d292c2072d5ef4f3ab12cefaa60e9b54433a0eb7303ee253408c19394345a4f", + "0x48007c06be01f79cda41ea5791e3ef4bb4e946d7af262b52cc74eb3e20e98a1a", + "0x36a39e5a3035ed57c8227571b2d57317ace61cb9c66dddde57a566d34eb7d894", + "0xca4446f6cfc51f82ded4f4c798da29fde3a3bfa1f30de6cd721ab459e570dcb2", + "0x82812417102865e04fcad17c1682c7608cfcb855267b4ecb8c1e0666537e6a9f", + "0x81ef7d9794f8bec6b04ab899cdfbf3ff735eaad06610258ef7f90c77c83d5387", + "0x4810726311224ee42f1969465daac6f12516fcbbfb26e9febf221fd8d1cfb41d", + "0xb39a309cdf26f5f2011a83a0c1840b61cc5bebfda385a479a6a20d872bd082bc", + "0xe5002eba07d8b69ba9470514d286ab800d28b443531349d641d9df57c3cc1399", + "0x662dc062bcbcf4f45759c85e8a0ff833564beea1ff3894d7c5286133b3615a9a", + "0xb2cca2f7a62870673c70313efe23bfdb57ff9e6bfbb9e73948288fa15a8a2f49", + "0xd9e38758784261f67700452e23a59ab25cf22dcead205a50685d5cb03442c81b", + "0x039acba436cc8d99337c16969a076577a50d609cb2986f42702199e3c2dfd8e1", + "0x7141bec6010aa3d5ad1d543f91a8b10ba3bdab7625fec8a7d404238c09893e48", + "0xe0a2f776956dd92600ed94088b7da0aa416ee83cef35d37063d3df2d3442173c", + "0x7e099f882fa8909a3f67cd5950346a00a20bd0678e7ccfaa03395bbe1a7bdb6b", + "0xb52e8fb670f5386581c89d4b01b0bec691b9e828c9fd8916708287b6c1d49f26", + "0x16b599c31ea0a2c2c23e2845cea74c73fc892f16a2b34091ad9ffc5d03e7f609", + "0x4c04bcbce2e30cb9fa64e6c776c8be2a4cea04512c9d70e2a5d8a377aa77ba76", + "0xad1f20b7e161337e3d7aba00d9dc3585569cd8ca932329b3df13fe5f23574f70", + "0x2961a4a19bee2dee47d9eef2f875e03fb75bbfc30473604c902e76c76620507d", + "0x666c0d915622aba83912b23cf5e48ac57219a8e592f09f9e224af94ed35cac7a", + "0xfa6e99ccb3460635ebbb7ba53b332825f9d5185dd10bc1e2eff5fb6de4fba746", + "0xd3bc3b194941ea52e2b31ac5ea1c789233dea804e24c15000332d41f8bb4a8c6", + "0x07281b9f1ab9e962d46f05c76f29b4f4ff3db35baa777c37c5dac6cd33d49a90", + "0x5bf61ee56f75630605881d34c11fc029f7c2eb96dae86c7dde18af8e34aa6c77", + "0x972d651e4903b97eabbe5a58440bd248eb2ab16a536da686a707770b88612d00", + "0xc953d9cf8cd4a68d7a2d9dfdc3bdad8bd0d511f63cbb2144af7227ba49084a71", + "0x9a90ca2c4dad5386cd71110de906f6d96f80934661afba440ce194e44e5a6036", + "0x8dd2c27d9b327b1a6e2216f561c09c276c9db44c3a87e6f8fe381d7a906c9769", + "0x17362077544107f34233c1fad77f12c9140d0f0f0a5206dd887bb9cf627a20dd", + "0x52afd7ffe299cbfe5f418612ecf625ab1c6debcfebc6bad2569c3b83aa1f9f55", + "0x6597cfda3deb8371e447690b5f90df042b72095551d347eb77b2ee55868634bd", + "0x97a7278a76d38714f16a5b3bae0910b18d2851b2519ef5dff0a791f471cff90e", + "0x0f4124bc20c9553612a8e78b90c80c1341a3a290054c75326753be6a103dae22", + "0xa42039e0a42da736e91ffbea82e58beaef7fa7d88263764611b73ed4775e222f", + "0x13f6c5b099ba6a2ed4701a8b3edd76c2645b68d9c2cf9af924da39bbaa2c18c1", + "0x939ddea54fc48f8c8dcc1ca6c04ff2cd70fd8da9e93abd3ed062da56b75a1110", + "0x3e66eecafa70c79675f26d259fa6718c646ce3828e80652134b792f0366f0c68", + "0xcf507596184c9c4a14286412216f771f0495ea5780bc372d12ba6e8445c67d69", + "0xee64dc03e5fa815ea5e9e3e4d2c87126c8e4c0ff56f1152c349e3f9327fbd5f7", + "0x3b6ba90d23473ab15afa76d95b23b2a86309b0d6e2edd3492c374020e544c820", + "0x51ffa382078573a9bb41ad67b775074ae41f9968e2b38341ae9a64a9f1f74815", + "0x6c3a7ec03f93b7d4b73d8b194ab38a23b512a236731b5e54b8b5bcf44aa05608", + "0x0082c925bab49c6ab52f9b996986123039fec2cd6641dcae3e3ea7d60bd7a2e6", + "0x85185f7d346260f24bad3c767a04bfdfb3356f61138b9fbafd7af0f813e1ddc1", + "0xeb5a6ef56f2926a533d3858eee37cbfb5b37e8fb5bd181cf61448e36d8b48dce", + "0x700da1f1e9339d6d55c54c62cc5523c30901162216c2f182f5f2ea66dcaf9620", + "0x84161dc26196b99ceeea8d64f6ef3d127982b934f49678f6a512c07534e8ab54", + "0xca3f434ced785e9b5922b625e1d2457b156372e4917b9d6c8f4f6a995182a176", + "0xaf62ff81c29e9102077eae515015286765592d454c8e15b0a302adefe22e998b", + "0xafa0ed60bf7417e6f74fa7a9c10ab7c7b0b1e94b699569b0e3f70ab01b234ebe", + "0xd2cdc3211869e030c3e291f4fe2f163ef54b24d7ff0bb4489d73a5159ceb461c", + "0xd74c2a92d3c506bcbc11c1bec086cc419fec1d0bca34d50b74b28f89e86cf864", + "0xcc25ec627504ed9f00af661c72990a36a2f9ee4c4507e5fa4def89303456d7eb", + "0x8edd1c1dcd064b7c693c978152209761cd6c92e449e9444e9dee807fd9f9f420", + "0x660e691453e374d0a584b184a5fdb85894290e1ccc68964a8292db53ca096505", + "0x9cc340e9d997cc319fdf2e00c75d80b80953a90049af766b1a499846c5e08bc4", + "0x58e650852eda00e55bc2d9e024a49b3b7a5d6d5092d837407114120ff143b75f", + "0x5426eb6b6b8965e80dab787befc815c6c430e80231e91fee5511062bb21c3e4f", + "0x4bb9b4512664884f7b63bf27ecc75e0a69e32cf2b980a8b9135e410871ce45ae", + "0x22438f10926c874196f8c65e274d018960cedb55ca43787e18adcb54631df7ce", + "0x68aca6a2e6a51c8543939fd10be02784b1149923652da3f07f91999b75be995a", + "0x12a77edd8cc051f6f991cd3912f5f4afa1e797f5daf010ab17b3925220b12e88", + "0x0d3b929dc2733de2865dab86cf42684e8430c2ed47d19606637f932caf8d2d13", + "0x69f8d5c233a251c35851354b8546d89c7c54012736440c8965c256cc9db7dce7", + "0x6757e97aa449d7878cbbddeec490fd0636b2c51d5b00bb61eb4836685d005d2e", + "0xe1029b22f6ded11ab5ce46aa2594ca90006a04e8848f4152fc40c27735217ac3", + "0xadc4af259ba86cfc93384f3c0eea61a4b661f015209064254bc6ecbcfdb74f5e", + "0x02ff4bd0ca8008db90a121deab0c36e45bfc7acdaccaeae04acf3aaf51716607", + "0x9df6ebb38ba3e1d0a3a82f871bacaf81152bce32265c0eaebd9d9e6026665b43", + "0xc25503a6058ef394c48d1153ee2e70a3d8e86e0a46b29ddd0217906d694a71d8", + "0x83698b68d762e75476caa87411797ebc0050f9296ec35664bcfd3aeffd01d8c6", + "0xb185832a5b8fb209b9a6772673cebb3dcdf3d915886282d6adc47376a48fb578", + "0x32ec2d0710f9681d75819f1e2c28e135b3272dbf1da08e4d64ab2e6ae1064cbc", + "0x13c8aa9abf04b6ec2553b171b58356a1c256563406ced1ff3c84a3ffdfb5c1d9", + "0x80aaed5609e1b594b3c54403ce9977dc558ad292ec472ac73c8d7f39243e116b", + "0x8cbee772d46586087fbbc9b4fe2f54ce2405d2483572bda3c2314e79ca0d8deb", + "0xfbfe6a938e7bb9b05d889f8182e8963344df0ac7b9022302b451b036da261f9b", + "0x39131379b64eb550fa0a2574d504bf7de0219d50e6d55cc82998ac8d2684df84", + "0x5fefe2fe1d509eae61cab218f1bd03196b1e631f5c416e5f2c0e9e54a3d44d98", + "0x5839c1c6580a4c04aa09dfde45ce4616b6f30d1ee794dd12fc745b96b2d48c84", + "0xa75d2328c4e63acdda579000e6df9be72d9348c2001e1927264b1a8c303fd292", + "0x7331a0cbfdfdc200cbbd1723bcad1f1ca6e0591c1ee025bf1842d91e4625c8c8", + "0xe9153c020aedc51102bb9b22a2493db4616364fce9b61681287dabeee881130a", + "0x53b7aad781bea92a14b670dfbf5acd8a55d2721a6146f099b904bbc176771b91", + "0x0de55190007ddb76fcb57cebee9b1ec60d52d150ac83beb66b088a86a234f9d9", + "0xc703435d06a2e1c5e52789daa3587b920cc2aeed658907bb7d6442693c65902d", + "0x6d21f9a28fd36d865af468e2c06ef5f41167f3014251a53aa1d2ea55896ca1e5", + "0x6b24cd5b8a48fd9dbe7e8ea6c492b57f3146009daaa108ae5d1199261cfc3914", + "0x40e49643d669f497785df1e601cb1bedc24ca348f86354d4032b1d4a4c6776b1", + "0xc56f0ff0aa22fa1e19d8785aac33805f7a7a01b48e953ebb126a4728cf502518", + "0xdce90cab31ee9f5a345d03464c69cc5dba71ee601bc22ccc8aae1eb442f3b29d", + "0xa551b514490e45b6669024b539f7bb37e6883ec97ff79744cf1f1c2ba1d21ec7", + "0xbadc6d33cd58aaeabb8b62396e102cdcb6b1ce9dbbf7051f937a890a3f69c2c6", + "0xe544b08143014287bb8d917f66e8f22f2a6deaf6ad4a3996426e2186b8bb56e0", + "0x6ed9b64beac26a5fbbd15c09c7eff96652b710670c2ce52a6856cd998521a27c", + "0x48c14f31b1fcbe0deb7816771f962cacbb7c2c219518f3ce52661a89e9928228", + "0x425fc1308118e8ade59df07136948a210786f8b2b6b0e51ea01ab06653822693", + "0xee9b2ef0dc1dd873a3ccdd77046969a4ae938e5ff39695b891c85921883c3277", + "0x25066a1abffdd64dab20529436c3d9a44e6e837d70b19847e355f63b5140c5c1", + "0x7441baf6efba832751b31b93c9b000d8bf552d0328415937d0a3c78595961ee0", + "0xd9219e7f07c0808d2596cb57e26793c1162ea9efe58305e3a26da6fdd57091cf", + "0x1b42d745a54c5e3c48a4911a27c263bbe42c8f038c826975749c1619c2e21cc9", + "0xc5abf3dcbcee854b06836237de3a461d86a8b76e8081926ca3078531e25556f4", + "0x7eafa90a352f95c8eaa914cfba0aa90db5ab1275d966da5fa445d9dd6ac6e0e3", + "0x4230ac1a58e4d9903022416041d5119991f911b41702d43c1caf0723cccb1d05", + "0xd50f2cae10a5cb3084c9f5ed1f9acfce8fdf3d920d89ef41165aa2522b97582a", + "0x6eabcebb9040f7d6791a0a560b987288d8246db9140b5f188c34a6be7fa17552", + "0xbbcb3c36f228d2589cd7097111ecd708e419bbe034ee6d9aa691d483590750d3", + "0x72eded80c21baaefddc61ecb70ab76cfc68ec8509b4f8786fcf25d037d75385f", + "0x2a01f9310e3116bf3527cf90de19bdc78d9cc677ef5c9bba94f3ec321d700a7f", + "0xfa401d300fed7092c91232a2bd8b0173ddb62b12e8e96a5076172abcd44ef858", + "0x984001b77e32ee2ac8d5678f77e6c425e6ab9fb2ea3f4978b6594b4499f893aa", + "0xfce80ebf8039984ced85b45b5ee5c240df0a6aab809d6bc0974a5b1007c77d4f", + "0x0a964a69795de761278c68843100ee547edea07d790d2efe64d975b65d415159", + "0x5ab1dee36283fc991e00fb52079c232f2d9bfa97377addd05c50fb06a09c11ab", + "0x47676449956192bbed4235f3162d06ba3095aecb9f57d9c8a273052278582fc2", + "0x4e43d79f07711fd4d4a8dfc576f08d954b5d6829dbbb59ae4386b34221472966", + "0x8f5cce2a573190694302db226a2b22a89f4487a4f509ec1a759646d0d5face7b", + "0xe10a0419bb270359d2c190014afc1fe52f8df9454f7a8e0fe205309e5a3b33e7", + "0x4626c976a572110230c540dcedce33a5bbb97919867aaf0520128ceec2e9d8f3", + "0x057b497c49e4b2ba614280de64dd91118172ae4b4646c3031a93fce200c8a234", + "0x8350ba4e211602c38812276000b1caec40dc4376176afcac43eaa96d7af30d1f", + "0x9e93fd7b9b9ca98f26945dd5716ee2a6274f8586d14f05854a0f7f25c80541ce", + "0x9f11403407548c359164f3f93265f12ee390ff3b3631ec7b90b98922dfda2343", + "0x714cca7ddeaeaf302fc0ebf50fd072c89f063061ea329e67c809d62ea9f5fed2", + "0x9c088fa9b25f7a5ca635db39b3c95da6859a5941eb1ae3e4f4717013fe740cba", + "0x634542af50119e4adb4d72bec5d0e3b095df21e76865f683346e1bd544922f69", + "0x2a1fdccea29581063da7db3f2aeca7087ec646b11f1d47e6d48d1dea0122fdb6", + "0x156e283ab987a5da12710b459097b5fe3d79db296551fa289632c0d3f9b33ba8", + "0x3eaa070ffd835043d4b2b25d5e7280f030c615b2bbdcaf3ee12a2b2b4c620747", + "0x863d5bddbffaa9f0ef9f696ac5a7f91191b5cb52383e1d0c0e0d5a60332c8728", + "0x4e29095ca17d15099abb1c6c1eb43cdd6dfed160a7d11731f4d1115beaacc7b1", + "0xa46f6ce03354ca96ddfbfa9e1406dc7ab99b0b4ff1ca5e0346f3ce91338bafa7", + "0x9f19f494df488b250ba31e243c9098fbb7db5801a3f76b219d866bec32d009d5", + "0x763dfe2f87eb816d1bad1ba95448619041cdb3cfb1171063c043d1e02d9f6ca6", + "0xf8ed4dc0fc0c03b964eede54ede5e96a940cc85e1ef2191c11465f2f1e3f6f0d", + "0x04f0d8ff18d26b490f137f23144c1ca0e475e74a7f1599fd2f6a4972a3d1c215", + "0x012ead673926ef6b3d2cbc5332a7bbe5dac977ada6065313e90975360dfaff3e", + "0x773ccf0a297a22c43b29f1bad214ac9e3685a5d0bf1df7d49fd4b92065ee7b04", + "0x10b7f56b8cc84f4be7533ec00ae46c7ba852f8d093c889b7edd46d36c819abae", + "0xd70605a437bfc6a4cc3468f0eb6d59b293d4ebbcd7979eda36f02baa48e68d25", + "0x68a93b7685277a1ca51a341517d10ec1f03c3018dc4d99da00624d4eeb3db229", + "0xef8aef04d3b7771e8519952b4e067503abe6b2698411299edbe7dc22a79c39b7", + "0x8e72feb3f31eb9f13645a089efd4eaf6871bec26a9ee91452db0464a7e6bc5e6", + "0x3189fb0be615c0f2e2758400050e2657e3197546a15039e595b091cefc9e0d7b", + "0xfe444b821fdfb12248cbf371192783e4e0ea0a938f5ac7b205e15cac991b6c98", + "0x0329c441b6c6c56d76de552ad43596760d37262011d97bd91e595dd559e53de2", + "0xbecff3658ca19ed610e826a68621e7b5cf2ece293ff13fe3f0c57c3390954af8", + "0x695b87703e7299f3e862740bbf47ebf026e5330171509fa0927c361935ff612b", + "0xf90373fabdb83b403f67cc50d79aa37fc26d73ce8fda798e96c4a4b17440e2cc", + "0x536eee69a1cf54af816f4eb5d08ccaacfbbaaa165451d0a5e8b93b2e872c59ec", + "0x17b56635255ddc2278cbb7e7139cf7a8f6e2e55581c451cf53b5b53aa89f985b", + "0xb4a14da295a0cc51076c48032fc1cdbaefff2380a428eb03f6b068aee99a8fcf", + "0xd3cb3797197a398711299f816f34b7c98aafc8a845298287b4522cb0fd645b01", + "0x55aea7b1fd7bf0864b577e38a89c153ae8653da26c72f53a05d164b9da327a67", + "0xd4eb63ebc06549dd7419012d4bae13890716430efb843175a9270a6c517ea612", + "0x6958093bd81e477479a53443b0c95c11d8791b282d028bd9a6204af0c1f738f4", + "0x505f55a445b93a2ba8d5ac5531370e2bf760db44509f15d2f243175b12a7016c", + "0x4608a060b7bf832310eb73a157d285ad824b07d78bb471ea89ebf421d735d566", + "0x68c88d220d8ac23e19459d650594dde939aedcd75325ca2314b7a9419b938c37", + "0x891a1154ddc1e3239b1100840e1303e0627a53ad501996e56891839b54becc93", + "0x8b943abf7a572dd64da3c4e58c1f34f6f7a905fe7ce652a044ab8983ac45fced", + "0x06b07efee0be55002f485ec0526336fec4a7f825ff7eda3f954e8cc7068207f8", + "0xcafe52ca4b5198fb4e4e24f4c04ad12eb8c9f3ebf9a35ebc0014e25dd7bf5970", + "0xe0ed792746b780ba8e19ebedfd3922ca937fd5b8c28b03e0fb91789cedc0fafa", + "0xfd7ea98fb764223ca3c587820eda0a0d68301979313ea9cf0113508a05fba7d6", + "0xa874e6edabaf6da36996b6387bda14d12c3eafa026b1ca6ad5f1f4cae67855ac", + "0x29d7c85005517eaf1165be4921deea5afdae1f66b670d7de0981c4e502acbf1d", + "0x949318f8059937f207ea564672c86943c2c9bb86ca81a3b0a9523e7bee00a5b5", + "0x200dc199c37d16b25e207165c5576596266ce8b62aa8a9c6cd66d69d52c1a67d", + "0xd29108a106a8a5a87b5282467a0e8d37f74c2ae53e6dc11ad63005f3f3f878c4", + "0x44ebfaad5b4ce81fda3d4194c87b46e9e31fbdbf0ad28fe00cffa73f78d3957b", + "0x6843e2f6d3d56b55251ef7ceeb635226940dfdd698215f5d5a4c3e88ede5c0a4", + "0xb84d57422889adc19626aad033b38b6968aafbf4c6d0881a0ef5fb5932c6ab44", + "0x842626b82b93a54a3a1765ef6257a0c74e1ad2981d8da41fd8305adbac99bc76", + "0xeb347385fa0bb37b8d5d17ab60e6c2ed4bfd19210503d61beb88b71d8bf9adda", + "0x509a54bd689b7011504e835081bb9d3cbddd8592ad80da399689bc9172b48a27", + "0xafc5c51176c7222097b12310a3ee5513a7660491682ff1fcae5d168d2c19c3aa", + "0x406e9fa3f6687fa6519067e213377a5ff7875f6f0a3080880536ed395555ad30", + "0x2624c181d4ee1775bf687b522a36a7b9bb754ff6e40ef12363c7d675b60f3d04", + "0xd5c32eb980158772133a99d0af96e056726ed89be84289cb5fc1d083d48cc407", + "0x7b1c5cfee09aba12ae0742d9bc1cc2630bf8c1e141033b18724a524c2c1b7c2c", + "0x77b4b55b236cb7d27c77063a280eabbeba0d7171759fbf851f40b6ddbf7171df", + "0xa04791b79cad41718cd8a0bf604b0e956aa85230381070f842667d88760c0de7", + "0xb1558e574944d9e8910da9c34ed51d89caabbf6541f077a55ef2ae3c513a1e02", + "0x3ef8620edf05514c4e90c1eeb0a896ef30573f963a7507ee90eb76e4334412b3", + "0xfff99365402379af3e56fc9b999d316cea7a1f388623433cbcfef0ddcb6f9d4a", + "0x99fca466439472d08ea602bafc67d1d097e486b5e41b5a059818021f612e889e", + "0x094436d10026f1c57f04846690a0444646b762eef1fc0420c6e3f5cf5b845e14", + "0xc57923978a9dffe0812618f2f6420f30ee927658f9f1615ef7cad4519b90eda1", + "0x3a20d5e138cac29e3fa031847086bc62e5f90a5e363a70fd52e2602545faf9ec", + "0xf3b0bd1d597eb2b6ad98fbdcec7dec2639b92bc83c33db4fced5d23e6ddb64a2", + "0x0d5bbdf1dc7d52fddbb3e81e2d757b848f9e79b6847ee8d30352d4b01ba927f2", + "0xf8f51ff9cfdf6b2ad5609a68433c012c92cabeb3053335d784b1baac087516b8", + "0x5777236f251506c22a92f371e4ad3c78bedae22c4527ed5e796727512bc2b8e6", + "0x228bea6da7246c2dc862d9de97bbf824df6396cec583a4db71667306c5f6a02b", + "0x67ccfda86cfccbb139d77d8d2acf0d4bd980b507acd9bfdda6b5af6e10493df7", + "0xfd8f9ab200dd111c04803f62145fd82e6a79221776904be20a90c1c6328cfdaf", + "0xcd8ce973cbfa8a91a55ec09ac9acad4cfdd050b598349b996d252ecb3935d277", + "0xfe8067acaad74db589275d3122d84f04f717cfda870d444872824300ea10f969", + "0x4112ee457d4108c37121ef4ff0ceb1a4c7db3a9e3776d647225bf0838153356a", + "0xadb045193cb85002f2868c1ffd672bb93e60ed2841ad368bc8399e92c996229e", + "0x4243b3645b99ab1468bc421309220529d8ab204542c6901ce618ceb32b93becc", + "0x434e3c4da46b052402d465220e27d0e243bb5b116967d4baffc9325e326c9900", + "0xceeadbd91caca5832cace1624baa5f67b0d18f725627702cbd7e19ae3c691712", + "0xac54af2cdd95c862b3d9115c9550231f75ca8d6f6e607038850892daf1dd6643", + "0xc4ff21314ba2cac393c67982362a39b7ec96192fe37c316bdd4cbc692f729ffd", + "0xc84746b891e6dd8aac32b2ed0b373172df4ef375afe7e4ab826532b6b3fa9680", + "0x0b0e01ec97c12e488829d13dc1fd420c08475dc95d1fcd72c066d76220af055f", + "0xf0b54fcb4a3e075f391bfe937dd6b4f7481877182ddd4413e8b70efc63aa7f40", + "0x1a78c5cca33184c9e404a05f61cc56968b924d9d34b7ca6d573563eb250fc691", + "0x37ca206f795c02f45abc34380d67b15aa48122444fc444d4b307ab2f7f30a9e1", + "0xe03c444efd29f8d7c89b480ffbcb996a642ac6205ae43bdbb815ba1968051e36", + "0x2fcaf6ef7c22cebd36ccfdb037e66d9113d0965f3b5b89d597d91b490019471f", + "0x11a06d63b3395d09a048aee4d4291c0a6ab2d5f07a7667362890ce647153c2d2", + "0xc33a74c178ef5460b53a9a81aee02d3b42612acea7adb853ef74cd6b65f36efe", + "0xcce38b309fd919a930d38c7c7a7bc828e5039c22a7f3f858fd99c5d44b8cdb2d", + "0xc470e1078c305a5eaf7311d7ff652e24c9dbed83c3572a1c2ec7f6fce5788b0b", + "0xa29b6d0bf49a64182aebecc190a9a0b06931096d9984e7e6da9800ce17f7cea9", + "0xab0821217488504e1c255343939d109353c79298b04c69ff65152dd0e934022f", + "0x40c7bf4dd5a2d39c0dff9fb3bec5c8247093cc1bd55a8087d83f5fa7c8a35b31", + "0x3387ef8b199a2656c39407d503b9bd1571714e178d1dc7b1a74bc43cf88ca201", + "0xa5b2b8b2d708d97666281684641b611efc792f7c0cb27e053eb06752661b35f3", + "0xb604a4b7c3661098d4644239295cb9f6e456854651a5b289a2f4b65e33964232", + "0x4bf93500c257f054e6a6f993f344917215c9c943589644474f5cf98950b8fa46", + "0xa9ae0b7679a65498eeb2b460fe678c3452043bafc344eeb393ff1d930dd8751c", + "0xf21e50f55d7be256d14dba4f8909879cdaa3926b03da9ffa0c63ec3c9df34c48", + "0x88e1e824c968441ebf88b31f7a24fa5cd4e8985ec82fce5eeb13b3a30845e146", + "0x85d5206b3136bee840dbbf8d3d2302694dca2d5397aadcc34e1c1d6accac0354", + "0x00f68e845a2331a0704037d75361831d5a0079af3c6186ecaf256bf1da923c27", + "0x64c594c02b35bd5f69beb236ccc08140838c30b67a1576d2780123e29e073849", + "0x93f6540af637f1a630a8aaeaa86d046e09348320ca5103ebe2222f747a5acfc6", + "0xf9b4b9461b765b449191c7ee1acaad88d4dd7260e2b826c75d506a908fe71e6b", + "0x86aff1c986fbad8da2ca9de6315222459e9c47c58fd7f1a543e6719c566af5e3", + "0x68629388371ceb2a08bf7e335cde88a1bad7127990b44135058d62dfac258107", + "0x9b81d6745d5ab0a3459d26b97ab8f19fb38bd38c758a0ef106a025d091f6f9ba", + "0x2b42455bb30c387315cdf205a8a178ae4bd2d2e221fbfe4be55f5b364fe9a7bb", + "0x555e4dafa7d5d3f209d70a5c954da144ef231638f4a63715152bbfa4fbf82b4c", + "0x5d779a8f08d68794723fb5e95bafd7004685ec21d2cbae0e5ea728b36418dc36", + "0x7e5163ea9b1c0494aa997997422b02404a13b690257757f87f69bb42f81ba28e", + "0x3814efbbbfd4001641da7d5c93483f96467d55aa8b5b2aa6f980bb12a0dab6cc", + "0x431b7452a8157e3a6cf89a5a85d22127a1282877750519a8cf95e172c654c3cc", + "0x77ad2749e61c96fa868c7764ea626baef8a1bba56d3a3106e981869f9736ca76", + "0x7c069d14a86017ac36cb9007fc9bfe75ca92cd2522dcfd7bbf9d85c5133ed8c4", + "0x21dd48139667872fa67c98430f68e8d38c2948f19fff534ab2a5b8e0b92a4d51", + "0xcbc2dad5151367e6533963061712ee325f08e7df3cc7fa73eb5220cb32a2ec4b", + "0x398fa6f8d2b76d482a0c312bbf48ba8dbe9fb8ae06245da60ac68ce50f42638c", + "0x4ca92096314fe1d2d8e07aae3df39a6237e718c1396e88f3c0b73fb3124c89b6", + "0x3ae030ef952e2da7b29aacb08fc41776a44fa5a6c42e745d8b7991ff82566730", + "0xb4ef4b02dc130cea24a71a6053639238db2db30d4752dd3fcab1d98442fc3f94", + "0xa6256dc24acc6de428f47aab0b65a1f36855c7f0834a3e730d10a3c0c8d2bc49", + "0x9d8c8bfedbcf9552ba9eaa08a61846c52e240ceff531e7b19415ca148781ebcf", + "0xc6737357b53db7d2a14d7e7d4130fe6a516fce1dd0c7716be6137d93e21ceae3", + "0xafa9d3182fe6246f6c8d7b96852bc5dc200e8c3a97ce7d262a18c2fdaf5bf2b7", + "0x8064a1ee1eb4ddbf301fc983a03fa2983bc3743602bbb96d7fa6ef85780ba79b", + "0xc4616fb2fd5381efb37719cd9998c5051966b254abbdbe12228b2210c6f79116", + "0x05c30fff77a3d751853e3ae4c11678755c0afea16480a94bd99d61ac894300e6", + "0x47757d0104771c7e288f383bbbab1eeca2fc752d11989674305898e047a71bae", + "0xcc0f857a7617c16da7d35363cfc0af0ecccd9b1870ffdf1a2b2e2224ef81f876", + "0xab3a1b65f93df60eaff5df9e0bc1d91152d34d3428961c207f36ac3a94f61257", + "0xd0cd178507f1c3bdcfb7b528933f2d6227933bee2614636f3add19a66cc089e0", + "0x6379b65e140eed64020f496a95c36b3c27ea10387f78e0faccc5b4018f8f73fe", + "0x3b6977a571ac8d59bde2e851fec4384fea35a8d3905735fc8b8f2a8cfa6adcbe", + "0x2f193712529ecc908ee0a61172ec7839a9168cb424d8f108e7d7cc356bf20cf6", + "0xfa3e48832d13748aba9128bf6bfc76652cac371e49945fc33c941a9b294f7033", + "0x7086c7711a91271d7e38998715b4a142d7ec107accecf29f4518efe9f3333c4e", + "0x05c126586f4a2c1dc5814d07f158513d42282726918f71bcd1b4e0b67ee944b6", + "0xb7cc1efbf6880a60abe6b20f80bfe2ff3aa59de805ad964f8a7c5ed3bcefdcc9", + "0x64189964cba347ac35018ed9169ae64b78c3d0430145017cce83d78667b648d6", + "0xf6b1d09181b9fd18a0efa47c15631a6aa0eb01613a5fd1068834c4079e1a95e3", + "0xe760b5c16aaf587bee263f348f9adff4e04628b94ef27c828cc7155ebd3ac902", + "0x523a2c0fae8b2408ffe1c3b43e0aa7991b82336ed136e84c3f7d458d31143fe3", + "0xcc6d742b22b4fe3f41cf783a2f6f8dfc97a4b33866cd4bdfb27b05bc2ed39162", + "0x4d4ae86d282ec414a574370458c99e189062a3a48dc59a8e8e2a44790ce9b841", + "0x6fcba6a9469de1db92468f2b58b3b82c5080698aca4403ba8ecd1cfebd12b657", + "0xe7b584b0bcca0a5a119c8b2cddcc7a73c94f6f6a58503ddba7b0335815302f11", + "0xb1edda9625ea65b96a4485e10c798c707f6926e4ac2b51340a6f9d212a71a737", + "0xd8e2a94d4c0937a2033dc3b70b50934cb5b2ab54f57336cd6a8882af9f14b8cd", + "0x93ec08aaf09bd453c2b53cc7d9aff059681e0c23044f99569d0ea649cc7b885c", + "0x8ea82c1ca6be16616b62a8dbd88c75217470092063e0494419a6a926279230c1", + "0x175d030004e718f39b3986daa3beaf2e1a523583e529d6e90d117cbc844c647c", + "0x34cfcabda8b4f51cce74befb08f6a2e9ce884175f33fab59f26c60085ea73a92", + "0xd0570fbc17dc030bf6e7e3619d56ad2e866868939e4e5b23258adb191997b4f1", + "0x83245688ccb6e6f1b541930a3134d3141ef01a5f9b3f55f0321039b9d4a3cc1a", + "0xd782158768560d84ebc21d8e4f270f30055203b2d83c46ccf53ff8890e833fad", + "0xdaf31d5afb20a502b28329ecf1aadfdd16b4fd9118b10f9bebfe6f986a902dc1", + "0x0e24b26cdfc345d98a6d6dc3f4e3aa2629aab6fb2ca3820a78d58b10b09deb72", + "0x895f7a9b16ef1d1933c009b38a35a41632d00735a906b035f7fbdcaff1665295", + "0x70ee8681968778cb7da20dd794b75f08eda6b4b6e4aa653464436ff3685c6186", + "0x569f51cf2b92bde98085c2c167b773fbb9917a35844059696a1a97e378b5b577", + "0x4ee20277fbe5d2e616dc0b170e40d5b62cd8dd9f058c648e8e0d636316be7e00", + "0x1224d7eb3ae847458af472b19d3b0ddb90ce822f3389619487e68f3ce08cf6d7", + "0x57fb6d2ad5a75648449c99a46d92570b1dd74757dc1c0c11fe4923748eeb1711", + "0xa4ebbd26ed7dce135ce61bea0da82b8262d4a5319a7ab9c94527a7c670752b67", + "0x1533f0c29bd8a7b8d90c4c0755fc0b018439291566dc33bc816c8ca21269c63c", + "0x9cb5a5d41061a2168c0a8175d2712cd82d27cc777a015158c2fab0751e192d25", + "0x479f0a41aa04509beacb2eace213d9375393f583d384dd4e69b5b921c681c845", + "0x5791638640c821778349fc3064f6c5215f973f2b4f098ab38fc2138f6a8700b4", + "0xaeb1dc9ba82aa0c9ef266d1beaeeb5c756fb497607ee680c0a161b89cec21d26", + "0xb13f56956bc48a6b0760639488463cf403ed47f6d94c7b6e5a6de1d3d35800c8", + "0xfeccfb58d300594be16cbc9b5502ce851de36e15d62164317ef6e3dd9d72015f", + "0x3b218812b3219e243f99c6d23f24ba2b70e91b6a1e9bd27a5d3c83622c176b2e", + "0xfc8f86579345c5fba8e86d1263b3e9d01dafacd0c7347fff348c9a661925180d", + "0x50c6d100a8c0977d24c78bb58021df17c880a36f1ed118a0806d1aab347e3b42", + "0xd18166f82e90410a556744042badaebf3282c65d3c1fd81cf7e599695436b2d6", + "0x8f47f418fa13eee50b9a97781a02cc6a8b6818389f1b1f9b94aac17897ef1bb4", + "0xa4b3f32d84a547f66ca91ec35deacb2d5cb4da741059c01419b60b8d526d8a15", + "0x3187128246074cff2e8c0928dfc6b29294b0ad3f2ab839e7ba6d0b72f4f078ea", + "0x213988ced1828cfe0021da680b166b7d830b66a795613953589604d09b58bd5e", + "0x343c1581b9d75f1f72a787a29dba31a73384364672f0a06ec6d675bbc5b81beb", + "0x59a9da5a92994baba7e27688505df673c7131f4de43e6d174389124463eaa0b9", + "0x15c6b483253806002ed293f89d86d66314e55fdc32633f3e15dbd73dacdbde1b", + "0x01c22d029f765b941eb772991d3ef50458319d49ecd1e237ae0d61a05b7ff0cc", + "0x62f5ede9e4ac720b4fb34c239953b3289cb77e4e7bfb5268925727f5d21f0c75", + "0xe330297f6aceac790b3f4741efcaa4e58fbe1c61dd52c1d9bf99220803132553", + "0x47073de2812458f45fb789cb1a6d57f9ae772a38deb7dfd4c8c21c383cae3cb4", + "0x9e5dfc6bfe32b5f56c9799aad47fe1a01746fc9edc5d8583dbd1c0a1f7f81246", + "0x1d9a6fd76fc6a6f359fd917582f6a1af617b0b21984fe7038c323802660fe1fd", + "0x6f50b828af00200b81d65e14f07f8c34a5d485056b017146699fb8ac4ebc39ea", + "0xa8b15957d1dea63b64c56d3e40dffcbeacc5c9b8e35d27cd66f61f5c293def93", + "0x0ec32ee93cc52258a0de9eb53f48132b7101abd3de242b9319e791bc4205f57d", + "0x4405dae679f464fda0959884464e47f7d21e21d69288b66c35878560deefd6b6", + "0x1e490b1858da4d82632f376234e04ef4cae529c3307f3dcc5f5b893e38a418b6", + "0x4683e9dde5e2d66da4c288452eb653e2e6ee3a611f36cf2c80e5870c187c28e4", + "0xa657cd63ffa0cc282221e70ee3dc8a7f2e9eed9b8544f25467208b1954bc1f4b", + "0xd8ce555f85b979a26f207bc1e86d1463ab77f8c7e5f5b3c7db6d79785e388662", + "0xf604274a19dbc99c4c079ac4caed9fafd49c123226c3c223a53aff7f7b253b9c", + "0x4edf0d0aa873fedea6dbe3ad1dfa8a2b5e312e2c2b51c464c9af60a5a5c588c3", + "0x5ee990ce5c4e5eda4d80885409624af7b8075bf7349f386a40e03ae64b578707", + "0x3d34e4bb3284428153db9216319a83c3940ee95d0a47d963dd079a46d14ca105", + "0x7503687ea102d05d92bbcd2397eaa1edb42f757a0ceffd3abc871d2d895214db", + "0x7e7201b9fc6176b6ef993dea53732f335efb98abfa3d92462231bb6a5186bf16", + "0x1ab3a0afd0338ee34e047c60cb2c766521b3085658ae2e019c0688c2397bcfc8", + "0x68b5df43d045043400e3583c4ed125ef0df6f1617e30693525f68fede915349b", + "0x201fe9c6fe4cefb948972c644fb9d67634e30529589b4de597f9335bbd6dc8ba", + "0xdc09d73232f082162df780069a77f180bb30d8b736457b0c746c3e0a29d7dbf6", + "0x7c33f90910049812c0a87aa8321c97320ca8953f654f8ff7b6e3982b13e2cc32", + "0x5658b211c7a5a9d8d66be179b8d6039c6fcb5b5c9d232d4655e536e21fade31e", + "0xebfa63617d9055c50466157b9d8d0c16ae58f02df12f4e23f4bc09304701391e", + "0xb29f737d036e5d7164786e62b14d1f9c427792fc4faba265efc59360129aeba9", + "0xa1271a340258127b442c103959fd8d5f6369487c16575d90f9f1267fc3f78456", + "0x1d5e62fc56da958eaced4c2e6a58ad4acd3e978eeeb0f417e4a4078c6014a8de", + "0x4357d167c61da7d4d0b3f1646508a859d8270842cbf1f1f9f082d8f713da3904", + "0xd9556c35934ffc3ad2970a448d8caacc43e452b509f2cce4cf755b19d888b674", + "0x248efe4782d57127bdeb94420062b742031a4bd51c41d36375a9671b279b1e09", + "0x94d06fff869c9923ce5f524c3ccff9d9609b0b36562f47c65c7f8568d3f9207f", + "0xdea7e81ac2b15c4b145dfe132a1dd41300fae3a86eee16f936f46df16f33c686", + "0x733fb7f221502d0f10a13a5ab0473d50746afc5ed442dd69b4f9378abd304e87", + "0xc680bee47e540c3d706cf461399fcc1d7a6749b4b9f6808afa099c52d28cc6b1", + "0xadf685a187510063c7cf4b3ef6ae478705af7b4dd6c3c4080239ddcb6b069b3c", + "0x4ec68b78bfaa971ad03296b71dca45e36852f04f0cf6d0e8ea681c4d32ef6d64", + "0x407017242e04da4a1d4b16d59c59526a172e18d1d7abd4a343ac28ac883298b1", + "0xc92af4b5d045a6b02f2df7cf5a23173d969c447d7c006457a5be7f0251446488", + "0xfb8367fe9396d369332684b2fa3fad1603c7b572dbc00377bfcef0021192a52f", + "0x1d73c88199bc153c932ba313175344b436b28e5e0b39c3353d076c7e26fe843d", + "0x253fc1aca7544fb93d493684be03d3667628b5a0f3f516d7981e3a01e6656440", + "0xb8fb006c1de093ae15658b7be4b6625d5c6d14a5c4dd2623ac9a31e2479d32dc", + "0xb46abb8860cdd8ae411231d897af8269057060cb43880e52e63254f698af82e2", + "0xefb736142ceab502aeccd9df17018719d1004b554154edc5ac62ec45830a0d30", + "0xd9ce776c58f4e1eaf1ca20f61232d3063e98fee3ba0b078e5ba34736a16a7e35", + "0xb63a06ab391813bcf830a53febcf9553f292e097f127ab610745742f12ff7a02", + "0x225004609e0edef06ede2d08f490ef3616b1c5976027dd03f329605bfbf8a916", + "0x748f462a0fceb4743d8b03de6ecad430fbf35d957483b04e04609e9527fa37bf", + "0xf13227684614cb92591a4c0381ebb87b0e52bd21cfa265b501e231d8c3a0e504", + "0xdb56e9aa8ede4b7b042f32190ea90757dd9268457d43231d1a384bc6da5d6396", + "0xb4880cd0f5e5ef6e30e5c015fad427e418ae0efc70d084b7b6d342e1cb71ed2b", + "0x8a59bdfc0413acf03c39f473bd09b34223b109556c4e0fe976a30bdb1b944c52", + "0xfc2f062e32c3fce97a5f3922d3bb5c0842ea02a71775d6852e256ed0143ccb51", + "0xdc3ba03348f62599f9928101c65a8f13e2eabc09a377ed461636e48cc9e0a5a7", + "0xc5b2ac69eb80b3f2ee751ad4aa8e2eb2cc939e81586088986cf9d6e420330de4", + "0xd6d389727a18def7ce0bcaf65417e3d7543b1381b1b49c6f128f3e13f7d3eb74", + "0x02f48b5d43397b1f22bc7617ffd4d93254744b7fb872c051ef8a02698ebddc5e", + "0x90f674e478cf1dd60cccaa750363efe18cb4ed54415db0ea917a09d3d78a1778", + "0x98bc38a5b90450f89255564e3fb825c53d5fcb5eb9dfd9c07485ed6c42aa3f87", + "0x5b70c7cd74a8a92567686c5785657688f3f864b10d2ed8d9f21f004af2d0a3c5", + "0xb153280a3c86e119b7a03dfc4c8cedf79bdd41ee6128b3f5fda20cc83daa39a6", + "0xea4c28d38762dafc3c6716a760883e33666560cd05173d3844e7e280a6d8188a", + "0x8b498049e107092deee810a68bf8914e00d6759a7e62c8d6fda1c5b1531ff72d", + "0xcbcba70e0a5bb3ddb84e1b115432f025a71f2824061cceba494cb917c689f452", + "0x5906b23bc6b56c4e91706c5204d8873d17252c0291585fe4cad030ab6171e710", + "0xce634ca362c4acf53cf9fc68f0e7c8b199b7f3a1f5a2f9cc1c58a31f9650bea8", + "0x840f429289a783b9b4f8e0f575d1bbf0d2f4b00e09ca6dc83abd17d9718ad688", + "0xace326fc69d8ff3746bfede0d167206d3df6093315f3e3cfca8d41a857c20b52", + "0x905d81ceddb8f4301e62a871e29f1f08769336d7c0b94821b12668354af31fa9", + "0x8decc0ea30a4102baac7ccb3e50e15d50102f05f4a3102ee01a0a275d2c51ccd", + "0x56b67da5e38cfc995831754a64f0ce636f060d51c11b746aefac13638bafddb4", + "0x6672660064846341aa343879a40c5b29f10ebd8120c59bc76af66bd86b96cdf1", + "0x3600a734f1b1df6fe6dfd1cf49d8072bab86717bc5f2d276668c1a482e62acce", + "0x28e4ff2dbfe40b374a103ef1bb9e577c0f2cf1186ba3db324286ec490fd02fab", + "0xcc814edcf5ea3fa138fa7d5e387747334c3ad2095ff08465d7e533250430e25a", + "0x1aa1447a8db11875dc7ff7aa49d6927bc31f3b63cd88d2d937f53b1d85e448ac", + "0xa78c6871cc93ff6db876cff3755a59f8fac71e06c89ffc1200de6da08f56dfb5", + "0xf3c259454de9dd21788084bcbcf1cf0953bf7710bd797295fdfecfebd584d4bb", + "0xf86c0f1dbfb94dbce7368211fd3b19875fc831a422989340bce63102a2af3ac6", + "0xbd192dc3426a9b2fa33e2808a258e9bc27e1f14906b9ba9ec973ce604d9ea8ff", + "0xabd37b505d353f7042ef2ea28168f9d6be1a229bcd5ecdd4d69a96663a169446", + "0xf0f05dba6971b57e32e017285fecd48094e6044584889690dd6e0d70c62c3f67", + "0x15a8053e0694262c4954d8110c505ca101898fb5a5814ae8bcd35b8f24d6f90c", + "0x3f8c3d5b5a03f514d0b2f79fcdf7ea58eca2f85651932220362ec9ab50448aac", + "0xdadb41f6e17beff092dbb9a6dd57d3d0951a188fd041f60e455d63755134fc48", + "0x4017f006a6eec8c71840f7051e91dbcb6b18e52fa43529df1121980670f77350", + "0x358dee5f49761fbfe7e6694144a2de8e33614669da6b773fbfa2e330668f4e90", + "0x080216884b389a463ab63c12640f82f442fca56803b2bd7be45ed789db6c7371", + "0x5eb35f253d864713fbe058df986d8af27badce432ebfda59810f096b4e5126d2", + "0xa18c044fdebbe991e181140df95076de9cc5a70c2656ae99ef68e3c1532d7a14", + "0x69af193591c3eb53b00e9fadb149172df458a9e99f403352fcf866bf1456c6b7", + "0xf3a769187ea83cb9d2a96293ec8c9f2074e8231356d3cabe7669aba13f9509f9", + "0x5f26f2aab6b2a0b0f64312d243b7e3dc80621e134fe08f8189b135cfe7d9b2bc", + "0xd3edb5f8556c1a4983450a7d5ecc26a3dbdd332882dd63822e7c8cfb3712b828", + "0x6fd2e87efa3e7d4fb943852a358a515037af5c5eb9da73c3e3dbceb63106d2db", + "0xe574ee1110f966de904fb61d82995be95f3092511eee8195150099cf69fc7129", + "0x6d9c9b7b400d1f5c07aab8f4d23233d26e19feca2279f814729f122c01189c03", + "0xf0756f64317e10b276c71a678b5b62ca94e354c9b8d1ed7019a022be23fa6645", + "0x106402792c6b9f57f4b471736376a153d12ebab21e4bf034b6732324a1fa4561", + "0x33f10f38b702a617e0598cb20bd5df0067ac5ff155cd6b445f1abe46ee3d625f", + "0xffbfbf3aba272f7b978c9815e9e17972786c24fdee8f9167a47e85e9be60a613", + "0x9ed9567c8720d1450b2b0e45195c5a836484a18746e5d5a0bcbffe0b511ad075", + "0xa6ca434a876c017f522aa24937cd4dc1534da3fab47ec57e22ea7d2ad555fb60", + "0x2aec2650b00fa5886b61b1d7c4390dd4e5fd39097e9ed5b1714b741c7b0d4cff", + "0x0cab7259658221598aa39b98d9bd40e18c777ac3b11f6bc7799615c99858efd1", + "0xd76a13ba9212ef2ba4374b265d0405e41ef7016cd14197a2f7a9071e6d4e0a5c", + "0x2802a2d30f42fcb2c953ac6a83212c23711988998eb7f537f9807751b42652bd", + "0xb971ad9aee88adae769dad238a7044c996ee35596cc1b2a7f6e876eaeb4aa80c", + "0x524520c4c947c57827359ffc5a23c4926262c002e6c92d024ea7926a7e0a8fd6", + "0x0de58ec745307c9a36d5f3e97108f666ac58d86b85ce31e73b69579e913d300c", + "0xc0cd603660568434bfa04f6a06342e5fd78c6d916fb8dd77dbfe060cbaf02aef", + "0xde928fdfb8515d944a26630fdafeaf4b3a17dc40b08418097a465fc2009c2938", + "0x11dcbdd72f1b46be2a24dfa6a3cbd8024b6e05f8fe5cacb35618429d9918dec6", + "0xbac41ac48726fc1708a5fff1a06e674a64b8c3a906ec9beb7ff9a444903798c6", + "0x16142a81797daae5fa1914a473f0b89465b0078c5c042f6e1accab6d3ea77376", + "0x6535db5ab7dadf1187ab7c6f0e0a56fdb47a6e6c8f45627ab993b88eb09e7d1d", + "0xa476955c4d2810e17add2ac9604869e9067998fdce26685fd6cf422f861687dd", + "0x4b2ad0b366c96bdba812d3dad76f432dce8f0e8be1943ed92ee4478e9496d8a3", + "0x74bf0384fd4b8afa1bbc0fb0cb6543442a6bb041911a817b55bfa60fb9039733", + "0x5c3da2ac9d4284456d13270fe7d160178cdf61be8bbcbe8a8536da815ee70107", + "0x62da3f7efe7d1de45be7d134d290f9b3dd50e45e751290d870a4b232496ee71d", + "0xd130203c98355022ffd5389a6e84cdd8fa0c570ac887d80ccff892c168a49c4b", + "0xfe129ea286e85269736b508aca4471e643c4d84864809d031dffd660243e2f4d", + "0x69a60dbee253142008ed0cbde35b425e4a2d07545571d2646a5d2a03f36cbf51", + "0x1e2355fe638bd71688579e07145f147384ae18220c8324f95c54ba994b033cde", + "0x391020697dd4cf20f8afb4b76b25f2e08b5f77be696c2406ee45d0d8499adcfd", + "0xbac11283e3e355ef3466ca3dc7d604ca002e26a98b76caf134ea86efb1523eeb", + "0x328b03bf254908db475888105015b638e7b16a4743bb235b85b160e430feee28", + "0xe9450fb3b361bac3eefe1cbe97a096218c40ccf4530a669ff9e10207c69b26ff", + "0xa574c9dc2d563152d012a1931352ec3b9116f949197efad0868a53fe79a2afc9", + "0x629d3aa0c10926f4bf5d250b44fa6959e534444d9f0e8fcf5b206a78ab5974db", + "0xe1e7bfc1e38f36cc8a094038ffa44ad0ff7432c508516e7a8b3520d71714c608", + "0x13ac2b375558ac0582ec61c4edfbdaebb268efb3dd736b6483530db77b266c2a", + "0xa2ec61b999d453a53aa33105a90d310a5afd6f9df76966c53fe524100515da05", + "0xac58616f19436e53d5eed7b50162713711a3f9a76266ede35da4411008de1b4b", + "0xbe8d7a38169e1a92a1ffa712af5173d5cc18948a477a4db917a7f8cd7013d6de", + "0xfc6997785c292450bdc3dfcf9d0609efaa2eb780a6cb33fbc911efc18325c1bc", + "0xb0d71a0c1c3b2f1a746f8cb70fcb99695950ea488216f83854cb267f88c993bc", + "0xa41cb69cbb562b104aefb77c9f0b0b2a7b43b92c7e1bb40c6e781f3667e78c3a", + "0xc3dbaa1d46c2bfadf7b69d5930e00b3d2ee2f0e459310eb9414be6e7d8fdfbf2", + "0xabf64b834999a679f71fa66acc622afa69a45bdf0befe5c8e0224ee12cd3214d", + "0xf788f916838793b4efc5cc80d9f29f717b9a84e877773dd4791fd6a0c1cdfc56", + "0x289de39a57b30662c600ef8056dd354c67722e1fe198ec2bb749c2af77a27643", + "0x580829bdf1584a58d7da444d360dd552818dd1cfd5f7ff4323d21a0c13506b5f", + "0xba51c5ed86b5303e52a3b618f78614bc1640b1b145e87fe625b51ed80d31017a", + "0xeef60ce9f49954e62854e938873e556386b5045a57980bab45e6fbe6a6e9c657", + "0x655bfa2d02761722b8792ee69367dbf3103d16ed0d07f7f8ff6725dcb8f2d955", + "0xc7a54faf2898c69f76123fe1910bef9be9ecd77509ac74714218c9bb8b4204f0", + "0xf59ca122bb48dc6c0c577b04449bb64d7a1ff5661a016bf50e32005f3295b223", + "0xd96401f3f5031c1aceb13d9a3a0525b5bcb7afe47424a5b76e8381732e789a4d", + "0xc74fb4d8533d438c78710932c95500923716fdfa6625154320625465ee32f07d", + "0x63ba1efd6ee8de3b07dd2863eda5d46070f7eb02d35cf670f7b132e16a958bcb", + "0x61eea2352d91b206a674c4c2af59d8a2a0fa70479d77447e3ee9b7db85d353a8", + "0x04b60e8ed3b12a7fab29bb6a74ab7c9a33d403662c47e72227e7eab515f33618", + "0x9c229a533ba459b852dbce6d96bb72c03f9829b9a984119cc4e1c852992bd2f9", + "0x54695b023a34947fae5230256ba2b0905d3e28a28f02c2764f70495d71441a63", + "0x2c47d3759d9df5b9330e6836835939107269d70a7d465be651a3845e4a1903e1", + "0x5fb3708137f2cd39aefe87c67a6c4f9cb60a9945cfb769ea71d0dbb7f3ee8cba", + "0xacba51629f86d56e806aac1561bec11a697a05f6dd182ebdaa906ff77aee7abc", + "0x30ef858593f9a35889c8c036eda78d012e298cde4a3e7e603282b7f8130a4595", + "0x1c11971b18e9c870e513d099e5a49615e409a255725a61083001313a1d929658", + "0x9c6e3731ca9cee43af8c299c02eb49760141e74e1f781d1ba49b6815565f3ce4", + "0xb59c0d2e7c5ca751b9abf8b7740d8d5c8a6fb1799dd1d5a5e9f0ba75769fb2a0", + "0xafbe8a18d07a30f3ecdb907eb4cc05fdd8df2f9e4e91e61f88ab87dbcca25249", + "0x5233d2380755af7c385b5b50d79c5cd9b1255f0145a36245cc6dab7a86c0cbce", + "0x54520d2d08116f06e38d1a316e7e4080f3bd8c4e52b06f3ec20c3a5327f88adc", + "0xd36158eb493e04911fe79cdf4c48dd43a42aa3a23568c7a6b06afafd3ceb51fa", + "0x88a509ee3b2bcebe15ede2063f8fc9a04fe103a84551f279b6ce8d4d36d3b259", + "0xb1b80927c19a8cd540d126e07c52aec2206eaa37a13f2ab4726649d34357879e", + "0x83b1534ad48437dfc54412e49357b13528f0f80dcc32555a2b6f2391cedecbd9", + "0x13d00415b9888e8f64bd3110b04bd47125a96abfe52e0b6ec004c96e142eca1c", + "0x9e3b31cc2715b383eac51b52a3d912e22d3c1f23fa883028ace6a1e80b1c02c1", + "0xcbd325f1c10db1289d1c46feadabc59b24ffbeefbc4f242cecc3dc0dbe5c2e8d", + "0x7627582f663394f8284a6636bf024683547863409f38cb6ec4f67224eaeaa2b4", + "0xa4a44ba1e2badbb513cdd55fafbe2f5741caf2132dd46c602172711c110e41bd", + "0xc7612fd67e5d4bfcd14eb631181977f5b6737855721aa42bf4e9252dec190a53", + "0xbe3030a24be5db7244f04c43dbf419db3c7fde7e7a2f87951cc74df9b88a4071", + "0xab77045cc03cfb77d55f118f15b3416f8f118327e78ae4cc8a074b3c8550f992", + "0x0fccd266f83598b42b88c40c54670e3f2ab3a4c8bbcc0b4effec5ba92e0f26e1", + "0x5285dfd8a25356ebc198835359f53cb86608d1058a90b20980748eaf5efa2ac7", + "0x182bd336222d0cfa5fa9a0d8f4ca769e2d45829af50bc3a454193628e073b44c", + "0xf1a20eabf959a3c1135943378f31a69c049529785e0556a45450174237d8a2ff", + "0x69387452eb76800b6cb66231cf58dc180bae7aed04ab182dcc3845cb1abfee73", + "0x5136ee55850f0aacbc26fe7bcb58a74ea738ae6edc56bdced078297e8ae44087", + "0x37eb930540d64aaf250e003ad0c2274cd047eae6c28bb861bd880cb53aa972e1", + "0x82d64719d65ec1c1dcb0d269222b1acfe77326ee7d901c8bbc542b7696d98de0", + "0xfbbef382c42f25021b7b5787fe6ee0feb1e589310c615cf26642ae507f2e8e07", + "0xa2da021c8e8ac265fd7c181ca94b372375b3c297aab51811494c07a96536d4e1", + "0x7ca0d6023b41793f7a4dad7aa65428e43332f9fe40efb62c1e74253bf64a28f2", + "0xfbe923af0120629c5dc3c118350d1ae310844e0df4cb8ed48decd520fa7b38bc", + "0x3c7efb35e8c27c90cfc06a18160b34b772a5818cb79a1bf62b107ce93cdee33c", + "0xf59c8f80367b98738620c50a44cad556d73ce17a5cc1f403528d72a52fde5375", + "0x7173aafc1f35fc4eaaabb61d26f908a8d0d834252b951f5607a8cda0c97cd79d", + "0x7ccf293b0d2ab799ce9fc487187d61eef099801d8731fa21300bc1b166c11788", + "0x6ed0dde1a0e7bb58435bb525d897d1a9abaf03f235cceee32f3987e1863d94a5", + "0x5a5d21f5ae95355ccf41cbaad953150d3f1231de6df6650cc712cc57f77fb7d5", + "0x7731f59f98388e028b194d16478c9315050555889c30242a836e84e5f27aff60", + "0xfa682bb7f35f7a75c9490c074b1ef4c99afc50f1e32d829c057c765deb899638", + "0x10403d6937901a289c468f7eedfd69d38fea6c6b468f63bd7cb17cd8db4a22d6", + "0xc5ede1b02d3841558bd8ab6f51e14f5a4e6b00daa31f982874f0bad7132465a6", + "0xbf01b8033add1db5cd02633cf114492800816bf01ad4c7e060ae4c9ffe92c13c", + "0x72d22a8029386eb9c26dc3277e08676609385cc2f9addd4095fc1de0ca6bbb17", + "0xbb77dd7851cc4cc50551914a62c71f8b8e2ad7fcb700469a6b893810b7d71a69", + "0x6ffbe73f30d4dc914a859911afea236c9540920e5fc6ea35a5b15baced0c8d7b", + "0x2d06f3ac10ce2d780f52e9f8dcfeed80bed8c4fb628e8169290bf35b59fce156", + "0x1f6c2f6010356f6a37b0217433d7a1f5a2e0cf51c41b6ae6de4afb236fe4b5eb", + "0x011c13ffb7e71e32bbd4517b994856f6d21b7ecf43d117b8642cfaac37b9a8d7", + "0xe2613913bc4cd8dc69550d32163b251cb1e6ab37d65eb71b3aacd05713158157", + "0x54247c638b2b1fe4efaeb4eb101d5177c84c975c759ddb1ac20207341818c6f1", + "0x34fa5ed94aec05a24c812403ad050ccc96d7a052b0d9509cbbdf83503589e3f1", + "0xd4c86048683eecb1e595cf76988e76be819488421c56b96a6dd4641efddf4de3", + "0x541b476f9a0273fba6340f7185c2ce43333de04bdf3c1a7ed022edf4372b2d0d", + "0x65319f2394a1b531beb788f72246a6035539816c618867b0e1d0fa3baf318d38", + "0xcc6b6ebd1eb606210f5d03e191f303c1c4a438b9fd7b81f61c38da76a6bf9fe2", + "0x66c0dd3e062f95edbf9b26189a302e46ceb5cfedbbd50e43139bdbcfe9fa2b54", + "0x728f5ccd05bef6a64b639ff86642f71078719f442915496c430dcd17b437139e", + "0x85a856f40e911384e7a7a42fc5d9197e063bbb890a81382b4ca6ce2e78af2c77", + "0xc80aed20cda1826d775271f2160b6040682095e51d7deaad7405a2f1c801f980", + "0x95576e4497c07a1738d07bd468e65d251f9876c957d7efab7ab7ed0a6eb2c9b4", + "0xc30785c899138565d799884aa7bc486f1a803901b6b8b8b66eb6d97ca597d8bf", + "0x3990fd6682fee93631fa80ce6cfc68fa57e25850860d4d982d0945f72ad37f38", + "0xa136539e69b53ffb451c817c40776af735c95f3392d24d906b22c0e6c6114be5", + "0x8fdb4d50398d776ef876ce77547d4d9e1a4609be5432121ca1dba983ba07a28c", + "0xc7a547ac0db666820263a76b9f9adac876b972b22d6c8bac407ad6fa5c839987", + "0x87aa61ed60484044960beec4d9c45c9112e6e4a70cfec894d5a9f93f94060acb", + "0x50b05f8c5a72944787041204b8a8acb39faf179838116e04ee7bad4d6f21d4c6", + "0x8b90f04539dfb2aec48e0f7a47a1ec601af5414f3284074911eca3a3afc36e3b", + "0x3f9b8f28853028fbd3cb0bebf22a723907600bc2c616ac5251fff33b2df5e9b9", + "0xcd7153ad8c35638d23fb26282ab9361361fd23385ebb9693d8d628a75aec6c07", + "0x370788f25ab289cbd7f9a4b238bd35efb41917b771d8d59493a05aa7bcb3fa4d", + "0x942223044ff0bb9ae56f259006787e5ae6f21f46a3a2bf11c0e977fa60b50b7e", + "0x7dc0e910fa0a6d722dc78f17644842792e619d7e7c044ad47a5fa32583686e9a", + "0x669d80d664251cffc5c7289ae2195a0cbc6fcc732c2af1bf429a4aa98c889520", + "0xd6d24bd4d8a639ac36b14c6d8599ee8ef5d84ab71dd7e6ab829b730d930ce924", + "0xba692b11b9febad8099415d1c0761f2a339328e598d9e04533103afac8c04dbe", + "0x8e9f7d1c6c2674b3139ff88faffe8339e45d72212234b4531654accd66ee3d4e", + "0x2589b94b36fec67b5862871758f86c2773a963197b0d7ba9984427da3b4d6042", + "0xb7d1c1c35718c23dd4498571bb0f4727f3ebb0e1cd02d8094f4713fc0e858894", + "0xe222068e575041014f38e20a85ef1e989e9bb05279281c59569a627769b9d7f8", + "0xb0746c8dbf22e4fcf025fe5383fba7865fd02f79a4403d89753052bb9118e3ed", + "0xbccfcf626a8e36b6eecbadad1870358088b3e584ce79741bf5167380e97f5e9c", + "0x6215dd20373041734291e4dcac34b207235a5d19c3bd24359168d75778b6dd5d", + "0x025f64d258d97752e9b648e956d114c8defccb80c8810113a3522a77ef3f7d35", + "0xc00ffb03dc524d1ea1984eecfb8d26d860791cdde35c8b262faab927891e3fef", + "0x4ec39fa070e38fb24c41af52ae2ac640a859c61c96661d24e53c817228863abb", + "0x7d943dbec346b6bf55c226cae23ee23086185d9377fad511103bfdda3d677ddb", + "0xbfb16c7a87172cc804008bced344dd6c1105a7f0e925f3b7335b6b4d7c8def25", + "0x359acc4a540fb3b54fe22d81f1e3c1b969a99129e130e9e4e24481d024cc81fd", + "0x33091ed3e9f0e50c8c9aa100d9615e8523d594a99095e83863a58cf54332edc6", + "0x5eeb88207a02fe01699c8796b66ad3a0827432559690bf42e76ce1c7f23c0b30", + "0xf5a521239d0f969c8b5c372b84f739af314645de36efd1190f92973c0a2f9098", + "0x1a634f2d829a24589a25a01a22b139b8342c7aad990a14b5e30715d2a83074ce", + "0xc5f62552f5e25ce475af7eea51eba85991c59b73da75eaaccc3e5571b58a6372", + "0x9fb29bce2aff82c7d3eceb134cb1d5c6e6b309b8a9be5d239e6c6dbe231fca32", + "0xac3e3a2edae826437228f39859aea596a84253070a5e442e04adfd5504b9a108", + "0x717d4b6b147ee5eb42baed2a926241dbaed7e6426aae40972488c08430659d20", + "0xe18c4e7cec87f2e53f1e10683835563bb05e182596fd5252017efdf7d29411cd", + "0x6ddc0db9f04fe0b7f8417507afe16b59479303b5473563723b390149a5f09b2c", + "0xfbb88e97efd86e451817b13e55fe3d310edcb302607127808ffb350799631ccf", + "0x5f61ece4f330c3eb3647d2cf9ceb4f3cf238a324bfff628257ac4aa1de7f1663", + "0xa2a3bd77e36c3ede311ef3fe330e4a2b22dd41313ff4ff6347f629777a88377e", + "0xbed3c97e0d2dc6e56006bcbdeb007c8b63e060d80f46b691d38485b03c17c791", + "0xa4e4b8d8922741c5a767d9c4dd71f9d850231d298a5b5ae741397fd065600a52", + "0x0f49e95e5812f573c00dcab19683c391996beacf61442e52a9c240f08f8ab92c", + "0x3701c4ca890dba3cd43fa3b506cb3d9ce540e87c493c6cb9e80bfe05ec5cd255", + "0x785e2c2e4652a9dbc413c4b7bd54dc8c103f6c933eb9ec41ca44e609cf7e0bd5", + "0x7859e4bfa55b11274bb0e91f608c6d840b7de4385ce8158cc08b38449a61213f", + "0x64221410a8e57fa61ee9d1ea1b5ac161face63a493dc7b0da0f398c0d18b6174", + "0xabeeb213fab38140a8e66b41664626f3ffd831b91e83f3cb7d4f2f09a0b73e5a", + "0x8bc1b2eebc3481e54df34a5f0229a54264ac518dd36f994bbd162442fe1190c4", + "0xeb0753b5fe8706efe7224f354cd92381960212ce4d448d3ba554450a66bb5e7c", + "0x30f73d3082f6ce7f9ece8dc9d6c78610babeb05854415279d615eb24d0d10962", + "0x4bdbb7c38040b9f623b67409d8890070fd5d6f89f023556f2bbee1f40f55056c", + "0x18ff647cfbae0ee093bf85bbbe218802afecd7f45bde5dc29c0c76420311f5de", + "0xdf91143a55752eec775c6c02464a781e16c8e93a4270ebe1bf2127658adeb5a4", + "0x64ba37e403fe57a42440bd2fddc1e301297846f69df5990c2d664d3734f902c2", + "0x2f70192df5b8359e851856351ebe2b0888b1c51ce802766f16ea2cf8b723004d", + "0xa5ebf72bbf06ea040306715900f6bd06564887b52e4692333f880e38acc40b0e", + "0x3b86d989319b0c910e74a79b2177efa068d8601b9889b5e3d17d57c59c6a2238", + "0x1e416fb3c47d77206efcabafdfd3fbd0919e7e6d158ccfddf1d0a2a7cff6a37c", + "0x3db2b1eb730ce08d44e27585207b39d5f8dffe7425949fce9e6e1a4f296c6e75", + "0xf703aca3c59fb4e102018a6b156a83af6c93baaa96c54d9a44485a5b90ff6679", + "0xa103f504db51472ce4d6735684bbf46259e04224d42fbbb87548eeb01aabcaec", + "0x282e099b561c70a9a1a3ff6a4518970deac9a096563e15c01151c0c37f78f737", + "0x87bf6fc28f774c2f6bc83f32751e0d509a2e009e2e3dcbce44db2697dab33520", + "0x97d109285466d0d40ed47f6e1c8e11259e69b90b02731a4c25efff829e9c7e71", + "0x18232c1bca21707fe7b74896e3b1568f88094adcc51b4ad9a29a4c76ca33063f", + "0xc230723357dbd10e7e57ab187d1a1f72a27a53c45b650020cffe672fa8e156ca", + "0x6984c028091bbcf3e40bdb8da39d81d2c9f8a73801276ce3644fcf57cfd3e8d0", + "0x8b66e1d6d3d60f03098f29d9f9857a29ae48a5a34d43786a8fe64e6227ee2da6", + "0x353c9a58633a1fc28b5acf9a0f40e69fdd48252c689a9b8db7610c3d003d5441", + "0x1e020c7d1997e15baddb02742e8846228e4eecb6bb1beafc81a759b95783e238", + "0x50e9738978bafa44eff6b9ad9d344efdf40f7ace0dcb146e2c758cb7b3ca05e7", + "0xec6ca85b0c27f1735eb0822dfe5a0d4e642776e2945a9a22e104b9caed098f11", + "0x94f749840d03dfc1d1cc7f31070a1019cceb1eb36a09f520129457057885fb48", + "0xd29d8d19a1dceb08208369498527ccb0fd4aae41077d4c01c715e6989d5f828e", + "0x40b5cc4710284f1175ce67c1a0f134288428d8ea28f64f41fd061a3a4b139242", + "0x7ea68209ad947c37eb3ff8c779ba7f5f3efaad2d61edca2ae5efef666d7c1f5c", + "0x0af74db9e9195f27f1a04acc3150d6d6200a5f50be63a6dc2fa9acb953759517", + "0xd7a6b221519266e935b12a864c84c6d7daf4e4c8c812a93515ea8325e94f2644", + "0x041fd7dff3672a07a2922226bb0526daf0817fcc61cbde7fd3e1f8efa8dd6c76", + "0x79fe74fe4e56514072881413ba7157cc125051476d42fc9361a58021268ff0d0", + "0x01cfb41ca5887931cb98c347c25d6c03eb5e992fd661085307245dc77cfccc42", + "0xa1e93426afb5ef56a564ebfacfc52149e293c25dd36dcc2319d1ee50057eba41", + "0x6a8e8e62cd387ea56c621a5e085daaeb51003e86fc3c252d115ad417e2e79242", + "0x18e5d5dad6f00c36be4ea9c7898645611887a3c3310b97363699178136989527", + "0x6701bc914e70bced06487f22a16792fe3dff4f1fd15ab87ad42dc91de3cc951e", + "0x75161e0ea68a78e4377837bab6162f1b6d53cc5dd76c423acba9bde4f3ff356e", + "0x9d9ea2b7caf0b67dd97b62f0e25d172f78c984baf97ae3851e52e26c5af87770", + "0x4257fe5a910db425844b2edc8badb4977c819a3c40e356d260b93fd2f9170bc3", + "0xf2c878a894811bd844c30441bf38cfe79f3ede5b0574721f32a24755c40aeaaf", + "0xd45e12f2f3a025090fa81bd95e555c8787c26849410f96aa172d3dd153b40a67", + "0x6204243276bb752e5e2d77fc43cf7c5cc92078c283c4d489b7310ea2753ed71e", + "0x806a0a9e0f4e744b02b5091f72f57377a4d7bbbb27829789070967d35fbee325", + "0x13489b922a69fe05869130674253f90b4f883b199f01cd03c85df0a000e1717f", + "0x4fa87d7ead2b1789c72908523c5aa6ef83b7d9559f5c5edb506b4c2f681b617c", + "0x4bad3e31f50fd2dc570c31bd547d278b92e5c93a7d971c38035c09ec5a1dad84", + "0xa0f547806d376b76b33266d94e7d2ef86584a234b540e74f79756e0331405c61", + "0x4bab9342aed359dbce241e580b46043b160a01e44eb62bc29ee5ac413b8a7ad8", + "0xc7ff1b8f8557acccfaf4dd37d13a12e3f9d0e3612398c3d8b1d675467fca56de", + "0xb412685d085b0d52c72ca3d9987cc188f930f759022f060d5f2f368e77a7767e", + "0x0775a447ddac0050f5cb29e08fca1e7d016b42c882ee15bfbae3de5dd99b6705", + "0x1d33342e6115ca2919ad6d31fcea9f4a9fda5dfadfdb4e206e464ac44e59e178", + "0x26dd97156aa189d9f3c799e943f50ad13c2d0cc8018b054af65eb37f5caa76c1", + "0xc4daf50db81c04055bfeba3534a48af718695e2789aead7c3fea58b064bc86d7", + "0x87e2b037cdf4370ece9a2e4a54329d3e1be0b910af6da8c3850ac75d6ba34920", + "0x1b8fd79a76b40690a3bd1bde5cd3b68b36148eb951f45b798958777527a876d4", + "0x63ef67d88acd91fa005706dc9912991ecaa81cc7334ec367340a2c12147cbfad", + "0xe20cf7a6540722b3062b9f49dde601f210aa8cddb5b5ea65eb7bf44f53ce9d5c", + "0x05b5daade0670fddf401298414b70656294b8c5d3203ef7e21536ab2696195c0", + "0x678791e0898a0fd0dff39cdf16d298162200ab1d93beb96ecbf9e9a664362b9c", + "0x77698208c576cf9f2696280872c6f2938595ae522b37c2b8dc5b60b83ce7a9cc", + "0xe9453e5ae3e39110b65b03dca160f930f39e933ecca604f7b1d9db0f3d4e3915", + "0xf3d84caea9ee5dffd395c7da7131456174cba99f905eb734c0df1e070c16d359", + "0x3b56c6cb8308bfe1d9339e14c713eebd5830cd0c538b196d18743bfb729878d2", + "0xd0a1ed8e3bba6cd1ab36ae3e60952e6ae56cf2157039ef2f7136e09999393650", + "0x206a0bc96ac96836c5230d024aab5c7733e4c769b7cfa9fe4c52ec9ccc2c9ecc", + "0x322a0aae92f406bc6c08dfda0b60f625716af5dadfec8d014c6f863eb33c2edc", + "0x701f25bc99f297ac9e8a8e5d8c376f9a363ba277ec87d2eefe30833035657e23", + "0x98ee55ecb672b58e5d02ac83f716013b2e5ad57894383e792cf1bd82cb47b20f", + "0xd7c63ead8a31b5b188fbf0663e4bca087035291834ee1380da270bc26bd19186", + "0xce3824ed345e2101fe30f43287f428c2cdab4a9ee2b4a047d4c6ba1b46a05c98", + "0x853eb9e976bc0fb95caf99b60c978056b0423f2455e5433f3b9d6d28e8ddaec9", + "0x2fefc2d9f5d26e0e9893b98d6546f593dec46105109fbec9c0efb298dd18e534", + "0x255bfda7bb1a2df1a36e7ebc4414338928d59474d9b33f478dab6066275896bc", + "0x678516c205b1f93ddc8d3558e86ccc9ed5dc317387f4a7849ef158e7759234e5", + "0x58d0e9d13bb841286dc4c579c11cfd659b70e84aab4550a75d1d8f01d31c0b64", + "0xb132975005aac90edeba73c75a8533cb9099a5a7f6e9e31755a22b44289bd950", + "0x77ba37c64ec1db20a6dfad1462bc4cb5d49cae6e3c801a99e223e6062dda2598", + "0xe3a4d6edfccad2c55d2a729e6531cc9c20d668dd057c3a8bce78dc7789384d9f", + "0xf419bd76337344144a1e3f1e7a8d3f768fa97f4f1be87757e3f2e50c78c7ab14", + "0xac248be7b1b0f85f35415e09025f379bfbb02776e854d682bfc93caba3a0cbb3", + "0xd853df355a1b6f7b6921870bc5a00a615d5fbdbd9c5214e57e0461a00af92711", + "0x3696d847c84ecdbe2902eb3200013d332d364c0be47f67cc122bd7d4d644f08b", + "0x843a93026d2075704e731fec65fbef6a234eb6d2368f7da29e8e2d3cae45fc3a", + "0x923e0d97b13c9ff4e051cc43daa92960ec646236d1b02faf28902c5067cf83ef", + "0x4a700c31d34448662af972353f9cb471fd155b6c7b5c0afec7acc09e58ee85f6", + "0x2cf612c948d6d8a6ea9886270d5de1e131c2dfd4012f1811849c332716ca650a", + "0xd9acf143ada3cb5e1eb8c3d14b4c188bfce9efc13d317822dc406e08cb5ad9de", + "0x55b3ab14f3d1c8c7b8660a136c98cb4dbd90f8ee329c1fd08edd612a5b866428", + "0xd07432a9b77607da1fe30c98226a224c171cfabf96a1510849255a58f7040595", + "0xe12a4928faffabff9d4835598e103b6079f359061175ccd18159a6dfa7ece183", + "0xa223cb9afb71fbe269c1f721c22fcb13addb8ec06286f9d5b7e337a262c99104", + "0xc133b48eb3f4946ffec9fa143a85d2e009a3b8a99a68ed1d0121c7e9fa616fb9", + "0xcd63f76df5da2994fd87c43f743cd7d35d94cb8dc973cb7a120cb677db9cd5b0", + "0xde86817e4351951cf1b6402036bea2c75901b6aa7a6dff62b9862fe4783e801a", + "0x2872145a9ea250731bbfdbda0b66367300d88f2d9934c6b1d12960067d717bd3", + "0x86e0674ddc6c584cec7931847ec5283675445d337a89d19047817e46e9047d22", + "0x4aac4bdc309bbbcd210b87b0f50d55fe86f5db69b83e201f156bc9ad25347966", + "0x1c0e32260f903386af7e4cf14ef819fb1245d269d2713faa729f05b019445243", + "0x919711d6689630bb81d59ad2c75ace09b462625180ee8fb8fa2d3ac5aa15540b", + "0x231f8566ebd8ac13f2d6cd5a91566aba9074ffd235c762c26280e52feb5ee4c3", + "0xd5df310c108bbf4dcd5f876e0290c5d9c9c2cf20f4f979bc74d962d7da99a777", + "0x45e6ea115a13d30d8dec6f480a9d0b17cb9288f3d2590af02a40bf3dedf3f1ae", + "0xd9930c2a8d4dfd36b70207175e3ec5386fe91371e4b7fb484022e64b5aa8388b", + "0x529278e0e137a319d3a7516b41bcf4be1390e5646fd74fa8c6ece03b9e734deb", + "0x471c07b4e2c5760ad10759fc0889fafda85c2367f2a9147667ad61b687a52fe9", + "0x39332fd9e3c9c89f6b51e4a5fc43d8da10191d07e71c35383e5bafb997c651fe", + "0x72b4753dfe94ecc08b1ca90329dae352e677b64d3e28281b88765cb2e7e3e428", + "0x9a3d06d9134005224fd1f71f14bdda085f18824b9c86b3ec6254b213d8e349fe", + "0x9e8a68163e7e0d096cb822d73c420324ac7416731b27407d74059903c05f2862", + "0x292c607845fdbec84efa2321bdbda9864c3e7e543890fbedf1b85fa4b7ea6b7e", + "0x31be5706424ae91ed9695b2f8f7cb0a81b7623e02da8595f0affd2411170ea11", + "0x9331ce0a7339609a1a4ab7d82e41f432c430685dc6aae81c50ce18aa0592b465", + "0x37dfd9817be661b6f7310ae6c90b3b97fb5f63e0e622618ecedca0d609c39e35", + "0xa350f656a9cf101ba47b0fa109409f1113ae33405ed766d0308740d5497237cf", + "0x272d62080e7b1c27f7134c60ac9f0dd9c903528b1a32338ddc8fc199d9ff2bd6", + "0x8903ab21a203161e433cbfaf719a95b1fae95e029ee19f0c94fa7f1a68f3a1fc", + "0xd3ba92c896627745c0afbbbc9e3d8b5a1511057b24817d7070e08308812f7ce3", + "0x703ec0121dc8e020de0dce30459da694fb8b7ead68bf5b052320c97b0edff1dc", + "0x0491cb350e466467a1078436a1100a70ed6198122f299b4bcbcf8dbac4b1cbe3", + "0x826cc32fd3097689638c8701164358719b6c8645270b70abfc0b07e103d5403d", + "0x351679f35e52895312c8524262a6e420544b443ca3eee81cc11a11c4e40b195d", + "0x0fb18a66d08f29e90c1a71a648d1b36c2dd3fb84bd2e4b8ac24959233cb7a244", + "0xec7fad9848cdb994996bb9fb63cae6e913fe90c9727ba49ab8c9d293b692237b", + "0xd76f7d686c80c1ef3387ff50925bcb540084d3e8d750a862e76e9dce7a443d40", + "0xfa237f1a2b3dd6e4c646d7c77982558af1633cb8662e1d107d5ad5140ec86024", + "0xe7b5e487328a3398b8716043d3e6bcfb39a996405daa98be49493e46e9a46555", + "0x306c41368e9d1a13d4d20256602c4d4182e45b2b69549be7c7133e01dc930057", + "0x9551a36f384e66ad7c5a7d43f510480448f59fc2b3414cb2dafa8d71314ea4fb", + "0x72c3b4a7c21c0ead562b66abb8e6ac42ab96fc5d01c8a5f934df2393b03b738c", + "0x849f7030b271894fd605067a59e373d903a6a52e9fded2357c05340138d3de1b", + "0x5be66687e522cce14e119c9d4b3b3853fef6cadaff6f6c5c2eaef9b6769b1fef", + "0xe063a6dcd767abe2a9e37d3f18b67e2a2efd68ad4d96b4215eb75e4b23295afc", + "0xa8f6fbac9f159d5a5db1e8d614dbd3302bd5737eeae692ae44155d26637ceb4e", + "0xed37085b1ea6b01638a3a145297f390b63b307479e88c55908fcb46afa1e5960", + "0xd963204f34b83d30e97b458148d7e3cd0143495ff67d893b512d7beb7b225035", + "0xdcf4fdc30c4e90b82c2894b12cf27c2c9ca9e4e5ee88d6052d3526a96b93c55c", + "0x48ae98a481df3d2ec8a9c90d0a838125a5237d5716617d4be50d09b2f1f2f592", + "0xf85cea1c73ca422200a9b41a19fec626d13d70e0ae20dbf8c5db66977091e2f8", + "0xbaa3273782c55be478f5e44af8d6d32771bf837002231621eb82fd5b8c07b519", + "0x1dc0a7713568a6fcad865704e07a405a44c2b0096354115f07af09b760eb9a09", + "0xfa70563c38634999282cde0e088e97953e2d8a81180f5c9b2e99ad74493cebf8", + "0x58c7a37a105fe671a833f01f6c189c6f3204d462a0e119b494b6b0c8bd97501d", + "0x9ad437c83bbe3a45191b5c9fca239d1993960a8316e3c52978c266cbfb4d0ed8", + "0x0e8ce8c69bda4ff65d9bd614bb827def7d0f6bce5d550ed72bd5d91c8c1e33ce", + "0x74e04e71ea4c189be803be1116781a66cdfcc50a067387af6d1d468733185b14", + "0x9d1eeeaa2b39e1e0cc9717e921507d34f35faea1450727825d147ecefcf70464", + "0x6758482ad61721f92137d015d4d07bb238b0976bf14a3c548adbbdbba6b73f00", + "0x794c1b2f6ae68389c51761edde1c96b8bd44904769e85a8d7d0035e76be9f13d", + "0xaafd63d0587a40d5b73ba230c976ca80c46a09e3b7f7df136f8eb0b04b60f5de", + "0x67d184707f6e0b9af49aedbfca464946b4f54321c4eaf3263d4ce52de31f8767", + "0xd2af9a84d73ef353c42517a6c5c0667b1f811ce2bb327e3702b49a178fb94179", + "0x2832ef9283d9ffedb03743b454894472eb31740487ce89ef016a00819ff30c2a", + "0x82ea0cb0f3eb68ead50a1d8106278f464e0126c0d7589e6d4c16142d80989194", + "0xfbdc8b5fbb0109cfb3a3b03e01c90c37cb4ee7781563026c338f455ea708058f", + "0xcc34701c30d0ced752f863fbe56d47abfec0c9f8012d1fccacf3814e5bb824af", + "0xb0cdfcf55823aa634004387d1dbc34246921ca0459cf4b9f751377e3a78ee041", + "0x313e6f0cc985a8a0eb2fcb8d3901fcfecbb7d29e98ef8145996e4cea804420c1", + "0xa64f1d4794cd286788c281b14adaa6c0890f9782ec0d80448b8fef906ed7bbc9", + "0x619d70b2e48cc3b295add6bfbb8fc60f38a01e61f4dfb4872b58c1ce7046efb0", + "0xdb35cea33ddc36b0b91b0dcd84155e214a738cc81c8805127c47fb7312257299", + "0xe101f36ff5b89d028618d46138aed3d6b3269605cbf4f83d68c9bbf233f63d81", + "0xe5925c839b60da70be28b38b2081701e3bb0be98cf763539114609b309c5f97f", + "0xb594135c1794da9f7b7af1366d56b4527223c0471ee3780d65cc03cd70fe2391", + "0xd6a8a3b4c6d33bca9b02b8207aa680835266d9c9d4808e2d57f28f92936b7d01", + "0x640a50f666edfa0c4cc55b6c945a09108fdd53af5ca55ae92de4245d56d5e436", + "0x8dc9acbbf2b71953327924fc2cc711574fb1e82a6746a3606a71071369e77601", + "0xd764b84ee9d6a552e34252322f7a939ae546281136a217f5f7f34e41997e677f", + "0x3ec87053d8ec66bf2449a17989721644050b2341adf9036df6843a414a9a1de0", + "0xdca7784726ae438b274f4a3c5892da0bc69ea694791c1ffb5398683952bdea75", + "0x29114fc2dc70ec997d34e3937c2e54136fd1de4ba7fce8353e19af65aef490b1", + "0xf1407df809e1bb932c725821347954eecc9e5e226cd37b6058b45ef9f4fbd377", + "0x873826f03bea4b73698a17d2b0044f1c689daa17925302edb0f815dbf50c7fec", + "0x3e98eaefd07ff2f1f4d6c67aa7ee3cabffd701aa0150f572521a17772bfd8d01", + "0xf44be55471f0b66b065a2465a04f6f47efb35a9ede93a9d8b22aa26d3c6637e0", + "0xb114c762f1f60a913fa570cdb207c279d20abdfd789d7fa62de06e38c44d650e", + "0x6f300baf19fff0f5af714e63ec81314d7de839d4f5900979cc9761e0ac325956", + "0x94d99e9025cec968ce5a80d82965bf72db62250c49131b14c0329b0aaa462b79", + "0xf1ad3dc366363b5a7c2a238e693600ced352984673cc4d0a07ba0ddc2b25c815", + "0xa48dc388a5dcbbd81e38b3e77178a4248232ffeb23acd7869375323f1aba0529", + "0xe995c7008184fe2d5b39eb0b1229caceccc8e86ef5caaa720f15e133e79a2efa", + "0x8bc6d112254905a89fdc319bc231f4d2c52a22d60baea4a499da91119a6872d4", + "0x16cceba4d6c7ccffe424c9331a78bc3748aa7b629f0fefe88c43dad9324a1fc4", + "0x564aceef2d2c0d4b8d6f73c10c234dd82570a9caeb572dfdf023024b61365f4c", + "0x5630bfb3fbd9625f2204846fc81b98774e95191dc8f7995ef33df915f77ce2d5", + "0x23d02e3cb1729ee715fe84775b969989d11c4ccd470910921b75c63c4e9e24b1", + "0x5984c5d4ed0af67154b12c73e38909b45e46e161d85d66e286d33b5ced150a75", + "0xddfc15bdbbd16b80d442f9a0587da4e304d3d7951ada0dc3d041f5a1df85a9ae", + "0x924c83566150cfdd60410c400078830bb4742b7286a6f8badd3e848a5afd0220", + "0x82847029234edd5c2f1538a71ff2eccf1de43e94f651557ba73caab59ef9faf3", + "0x15949ae538f10280406ebf73fd79fe0e77e937f82cd9d0c623e700ff04fa0a7e", + "0xd93edfcb2fb0c16e18b5c42acb751ff197ebee6ef13e01690b08f8e38e777e08", + "0xcb33ce0679bc3b417095cdecd66cbdd4cf5bfd288037d57e93cb6a542613c06b", + "0xa678db01074492af055c36dcee385b37166ad08a4481309945d227640ece520b", + "0x30b123bd31dab5f0dc65766e2b6067e5caee8a53af647b0c7d35d16ab85b2ee3", + "0xfc3faacebfc2c0ed22820eb332bb2f3d9634abc98d26fd42438276541f2beb86", + "0xa0d90324e7577ab7ab5f9667f9d7a0731d223f8edae77dcc9e38225b0206ba29", + "0x75e3bd20d6378133c8a4f9d0ad1121c485130d65340b0596258466fbc733d61b", + "0xbaef6a6c8b335cd317631b907f692cccdd730c82213755988ff7fb78d08fa754", + "0x03c32b933280b801ee17ade93600bed888caf283e0a058bfc0c73f47072f2459", + "0xabc98360fccd9567e9d555924bd815557cd5612836de1b38b63828db742ac297", + "0xdc6770ceead9f41fe0fabf046cfaf0be83f6c27bf28616a97d58c43e3f591ea3", + "0x4f9a91b13c9af1523071f1d4741ead5b6c7a9e72bc2881ede8309040b8ab686c", + "0x175c7e494c7f0347ffed5ce74eafcede61403cd0829d71a9df99e914774ff33d", + "0xe408f526449bec877c0d5ed25e677e8623ea68b797818b93e443179c9ed4d334", + "0x8f3346b57ad4a5de31df1b0b5fb5cac40ef0152fb5360d50ddc84752beae5965", + "0x4b2398450d192781d3ad48ed398fe7cf9e5e8a417b29661894c6dd43e83e2248", + "0xe94177ce0fc04293688209ff52cf53c548ac5b7022e7e60ee739f5c1711099a0", + "0xee6e5c8a30380746df8d9d3f3de53439fe0d864dab6ab5c349012d384284fac5", + "0x9fc9e919898303f537988a6695329143a77e965802be3566396f7a581962c3de", + "0x5277cff2542cb90c1698c7e673b7ceafd16cf4d0750272ebb51e3aa3fb02f3f4", + "0xea07718095d00493c662b21d0dff8bf747783c93897f6f2421571e2c7e3e8955", + "0xa8bfbfcb73a903d2937025226b38aefcfccbb3f9d3fcb0563ede2d9f1cd8ed84", + "0x795af85d146f9e00cfc5d12c97efa5073f19977afeae31c636cb3a6c9771ba14", + "0x60d169884296b60a45cc87beb366a513a6bb7ac34e6acf6066d9abbb1bb3844e", + "0xd256c59553a03c8069aa3dab431c2868c6dee246fcdaa9683b0284d462ad3fb0", + "0x1a399a1ffe8e7f5eb5fa69e70a620e1b15087988934a754a468ff47a7c2f8add", + "0x25cfa588df60eb1127c4057ba949004ef8f7f2681e435fba925f4bf8ce0eb54a", + "0x282d5589c98668c7a9baf871dbd48a3a8c263ea55452086ebdb3b4db440fb9fc", + "0xdd3cfdffe34633d189d9bea7513b890b6d54c2c0d12067d8f45ae72c258c77b4", + "0xc81f96420ae777252b04116d14bb80762c5169b73abad2e1fb23e8bb9334c2bf", + "0x88bf1fb814490289ecdd3d411134d42155a483b7225a496f24ef29d84df164ea", + "0xc6f0b78237824d0b240b8dcf1e31e75e93b4608a495fb7d47ed47ac70caa5aa3", + "0x10f4272adf03ae39311b049b460dce8579b424d3c169101a80aff74efc018846", + "0x52a6ed4acdf0766fc0a63b221d113e3dc7f9e22435d734972e3facdfb3447a8e", + "0xeb75f393b00cbceeace53bff0725e0fa3382e367450fc1c7f0005bb859467d62", + "0xd58b7c94861e7822f924356cf808c0b6ba19c100e49cd8a1fe2ca8a537bb20b5", + "0xd355030bcb4e35157543fafe7f204040ef0e0ecbd60bfbdb897add425112be2f", + "0xbe3ca964fb22fdb9c6c74f07381dabca0e932310cb88676144cd78cb374416c6", + "0x6417c82c4fa9ec681e767a8b3a26640d72c61ea72b1857bd61930187a54f08c5", + "0x0501ac461bf7f2e813ff8b58fb9ba936abe7eb0dc6ef0072f98c52f83458765b", + "0x6ed677008e96476990029e1ac8a86e4d9af83f812dc73d9b876c772c2beb5a77", + "0x9c35dd84c1d73d78dd3277d96ce4c76beac8c6bab498a8a5853970a03026b2c6", + "0xbb0b70d3be3239ac17b3689d67571c12318b51bc6811dea5e8908393d9a567e8", + "0xbfcc8fb9be4c41f8b26214e8462320e79c2fc126abd6e129f701b27b9ac96711", + "0x18bbf70cfc61152ffc64fa6bd21011e446f9d8d1798076e8841cecdbb2e25ccd", + "0x6ec57e3b3b13f8e3fc9298760ea47907c9e08b89bb7599c5cc50c83157a5b12d", + "0x1e681fa5a5d2d63ac23f45cc30720c5b33a3417ef0adccb10b9d9299f5dfdd15", + "0x63397c3ea42e3ea7dabaec5f3aa3cf7e15a4ff94ec745228c0b099928c2a5f1f", + "0xc8d14199fa6b134b84c48a44b9ef1962a9d08b34dbe78713f84ebc0d307c38fe", + "0x4dc0102f265b0e29cb403b258cfee5c73afb843b0805c9218bea86cc12a08503", + "0x4acb64d573cef699cb2d9036488a28bdb3d68a0d294d04c92cd198d42bb48098", + "0x872df3af6d40c5beadf565ea8f6cc502edcde941c43cd3024c812b2cbc33eaf0", + "0xaa24ebf00a407b1ee7e126cb5f396a1b4489577f160a7ec735e0e47fbf077abf", + "0x15e6c3ebacccecb59426bcab8f5845a60a584a18d5f6875431181a816d5dc0e1", + "0x3ae0bd8b42433be46a280335444e8e2d35c1afec926cd2c1d5ea537992c506f1", + "0x1e423a88a245221c826586cc67ea45dfea247c3e9a36c81ae9f0c0b5d5d3e5d8", + "0x5401f93723132c737589b457216dbf231a753c4c4619444af4eae9bc6153ee40", + "0x70d9a2787990c3dd8166357ab21985abc81a55eb0d50af7e19ec20454b314d4d", + "0x4ab7adbe2f74ac269840ae607a17824e8ec74054fae9d9b3998dfb162962e1a0", + "0x91fabfea828408eb161ac781a0896155ccf7d9cbefc3483cde52b35ec67883e9", + "0xaff4547e50acac2e3851620e541e96d7645682f225400793ebc0b959c6a09a01", + "0x0937506d4c9e37d57560bac5851795d6559e51df255ea2c64f2e119b88cc7511", + "0x88d66c613582fcf6df46773a1456304c4c0eddc212612b2dddab065b6051c8cf", + "0x2d6315542c9b30c8984ca951ab488906c78e6c84aec2090397d4a61ef26375b9", + "0x8ca8d613a382711420966787bf7bd541f517733d21ac4f893c282dd930f69b5e" + ] + }, "nodes": [ "enode://e809c4a2fec7daed400e5e28564e23693b23b2cc5a019b612505631bbe7b9ccf709c1796d2a3d29ef2b045f210caf51e3c4f5b6d3587d43ad5d6397526fa6179@174.112.32.157:30303", "enode://6e538e7c1280f0a31ff08b382db5302480f775480b8e68f8febca0ceff81e4b19153c6f8bf60313b93bef2cc34d34e1df41317de0ce613a201d1660a788a03e2@52.206.67.235:30303", -- GitLab From f826ac35e32c20f667101ad4eed7c84c745ef088 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Sun, 15 Jul 2018 11:01:47 +0200 Subject: [PATCH 141/191] Removed redundant struct bounds and unnecessary data copying (#9096) * Removed redundant struct bounds and unnecessary data copying * Updated docs, removed redundant bindings --- ethcore/src/block.rs | 81 ++++++++++++++++++++++-------------- ethcore/src/client/client.rs | 27 +++++------- ethcore/src/test_helpers.rs | 2 +- ethcore/src/tests/trace.rs | 4 +- util/using_queue/src/lib.rs | 10 ++--- 5 files changed, 68 insertions(+), 56 deletions(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index ba21cb4176..43400895f8 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -14,7 +14,22 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -//! Blockchain block. +//! Base data structure of this module is `Block`. +//! +//! Blocks can be produced by a local node or they may be received from the network. +//! +//! To create a block locally, we start with an `OpenBlock`. This block is mutable +//! and can be appended to with transactions and uncles. +//! +//! When ready, `OpenBlock` can be closed and turned into a `ClosedBlock`. A `ClosedBlock` can +//! be reopend again by a miner under certain circumstances. On block close, state commit is +//! performed. +//! +//! `LockedBlock` is a version of a `ClosedBlock` that cannot be reopened. It can be sealed +//! using an engine. +//! +//! `ExecutedBlock` is an underlaying data structure used by all structs above to store block +//! related info. use std::cmp; use std::collections::HashSet; @@ -85,16 +100,26 @@ impl Decodable for Block { /// An internal type for a block's common elements. #[derive(Clone)] pub struct ExecutedBlock { - header: Header, - transactions: Vec, - uncles: Vec
, - receipts: Vec, - transactions_set: HashSet, - state: State, - traces: Tracing, - last_hashes: Arc, - is_finalized: bool, - metadata: Option>, + /// Executed block header. + pub header: Header, + /// Executed transactions. + pub transactions: Vec, + /// Uncles. + pub uncles: Vec
, + /// Transaction receipts. + pub receipts: Vec, + /// Hashes of already executed transactions. + pub transactions_set: HashSet, + /// Underlaying state. + pub state: State, + /// Transaction traces. + pub traces: Tracing, + /// Hashes of last 256 blocks. + pub last_hashes: Arc, + /// Finalization flag. + pub is_finalized: bool, + /// Block metadata. + pub metadata: Option>, } impl ExecutedBlock { @@ -169,20 +194,14 @@ pub trait IsBlock { /// Get all information on receipts in this block. fn receipts(&self) -> &[Receipt] { &self.block().receipts } - /// Get all information concerning transaction tracing in this block. - fn traces(&self) -> &Tracing { &self.block().traces } - /// Get all uncles in this block. fn uncles(&self) -> &[Header] { &self.block().uncles } - - /// Get tracing enabled flag for this block. - fn tracing_enabled(&self) -> bool { self.block().traces.is_enabled() } } -/// Trait for a object that has a state database. +/// Trait for an object that owns an `ExecutedBlock` pub trait Drain { - /// Drop this object and return the underlying database. - fn drain(self) -> StateDB; + /// Returns `ExecutedBlock` + fn drain(self) -> ExecutedBlock; } impl IsBlock for ExecutedBlock { @@ -488,11 +507,11 @@ impl<'x> IsBlock for OpenBlock<'x> { fn block(&self) -> &ExecutedBlock { &self.block } } -impl<'x> IsBlock for ClosedBlock { +impl IsBlock for ClosedBlock { fn block(&self) -> &ExecutedBlock { &self.block } } -impl<'x> IsBlock for LockedBlock { +impl IsBlock for LockedBlock { fn block(&self) -> &ExecutedBlock { &self.block } } @@ -580,9 +599,8 @@ impl LockedBlock { } impl Drain for LockedBlock { - /// Drop this object and return the underlieing database. - fn drain(self) -> StateDB { - self.block.state.drop().1 + fn drain(self) -> ExecutedBlock { + self.block } } @@ -598,9 +616,8 @@ impl SealedBlock { } impl Drain for SealedBlock { - /// Drop this object and return the underlieing database. - fn drain(self) -> StateDB { - self.block.state.drop().1 + fn drain(self) -> ExecutedBlock { + self.block } } @@ -788,14 +805,14 @@ mod tests { let b = OpenBlock::new(engine, Default::default(), false, db, &genesis_header, last_hashes.clone(), Address::zero(), (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap() .close_and_lock().seal(engine, vec![]).unwrap(); let orig_bytes = b.rlp_bytes(); - let orig_db = b.drain(); + let orig_db = b.drain().state.drop().1; let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let e = enact_and_seal(&orig_bytes, engine, false, db, &genesis_header, last_hashes, Default::default()).unwrap(); assert_eq!(e.rlp_bytes(), orig_bytes); - let db = e.drain(); + let db = e.drain().state.drop().1; assert_eq!(orig_db.journal_db().keys(), db.journal_db().keys()); assert!(orig_db.journal_db().keys().iter().filter(|k| orig_db.journal_db().get(k.0) != db.journal_db().get(k.0)).next() == None); } @@ -819,7 +836,7 @@ mod tests { let b = open_block.close_and_lock().seal(engine, vec![]).unwrap(); let orig_bytes = b.rlp_bytes(); - let orig_db = b.drain(); + let orig_db = b.drain().state.drop().1; let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let e = enact_and_seal(&orig_bytes, engine, false, db, &genesis_header, last_hashes, Default::default()).unwrap(); @@ -829,7 +846,7 @@ mod tests { let uncles = view!(BlockView, &bytes).uncles(); assert_eq!(uncles[1].extra_data(), b"uncle2"); - let db = e.drain(); + let db = e.drain().state.drop().1; assert_eq!(orig_db.journal_db().keys(), db.journal_db().keys()); assert!(orig_db.journal_db().keys().iter().filter(|k| orig_db.journal_db().get(k.0) != db.journal_db().get(k.0)).next() == None); } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 3eb0a7815f..3a992fcb29 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -76,7 +76,6 @@ use verification; use verification::{PreverifiedBlock, Verifier}; use verification::queue::BlockQueue; use views::BlockView; -use parity_machine::{Finalizable, WithMetadata}; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -290,7 +289,7 @@ impl Importer { continue; } - if let Ok(closed_block) = self.check_and_close_block(block, client) { + if let Ok(closed_block) = self.check_and_lock_block(block, client) { if self.engine.is_proposal(&header) { self.block_queue.mark_as_good(&[hash]); proposed_blocks.push(bytes); @@ -345,7 +344,7 @@ impl Importer { imported } - fn check_and_close_block(&self, block: PreverifiedBlock, client: &Client) -> Result { + fn check_and_lock_block(&self, block: PreverifiedBlock, client: &Client) -> Result { let engine = &*self.engine; let header = block.header.clone(); @@ -459,32 +458,28 @@ impl Importer { // it is for reconstructing the state transition. // // The header passed is from the original block data and is sealed. - fn commit_block(&self, block: B, header: &Header, block_data: &[u8], client: &Client) -> ImportRoute where B: IsBlock + Drain { + fn commit_block(&self, block: B, header: &Header, block_data: &[u8], client: &Client) -> ImportRoute where B: Drain { let hash = &header.hash(); let number = header.number(); let parent = header.parent_hash(); let chain = client.chain.read(); // Commit results - let receipts = block.receipts().to_owned(); - let traces = block.traces().clone().drain(); - + let block = block.drain(); assert_eq!(header.hash(), view!(BlockView, block_data).header_view().hash()); - //let traces = From::from(block.traces().clone().unwrap_or_else(Vec::new)); - let mut batch = DBTransaction::new(); - let ancestry_actions = self.engine.ancestry_actions(block.block(), &mut chain.ancestry_with_metadata_iter(*parent)); + let ancestry_actions = self.engine.ancestry_actions(&block, &mut chain.ancestry_with_metadata_iter(*parent)); + let receipts = block.receipts; + let traces = block.traces.drain(); let best_hash = chain.best_block_hash(); - let metadata = block.block().metadata().map(Into::into); - let is_finalized = block.block().is_finalized(); let new = ExtendedHeader { header: header.clone(), - is_finalized: is_finalized, - metadata: metadata, + is_finalized: block.is_finalized, + metadata: block.metadata, parent_total_difficulty: chain.block_details(&parent).expect("Parent block is in the database; qed").total_difficulty }; @@ -516,7 +511,7 @@ impl Importer { // CHECK! I *think* this is fine, even if the state_root is equal to another // already-imported block of the same number. // TODO: Prove it with a test. - let mut state = block.drain(); + let mut state = block.state.drop().1; // check epoch end signal, potentially generating a proof on the current // state. @@ -539,7 +534,7 @@ impl Importer { let route = chain.insert_block(&mut batch, block_data, receipts.clone(), ExtrasInsert { fork_choice: fork_choice, - is_finalized: is_finalized, + is_finalized: block.is_finalized, metadata: new.metadata, }); diff --git a/ethcore/src/test_helpers.rs b/ethcore/src/test_helpers.rs index 85ddd34eb1..90ab15598b 100644 --- a/ethcore/src/test_helpers.rs +++ b/ethcore/src/test_helpers.rs @@ -179,7 +179,7 @@ pub fn generate_dummy_client_with_spec_accounts_and_data(test_spec: F, accoun } last_header = view!(BlockView, &b.rlp_bytes()).header(); - db = b.drain(); + db = b.drain().state.drop().1; } client.flush_queue(); client.import_verified_blocks(); diff --git a/ethcore/src/tests/trace.rs b/ethcore/src/tests/trace.rs index 350f2b1b7e..fd0604cf5a 100644 --- a/ethcore/src/tests/trace.rs +++ b/ethcore/src/tests/trace.rs @@ -97,7 +97,7 @@ fn can_trace_block_and_uncle_reward() { last_header = view!(BlockView, &root_block.rlp_bytes()).header(); let root_header = last_header.clone(); - db = root_block.drain(); + db = root_block.drain().state.drop().1; last_hashes.push(last_header.hash()); @@ -125,7 +125,7 @@ fn can_trace_block_and_uncle_reward() { } last_header = view!(BlockView,&parent_block.rlp_bytes()).header(); - db = parent_block.drain(); + db = parent_block.drain().state.drop().1; last_hashes.push(last_header.hash()); diff --git a/util/using_queue/src/lib.rs b/util/using_queue/src/lib.rs index 42eb1cbe38..b2c94b3f4a 100644 --- a/util/using_queue/src/lib.rs +++ b/util/using_queue/src/lib.rs @@ -19,7 +19,7 @@ /// Special queue-like datastructure that includes the notion of /// usage to avoid items that were queued but never used from making it into /// the queue. -pub struct UsingQueue where T: Clone { +pub struct UsingQueue { /// Not yet being sealed by a miner, but if one asks for work, we'd prefer they do this. pending: Option, /// Currently being sealed by miners. @@ -36,7 +36,7 @@ pub enum GetAction { Clone, } -impl UsingQueue where T: Clone { +impl UsingQueue { /// Create a new struct with a maximum size of `max_size`. pub fn new(max_size: usize) -> UsingQueue { UsingQueue { @@ -88,12 +88,12 @@ impl UsingQueue where T: Clone { /// Returns `Some` item which is the first that `f` returns `true` with a reference to it /// as a parameter or `None` if no such item exists in the queue. - fn clone_used_if

(&mut self, predicate: P) -> Option where P: Fn(&T) -> bool { + fn clone_used_if

(&mut self, predicate: P) -> Option where P: Fn(&T) -> bool, T: Clone { self.in_use.iter().find(|r| predicate(r)).cloned() } /// Fork-function for `take_used_if` and `clone_used_if`. - pub fn get_used_if

(&mut self, action: GetAction, predicate: P) -> Option where P: Fn(&T) -> bool { + pub fn get_used_if

(&mut self, action: GetAction, predicate: P) -> Option where P: Fn(&T) -> bool, T: Clone { match action { GetAction::Take => self.take_used_if(predicate), GetAction::Clone => self.clone_used_if(predicate), @@ -104,7 +104,7 @@ impl UsingQueue where T: Clone { /// a parameter, otherwise `None`. /// Will not destroy a block if a reference to it has previously been returned by `use_last_ref`, /// but rather clone it. - pub fn pop_if

(&mut self, predicate: P) -> Option where P: Fn(&T) -> bool { + pub fn pop_if

(&mut self, predicate: P) -> Option where P: Fn(&T) -> bool, T: Clone { // a bit clumsy - TODO: think about a nicer way of expressing this. if let Some(x) = self.pending.take() { if predicate(&x) { -- GitLab From a9c93c797ddb51850e3f0edb30b981d145425bbf Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 16 Jul 2018 19:42:59 +0800 Subject: [PATCH 142/191] Completely remove all dapps struct from rpc (#9107) * Completely remove all dapps struct from rpc * Remove unused pub use --- parity/rpc_apis.rs | 1 - rpc/src/lib.rs | 2 +- rpc/src/v1/helpers/dapps.rs | 27 ------------ rpc/src/v1/helpers/errors.rs | 8 ---- rpc/src/v1/helpers/mod.rs | 1 - rpc/src/v1/impls/light/parity.rs | 4 -- rpc/src/v1/impls/light/parity_set.rs | 10 +---- rpc/src/v1/impls/parity.rs | 8 +--- rpc/src/v1/impls/parity_set.rs | 10 +---- rpc/src/v1/mod.rs | 6 --- rpc/src/v1/tests/mocked/parity.rs | 14 ------ rpc/src/v1/tests/mocked/parity_set.rs | 15 ------- rpc/src/v1/traits/parity.rs | 5 --- rpc/src/v1/traits/parity_set.rs | 11 +---- rpc/src/v1/types/dapps.rs | 61 --------------------------- rpc/src/v1/types/mod.rs | 2 - 16 files changed, 6 insertions(+), 179 deletions(-) delete mode 100644 rpc/src/v1/helpers/dapps.rs delete mode 100644 rpc/src/v1/types/dapps.rs diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index ade6c69694..cf9f6d2dd5 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -20,7 +20,6 @@ use std::str::FromStr; use std::sync::{Arc, Weak}; pub use parity_rpc::signer::SignerService; -pub use parity_rpc::dapps::LocalDapp; use ethcore_service::PrivateTxService; use ethcore::account_provider::AccountProvider; diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 98d743881e..bef7d9effb 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -118,7 +118,7 @@ pub use http::{ AccessControlAllowOrigin, Host, DomainsValidation }; -pub use v1::{NetworkSettings, Metadata, Origin, informant, dispatch, signer, dapps}; +pub use v1::{NetworkSettings, Metadata, Origin, informant, dispatch, signer}; pub use v1::block_import::is_major_importing; pub use v1::extractors::{RpcExtractor, WsExtractor, WsStats, WsDispatcher}; pub use authcodes::{AuthCodes, TimeProvider}; diff --git a/rpc/src/v1/helpers/dapps.rs b/rpc/src/v1/helpers/dapps.rs deleted file mode 100644 index 88a9cce6fb..0000000000 --- a/rpc/src/v1/helpers/dapps.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Dapps Service - -use v1::types::LocalDapp; - -/// Dapps Server service. -pub trait DappsService: Send + Sync + 'static { - /// List available local dapps. - fn list_dapps(&self) -> Vec; - /// Refresh local dapps list - fn refresh_local_dapps(&self) -> bool; -} diff --git a/rpc/src/v1/helpers/errors.rs b/rpc/src/v1/helpers/errors.rs index 6207d4542f..710f7d7497 100644 --- a/rpc/src/v1/helpers/errors.rs +++ b/rpc/src/v1/helpers/errors.rs @@ -211,14 +211,6 @@ pub fn signer_disabled() -> Error { } } -pub fn dapps_disabled() -> Error { - Error { - code: ErrorCode::ServerError(codes::UNSUPPORTED_REQUEST), - message: "Dapps Server is disabled. This API is not available.".into(), - data: None, - } -} - pub fn ws_disabled() -> Error { Error { code: ErrorCode::ServerError(codes::UNSUPPORTED_REQUEST), diff --git a/rpc/src/v1/helpers/mod.rs b/rpc/src/v1/helpers/mod.rs index 5b62087ab3..ba8356334b 100644 --- a/rpc/src/v1/helpers/mod.rs +++ b/rpc/src/v1/helpers/mod.rs @@ -18,7 +18,6 @@ pub mod errors; pub mod block_import; -pub mod dapps; pub mod dispatch; pub mod fake_sign; pub mod ipfs; diff --git a/rpc/src/v1/impls/light/parity.rs b/rpc/src/v1/impls/light/parity.rs index f722781111..f9ec03cd37 100644 --- a/rpc/src/v1/impls/light/parity.rs +++ b/rpc/src/v1/impls/light/parity.rs @@ -326,10 +326,6 @@ impl Parity for ParityClient { Ok(map) } - fn dapps_url(&self) -> Result { - Err(errors::dapps_disabled()) - } - fn ws_url(&self) -> Result { helpers::to_url(&self.ws_address) .ok_or_else(|| errors::ws_disabled()) diff --git a/rpc/src/v1/impls/light/parity_set.rs b/rpc/src/v1/impls/light/parity_set.rs index dfe90a8ac8..6eadea43ab 100644 --- a/rpc/src/v1/impls/light/parity_set.rs +++ b/rpc/src/v1/impls/light/parity_set.rs @@ -29,7 +29,7 @@ use jsonrpc_core::{Result, BoxFuture}; use jsonrpc_core::futures::Future; use v1::helpers::errors; use v1::traits::ParitySet; -use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction, LocalDapp}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction}; /// Parity-specific rpc interface for operations altering the settings. pub struct ParitySetClient { @@ -137,14 +137,6 @@ impl ParitySet for ParitySetClient { Box::new(self.pool.spawn(future)) } - fn dapps_refresh(&self) -> Result { - Err(errors::dapps_disabled()) - } - - fn dapps_list(&self) -> Result> { - Err(errors::dapps_disabled()) - } - fn upgrade_ready(&self) -> Result> { Err(errors::light_unimplemented(None)) } diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index ac4bb11525..93560836f9 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -139,11 +139,11 @@ impl Parity for ParityClient where .collect() ) } - + fn locked_hardware_accounts_info(&self) -> Result> { self.accounts.locked_hardware_accounts().map_err(|e| errors::account("Error communicating with hardware wallet.", e)) } - + fn default_account(&self, meta: Self::Metadata) -> Result { let dapp_id = meta.dapp_id(); @@ -347,10 +347,6 @@ impl Parity for ParityClient where ) } - fn dapps_url(&self) -> Result { - Err(errors::dapps_disabled()) - } - fn ws_url(&self) -> Result { helpers::to_url(&self.ws_address) .ok_or_else(|| errors::ws_disabled()) diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index 82880f7207..c811b3e5da 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -31,7 +31,7 @@ use jsonrpc_core::{BoxFuture, Result}; use jsonrpc_core::futures::Future; use v1::helpers::errors; use v1::traits::ParitySet; -use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction, LocalDapp}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction}; /// Parity-specific rpc interface for operations altering the settings. pub struct ParitySetClient { @@ -182,14 +182,6 @@ impl ParitySet for ParitySetClient where Box::new(self.pool.spawn(future)) } - fn dapps_refresh(&self) -> Result { - Err(errors::dapps_disabled()) - } - - fn dapps_list(&self) -> Result> { - Err(errors::dapps_disabled()) - } - fn upgrade_ready(&self) -> Result> { Ok(self.updater.upgrade_ready().map(Into::into)) } diff --git a/rpc/src/v1/mod.rs b/rpc/src/v1/mod.rs index cb510ae294..a0b74aa5aa 100644 --- a/rpc/src/v1/mod.rs +++ b/rpc/src/v1/mod.rs @@ -53,9 +53,3 @@ pub mod signer { pub use super::helpers::{SigningQueue, SignerService, ConfirmationsQueue}; pub use super::types::{ConfirmationRequest, TransactionModification, U256, TransactionCondition}; } - -/// Dapps integration utilities -pub mod dapps { - pub use super::helpers::dapps::DappsService; - pub use super::types::LocalDapp; -} diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index f8322f8fe7..ca24114064 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -425,20 +425,6 @@ fn rpc_parity_ws_address() { assert_eq!(io2.handle_request_sync(request), Some(response2.to_owned())); } -#[test] -fn rpc_parity_dapps_address() { - // given - let deps = Dependencies::new(); - let io1 = deps.default_client(); - - // when - let request = r#"{"jsonrpc": "2.0", "method": "parity_dappsUrl", "params": [], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","error":{"code":-32000,"message":"Dapps Server is disabled. This API is not available."},"id":1}"#; - - // then - assert_eq!(io1.handle_request_sync(request), Some(response.to_owned())); -} - #[test] fn rpc_parity_next_nonce() { 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 0347da39ad..5aca2827e1 100644 --- a/rpc/src/v1/tests/mocked/parity_set.rs +++ b/rpc/src/v1/tests/mocked/parity_set.rs @@ -238,18 +238,3 @@ fn rpc_parity_remove_transaction() { miner.pending_transactions.lock().insert(hash, signed); assert_eq!(io.handle_request_sync(&request), Some(response.to_owned())); } - -#[test] -fn rpc_parity_set_dapps_list() { - let miner = miner_service(); - let client = client_service(); - let network = network_service(); - let updater = updater_service(); - let mut io = IoHandler::new(); - io.extend_with(parity_set_client(&client, &miner, &updater, &network).to_delegate()); - - let request = r#"{"jsonrpc": "2.0", "method": "parity_dappsList", "params":[], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","error":{"code":-32000,"message":"Dapps Server is disabled. This API is not available."},"id":1}"#; - - assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); -} diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 56634cc158..2f2eef9074 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -161,11 +161,6 @@ build_rpc_trait! { #[rpc(name = "parity_localTransactions")] fn local_transactions(&self) -> Result>; - /// Returns current Dapps Server interface and port or an error if dapps server is disabled. - /// (deprecated, should always return an error now). - #[rpc(name = "parity_dappsUrl")] - fn dapps_url(&self) -> Result; - /// Returns current WS Server interface and port or an error if ws server is disabled. #[rpc(name = "parity_wsUrl")] fn ws_url(&self) -> Result; diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index dfd0ad5541..707758920f 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -18,7 +18,7 @@ use jsonrpc_core::{BoxFuture, Result}; -use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction, LocalDapp}; +use v1::types::{Bytes, H160, H256, U256, ReleaseInfo, Transaction}; build_rpc_trait! { /// Parity-specific rpc interface for operations altering the settings. @@ -95,15 +95,6 @@ build_rpc_trait! { #[rpc(name = "parity_hashContent")] fn hash_content(&self, String) -> BoxFuture; - /// Returns true if refresh successful, error if unsuccessful or server is disabled - /// (deprecated, should always return an error now). - #[rpc(name = "parity_dappsRefresh")] - fn dapps_refresh(&self) -> Result; - - /// Returns a list of local dapps (deprecated, should always return an error now). - #[rpc(name = "parity_dappsList")] - fn dapps_list(&self) -> Result>; - /// Is there a release ready for install? #[rpc(name = "parity_upgradeReady")] fn upgrade_ready(&self) -> Result>; diff --git a/rpc/src/v1/types/dapps.rs b/rpc/src/v1/types/dapps.rs deleted file mode 100644 index 81339fb1dc..0000000000 --- a/rpc/src/v1/types/dapps.rs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2015-2018 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 . - -/// Local Dapp -#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct LocalDapp { - /// ID of local dapp - pub id: String, - /// Dapp name - pub name: String, - /// Dapp description - pub description: String, - /// Dapp version string - pub version: String, - /// Dapp author - pub author: String, - /// Dapp icon - #[serde(rename="iconUrl")] - pub icon_url: String, - /// Local development Url - #[serde(rename="localUrl")] - pub local_url: Option, -} - -#[cfg(test)] -mod tests { - use serde_json; - use super::LocalDapp; - - #[test] - fn dapp_serialization() { - let s = r#"{"id":"skeleton","name":"Skeleton","description":"A skeleton dapp","version":"0.1","author":"Parity Technologies Ltd","iconUrl":"title.png","localUrl":"http://localhost:5000"}"#; - - let dapp = LocalDapp { - id: "skeleton".into(), - name: "Skeleton".into(), - description: "A skeleton dapp".into(), - version: "0.1".into(), - author: "Parity Technologies Ltd".into(), - icon_url: "title.png".into(), - local_url: Some("http://localhost:5000".into()), - }; - - let serialized = serde_json::to_string(&dapp).unwrap(); - assert_eq!(serialized, s); - } -} diff --git a/rpc/src/v1/types/mod.rs b/rpc/src/v1/types/mod.rs index 7bf72d9c73..0f21e2f7b5 100644 --- a/rpc/src/v1/types/mod.rs +++ b/rpc/src/v1/types/mod.rs @@ -23,7 +23,6 @@ mod bytes; mod call_request; mod confirmations; mod consensus_status; -mod dapps; mod derivation; mod filter; mod hash; @@ -57,7 +56,6 @@ pub use self::confirmations::{ TransactionModification, SignRequest, DecryptRequest, Either }; pub use self::consensus_status::*; -pub use self::dapps::LocalDapp; pub use self::derivation::{DeriveHash, DeriveHierarchical, Derive}; pub use self::filter::{Filter, FilterChanges}; pub use self::hash::{H64, H160, H256, H512, H520, H2048}; -- GitLab From edb228839e3aa69077049c8133ecb2bb22f2fab0 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 16 Jul 2018 13:43:14 +0200 Subject: [PATCH 143/191] Fix `todo` in `ethcore/types::Receipt` constructor (#9086) Remove needless mutable variable and assignment --- ethcore/types/src/receipt.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ethcore/types/src/receipt.rs b/ethcore/types/src/receipt.rs index 81233d212a..e9ae1ad8dc 100644 --- a/ethcore/types/src/receipt.rs +++ b/ethcore/types/src/receipt.rs @@ -20,7 +20,7 @@ use ethereum_types::{H160, H256, U256, Address, Bloom}; use heapsize::HeapSizeOf; use rlp::{Rlp, RlpStream, Encodable, Decodable, DecoderError}; -use {BlockNumber}; +use BlockNumber; use log_entry::{LogEntry, LocalizedLogEntry}; /// Transaction outcome store in the receipt. @@ -49,12 +49,12 @@ pub struct Receipt { impl Receipt { /// Create a new receipt. - pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec) -> Receipt { - Receipt { - gas_used: gas_used, - log_bloom: logs.iter().fold(Bloom::default(), |mut b, l| { b = &b | &l.bloom(); b }), //TODO: use |= operator - logs: logs, - outcome: outcome, + pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec) -> Self { + Self { + gas_used, + log_bloom: logs.iter().fold(Bloom::default(), |b, l| b | l.bloom()), + logs, + outcome, } } } -- GitLab From 5059619947c5af12ecd4adc457714ec09d901573 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 16 Jul 2018 19:53:55 +0800 Subject: [PATCH 144/191] Unify engine error to reject blocks (#9085) * Reject if Engine::on_close_block returns error * Unify open block behaviors * Fix tests in ethcore * Fix Aura tests * Fix RPC test * Print a warning if open block failed * Print the actual error when closing the block * Update comments for prepare_pending_block * Add BlockPreparationStatus to distingish three different state after prepare_pending_block --- ethcore/src/block.rs | 39 +++++------- ethcore/src/client/client.rs | 6 +- ethcore/src/client/test_client.rs | 8 +-- ethcore/src/client/traits.rs | 4 +- ethcore/src/engines/authority_round/mod.rs | 45 ++++++++----- ethcore/src/engines/basic_authority.rs | 2 +- ethcore/src/engines/block_reward.rs | 2 +- ethcore/src/engines/instant_seal.rs | 2 +- ethcore/src/engines/tendermint/mod.rs | 2 +- ethcore/src/ethereum/ethash.rs | 6 +- ethcore/src/miner/miner.rs | 73 ++++++++++++++++------ ethcore/src/test_helpers.rs | 6 +- ethcore/src/tests/client.rs | 10 +-- ethcore/src/tests/trace.rs | 6 +- rpc/src/v1/tests/helpers/miner_service.rs | 4 +- 15 files changed, 125 insertions(+), 90 deletions(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index 43400895f8..2cd2fef70f 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -428,20 +428,16 @@ impl<'x> OpenBlock<'x> { } /// Turn this into a `ClosedBlock`. - pub fn close(self) -> ClosedBlock { + pub fn close(self) -> Result { let mut s = self; let unclosed_state = s.block.state.clone(); let unclosed_metadata = s.block.metadata.clone(); let unclosed_finalization_state = s.block.is_finalized; - if let Err(e) = s.engine.on_close_block(&mut s.block) { - warn!("Encountered error on closing the block: {}", e); - } + s.engine.on_close_block(&mut s.block)?; + s.block.state.commit()?; - if let Err(e) = s.block.state.commit() { - warn!("Encountered error on state commit: {}", e); - } s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); let uncle_bytes = encode_list(&s.block.uncles).into_vec(); s.block.header.set_uncles_hash(keccak(&uncle_bytes)); @@ -453,26 +449,21 @@ impl<'x> OpenBlock<'x> { })); s.block.header.set_gas_used(s.block.receipts.last().map_or_else(U256::zero, |r| r.gas_used)); - ClosedBlock { + Ok(ClosedBlock { block: s.block, uncle_bytes, unclosed_state, unclosed_metadata, unclosed_finalization_state, - } + }) } /// Turn this into a `LockedBlock`. - pub fn close_and_lock(self) -> LockedBlock { + pub fn close_and_lock(self) -> Result { let mut s = self; - if let Err(e) = s.engine.on_close_block(&mut s.block) { - warn!("Encountered error on closing the block: {}", e); - } - - if let Err(e) = s.block.state.commit() { - warn!("Encountered error on state commit: {}", e); - } + s.engine.on_close_block(&mut s.block)?; + s.block.state.commit()?; if s.block.header.transactions_root().is_zero() || s.block.header.transactions_root() == &KECCAK_NULL_RLP { s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); @@ -492,10 +483,10 @@ impl<'x> OpenBlock<'x> { })); s.block.header.set_gas_used(s.block.receipts.last().map_or_else(U256::zero, |r| r.gas_used)); - LockedBlock { + Ok(LockedBlock { block: s.block, uncle_bytes, - } + }) } #[cfg(test)] @@ -668,7 +659,7 @@ fn enact( b.push_uncle(u)?; } - Ok(b.close_and_lock()) + b.close_and_lock() } /// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header @@ -764,7 +755,7 @@ mod tests { b.push_uncle(u.clone())?; } - Ok(b.close_and_lock()) + b.close_and_lock() } /// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header. Seal the block aferwards @@ -789,7 +780,7 @@ mod tests { let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(&*spec.engine, Default::default(), false, db, &genesis_header, last_hashes, Address::zero(), (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b = b.close_and_lock(); + let b = b.close_and_lock().unwrap(); let _ = b.seal(&*spec.engine, vec![]); } @@ -803,7 +794,7 @@ mod tests { let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(engine, Default::default(), false, db, &genesis_header, last_hashes.clone(), Address::zero(), (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap() - .close_and_lock().seal(engine, vec![]).unwrap(); + .close_and_lock().unwrap().seal(engine, vec![]).unwrap(); let orig_bytes = b.rlp_bytes(); let orig_db = b.drain().state.drop().1; @@ -833,7 +824,7 @@ mod tests { uncle2_header.set_extra_data(b"uncle2".to_vec()); open_block.push_uncle(uncle1_header).unwrap(); open_block.push_uncle(uncle2_header).unwrap(); - let b = open_block.close_and_lock().seal(engine, vec![]).unwrap(); + let b = open_block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); let orig_bytes = b.rlp_bytes(); let orig_db = b.drain().state.drop().1; diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 3a992fcb29..56c71a86ec 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -2131,7 +2131,7 @@ impl ReopenBlock for Client { } impl PrepareOpenBlock for Client { - fn prepare_open_block(&self, author: Address, gas_range_target: (U256, U256), extra_data: Bytes) -> OpenBlock { + fn prepare_open_block(&self, author: Address, gas_range_target: (U256, U256), extra_data: Bytes) -> Result { let engine = &*self.engine; let chain = self.chain.read(); let best_header = chain.best_block_header(); @@ -2150,7 +2150,7 @@ impl PrepareOpenBlock for Client { extra_data, is_epoch_begin, &mut chain.ancestry_with_metadata_iter(best_header.hash()), - ).expect("OpenBlock::new only fails if parent state root invalid; state root of best block's header is never invalid; qed"); + )?; // Add uncles chain @@ -2166,7 +2166,7 @@ impl PrepareOpenBlock for Client { qed"); }); - open_block + Ok(open_block) } } diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 8170396111..7a3dfcd007 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -46,7 +46,7 @@ use header::{Header as BlockHeader, BlockNumber}; use filter::Filter; use log_entry::LocalizedLogEntry; use receipt::{Receipt, LocalizedReceipt, TransactionOutcome}; -use error::ImportResult; +use error::{Error, ImportResult}; use vm::Schedule; use miner::{self, Miner, MinerService}; use spec::Spec; @@ -373,7 +373,7 @@ impl ReopenBlock for TestBlockChainClient { } impl PrepareOpenBlock for TestBlockChainClient { - fn prepare_open_block(&self, author: Address, gas_range_target: (U256, U256), extra_data: Bytes) -> OpenBlock { + fn prepare_open_block(&self, author: Address, gas_range_target: (U256, U256), extra_data: Bytes) -> Result { let engine = &*self.spec.engine; let genesis_header = self.spec.genesis_header(); let db = self.spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); @@ -391,10 +391,10 @@ impl PrepareOpenBlock for TestBlockChainClient { extra_data, false, &mut Vec::new().into_iter(), - ).expect("Opening block for tests will not fail."); + )?; // TODO [todr] Override timestamp for predictability open_block.set_timestamp(*self.latest_block_timestamp.read()); - open_block + Ok(open_block) } } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index e633ae7c59..65bf009211 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -24,7 +24,7 @@ use blockchain::TreeRoute; use client::Mode; use encoded; use vm::LastHashes; -use error::{ImportResult, CallError, BlockImportError}; +use error::{Error, ImportResult, CallError, BlockImportError}; use evm::Schedule; use executive::Executed; use filter::Filter; @@ -395,7 +395,7 @@ pub trait PrepareOpenBlock { author: Address, gas_range_target: (U256, U256), extra_data: Bytes - ) -> OpenBlock; + ) -> Result; } /// Provides methods used for sealing new state diff --git a/ethcore/src/engines/authority_round/mod.rs b/ethcore/src/engines/authority_round/mod.rs index e927f77b71..f3f4504ec6 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -1403,7 +1403,7 @@ mod tests { use rlp::encode; use block::*; use test_helpers::{ - generate_dummy_client_with_spec_and_accounts, get_temp_state_db, generate_dummy_client, + generate_dummy_client_with_spec_and_accounts, get_temp_state_db, TestNotify }; use account_provider::AccountProvider; @@ -1451,9 +1451,9 @@ mod tests { let db2 = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b1 = b1.close_and_lock(); + let b1 = b1.close_and_lock().unwrap(); let b2 = OpenBlock::new(engine, Default::default(), false, db2, &genesis_header, last_hashes, addr2, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b2 = b2.close_and_lock(); + let b2 = b2.close_and_lock().unwrap(); engine.set_signer(tap.clone(), addr1, "1".into()); if let Seal::Regular(seal) = engine.generate_seal(b1.block(), &genesis_header) { @@ -1485,9 +1485,9 @@ mod tests { let last_hashes = Arc::new(vec![genesis_header.hash()]); let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b1 = b1.close_and_lock(); + let b1 = b1.close_and_lock().unwrap(); let b2 = OpenBlock::new(engine, Default::default(), false, db2, &genesis_header, last_hashes, addr2, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b2 = b2.close_and_lock(); + let b2 = b2.close_and_lock().unwrap(); engine.set_signer(tap.clone(), addr1, "1".into()); match engine.generate_seal(b1.block(), &genesis_header) { @@ -1745,16 +1745,17 @@ mod tests { let db1 = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); - let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b1 = b1.close_and_lock(); - let client = generate_dummy_client(0); + let client = generate_dummy_client_with_spec_and_accounts(Spec::new_test_round_empty_steps, None); let notify = Arc::new(TestNotify::default()); client.add_notify(notify.clone()); engine.register_client(Arc::downgrade(&client) as _); engine.set_signer(tap.clone(), addr1, "1".into()); + let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); + let b1 = b1.close_and_lock().unwrap(); + // the block is empty so we don't seal and instead broadcast an empty step message assert_eq!(engine.generate_seal(b1.block(), &genesis_header), Seal::None); @@ -1779,9 +1780,14 @@ mod tests { let last_hashes = Arc::new(vec![genesis_header.hash()]); + let client = generate_dummy_client_with_spec_and_accounts(Spec::new_test_round_empty_steps, None); + let notify = Arc::new(TestNotify::default()); + client.add_notify(notify.clone()); + engine.register_client(Arc::downgrade(&client) as _); + // step 2 let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b1 = b1.close_and_lock(); + let b1 = b1.close_and_lock().unwrap(); // since the block is empty it isn't sealed and we generate empty steps engine.set_signer(tap.clone(), addr1, "1".into()); @@ -1798,7 +1804,7 @@ mod tests { value: U256::from(1), data: vec![], }.fake_sign(addr2), None).unwrap(); - let b2 = b2.close_and_lock(); + let b2 = b2.close_and_lock().unwrap(); // we will now seal a block with 1tx and include the accumulated empty step message engine.set_signer(tap.clone(), addr2, "0".into()); @@ -1827,9 +1833,14 @@ mod tests { let last_hashes = Arc::new(vec![genesis_header.hash()]); + let client = generate_dummy_client_with_spec_and_accounts(Spec::new_test_round_empty_steps, None); + let notify = Arc::new(TestNotify::default()); + client.add_notify(notify.clone()); + engine.register_client(Arc::downgrade(&client) as _); + // step 2 let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b1 = b1.close_and_lock(); + let b1 = b1.close_and_lock().unwrap(); // since the block is empty it isn't sealed and we generate empty steps engine.set_signer(tap.clone(), addr1, "1".into()); @@ -1838,7 +1849,7 @@ mod tests { // step 3 let b2 = OpenBlock::new(engine, Default::default(), false, db2, &genesis_header, last_hashes.clone(), addr2, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b2 = b2.close_and_lock(); + let b2 = b2.close_and_lock().unwrap(); engine.set_signer(tap.clone(), addr2, "0".into()); assert_eq!(engine.generate_seal(b2.block(), &genesis_header), Seal::None); engine.step(); @@ -1846,7 +1857,7 @@ mod tests { // step 4 // the spec sets the maximum_empty_steps to 2 so we will now seal an empty block and include the empty step messages let b3 = OpenBlock::new(engine, Default::default(), false, db3, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b3 = b3.close_and_lock(); + let b3 = b3.close_and_lock().unwrap(); engine.set_signer(tap.clone(), addr1, "1".into()); if let Seal::Regular(seal) = engine.generate_seal(b3.block(), &genesis_header) { @@ -1879,7 +1890,7 @@ mod tests { // step 2 let b1 = OpenBlock::new(engine, Default::default(), false, db1, &genesis_header, last_hashes.clone(), addr1, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b1 = b1.close_and_lock(); + let b1 = b1.close_and_lock().unwrap(); // since the block is empty it isn't sealed and we generate empty steps engine.set_signer(tap.clone(), addr1, "1".into()); @@ -1892,7 +1903,7 @@ mod tests { let addr1_balance = b2.block().state().balance(&addr1).unwrap(); // after closing the block `addr1` should be reward twice, one for the included empty step message and another for block creation - let b2 = b2.close_and_lock(); + let b2 = b2.close_and_lock().unwrap(); // the spec sets the block reward to 10 assert_eq!(b2.block().state().balance(&addr1).unwrap(), addr1_balance + (10 * 2).into()) @@ -2013,7 +2024,7 @@ mod tests { false, &mut Vec::new().into_iter(), ).unwrap(); - let b1 = b1.close_and_lock(); + let b1 = b1.close_and_lock().unwrap(); // since the block is empty it isn't sealed and we generate empty steps engine.set_signer(tap.clone(), addr1, "1".into()); @@ -2039,7 +2050,7 @@ mod tests { // after closing the block `addr1` should be reward twice, one for the included empty step // message and another for block creation - let b2 = b2.close_and_lock(); + let b2 = b2.close_and_lock().unwrap(); // the contract rewards (1000 + kind) for each benefactor/reward kind assert_eq!( diff --git a/ethcore/src/engines/basic_authority.rs b/ethcore/src/engines/basic_authority.rs index f535399e5b..e73b104619 100644 --- a/ethcore/src/engines/basic_authority.rs +++ b/ethcore/src/engines/basic_authority.rs @@ -252,7 +252,7 @@ mod tests { let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(engine, Default::default(), false, db, &genesis_header, last_hashes, addr, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b = b.close_and_lock(); + let b = b.close_and_lock().unwrap(); if let Seal::Regular(seal) = engine.generate_seal(b.block(), &genesis_header) { assert!(b.try_seal(engine, seal).is_ok()); } diff --git a/ethcore/src/engines/block_reward.rs b/ethcore/src/engines/block_reward.rs index 9a9d54e4af..7144ed78d6 100644 --- a/ethcore/src/engines/block_reward.rs +++ b/ethcore/src/engines/block_reward.rs @@ -170,7 +170,7 @@ mod test { "0000000000000000000000000000000000000001".into(), (3141562.into(), 31415620.into()), vec![], - ); + ).unwrap(); let result = machine.execute_as_system( block.block_mut(), diff --git a/ethcore/src/engines/instant_seal.rs b/ethcore/src/engines/instant_seal.rs index a35dea5219..5719e11b12 100644 --- a/ethcore/src/engines/instant_seal.rs +++ b/ethcore/src/engines/instant_seal.rs @@ -87,7 +87,7 @@ mod tests { let genesis_header = spec.genesis_header(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(engine, Default::default(), false, db, &genesis_header, last_hashes, Address::default(), (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b = b.close_and_lock(); + let b = b.close_and_lock().unwrap(); if let Seal::Regular(seal) = engine.generate_seal(b.block(), &genesis_header) { assert!(b.try_seal(engine, seal).is_ok()); } diff --git a/ethcore/src/engines/tendermint/mod.rs b/ethcore/src/engines/tendermint/mod.rs index c95d61aa78..cc2325bed4 100644 --- a/ethcore/src/engines/tendermint/mod.rs +++ b/ethcore/src/engines/tendermint/mod.rs @@ -804,7 +804,7 @@ mod tests { let genesis_header = spec.genesis_header(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(spec.engine.as_ref(), Default::default(), false, db.boxed_clone(), &genesis_header, last_hashes, proposer, (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b = b.close(); + let b = b.close().unwrap(); if let Seal::Proposal(seal) = spec.engine.generate_seal(b.block(), &genesis_header) { (b, seal) } else { diff --git a/ethcore/src/ethereum/ethash.rs b/ethcore/src/ethereum/ethash.rs index 17268fee1f..ca19983d3e 100644 --- a/ethcore/src/ethereum/ethash.rs +++ b/ethcore/src/ethereum/ethash.rs @@ -542,7 +542,7 @@ mod tests { let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(engine, Default::default(), false, db, &genesis_header, last_hashes, Address::zero(), (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b = b.close(); + let b = b.close().unwrap(); assert_eq!(b.state().balance(&Address::zero()).unwrap(), U256::from_str("4563918244f40000").unwrap()); } @@ -596,7 +596,7 @@ mod tests { uncle.set_author(uncle_author); b.push_uncle(uncle).unwrap(); - let b = b.close(); + let b = b.close().unwrap(); assert_eq!(b.state().balance(&Address::zero()).unwrap(), "478eae0e571ba000".into()); assert_eq!(b.state().balance(&uncle_author).unwrap(), "3cb71f51fc558000".into()); } @@ -609,7 +609,7 @@ mod tests { let db = spec.ensure_db_good(get_temp_state_db(), &Default::default()).unwrap(); let last_hashes = Arc::new(vec![genesis_header.hash()]); let b = OpenBlock::new(engine, Default::default(), false, db, &genesis_header, last_hashes, Address::zero(), (3141562.into(), 31415620.into()), vec![], false, &mut Vec::new().into_iter()).unwrap(); - let b = b.close(); + let b = b.close().unwrap(); let ubi_contract: Address = "00efdd5883ec628983e9063c7d969fe268bbf310".into(); let dev_contract: Address = "00756cf8159095948496617f5fb17ed95059f536".into(); diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 16a20f8a00..167a58d235 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -82,6 +82,17 @@ pub enum Penalization { }, } +/// Pending block preparation status. +#[derive(Debug, PartialEq)] +pub enum BlockPreparationStatus { + /// We had to prepare new pending block and the preparation succeeded. + Succeeded, + /// We had to prepare new pending block but the preparation failed. + Failed, + /// We didn't have to prepare a new block. + NotPrepared, +} + /// Initial minimal gas price. /// /// Gas price should be later overwritten externally @@ -334,7 +345,7 @@ impl Miner { } /// Prepares new block for sealing including top transactions from queue. - fn prepare_block(&self, chain: &C) -> (ClosedBlock, Option) where + fn prepare_block(&self, chain: &C) -> Option<(ClosedBlock, Option)> where C: BlockChain + CallContract + BlockProducer + Nonce + Sync, { trace_time!("prepare_block"); @@ -362,11 +373,18 @@ impl Miner { // block not found - create it. trace!(target: "miner", "prepare_block: No existing work - making new block"); let params = self.params.read().clone(); - chain.prepare_open_block( + + match chain.prepare_open_block( params.author, params.gas_range_target, params.extra_data, - ) + ) { + Ok(block) => block, + Err(err) => { + warn!(target: "miner", "Open new block failed with error {:?}. This is likely an error in chain specificiations or on-chain consensus smart contracts.", err); + return None; + } + } } }; @@ -493,7 +511,13 @@ impl Miner { let elapsed = block_start.elapsed(); debug!(target: "miner", "Pushed {} transactions in {} ms", tx_count, took_ms(&elapsed)); - let block = open_block.close(); + let block = match open_block.close() { + Ok(block) => block, + Err(err) => { + warn!(target: "miner", "Closing the block failed with error {:?}. This is likely an error in chain specificiations or on-chain consensus smart contracts.", err); + return None; + } + }; { self.transaction_queue.remove(invalid_transactions.iter(), true); @@ -501,7 +525,7 @@ impl Miner { self.transaction_queue.penalize(senders_to_penalize.iter()); } - (block, original_work_hash) + Some((block, original_work_hash)) } /// Returns `true` if we should create pending block even if some other conditions are not met. @@ -705,8 +729,8 @@ impl Miner { } } - /// Returns true if we had to prepare new pending block. - fn prepare_pending_block(&self, client: &C) -> bool where + /// Prepare a pending block. Returns the preparation status. + fn prepare_pending_block(&self, client: &C) -> BlockPreparationStatus where C: BlockChain + CallContract + BlockProducer + SealedBlockImporter + Nonce + Sync, { trace!(target: "miner", "prepare_pending_block: entering"); @@ -722,14 +746,21 @@ impl Miner { } }; - if prepare_new { + let preparation_status = if prepare_new { // -------------------------------------------------------------------------- // | NOTE Code below requires sealing locks. | // | Make sure to release the locks before calling that method. | // -------------------------------------------------------------------------- - let (block, original_work_hash) = self.prepare_block(client); - self.prepare_work(block, original_work_hash); - } + match self.prepare_block(client) { + Some((block, original_work_hash)) => { + self.prepare_work(block, original_work_hash); + BlockPreparationStatus::Succeeded + }, + None => BlockPreparationStatus::Failed, + } + } else { + BlockPreparationStatus::NotPrepared + }; let best_number = client.chain_info().best_block_number; let mut sealing = self.sealing.lock(); @@ -742,8 +773,7 @@ impl Miner { sealing.last_request = Some(best_number); } - // Return if we restarted - prepare_new + preparation_status } /// Prepare pending block, check whether sealing is needed, and then update sealing. @@ -752,7 +782,7 @@ impl Miner { // Make sure to do it after transaction is imported and lock is dropped. // We need to create pending block and enable sealing. - if self.engine.seals_internally().unwrap_or(false) || !self.prepare_pending_block(chain) { + if self.engine.seals_internally().unwrap_or(false) || self.prepare_pending_block(chain) == BlockPreparationStatus::NotPrepared { // If new block has not been prepared (means we already had one) // or Engine might be able to seal internally, // we need to update sealing. @@ -1051,7 +1081,10 @@ impl miner::MinerService for Miner { // | Make sure to release the locks before calling that method. | // -------------------------------------------------------------------------- trace!(target: "miner", "update_sealing: preparing a block"); - let (block, original_work_hash) = self.prepare_block(chain); + let (block, original_work_hash) = match self.prepare_block(chain) { + Some((block, original_work_hash)) => (block, original_work_hash), + None => return, + }; // refuse to seal the first block of the chain if it contains hard forks // which should be on by default. @@ -1345,7 +1378,7 @@ mod tests { assert_eq!(miner.pending_receipts(best_block).unwrap().len(), 1); assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); // This method will let us know if pending block was created (before calling that method) - assert!(!miner.prepare_pending_block(&client)); + assert_eq!(miner.prepare_pending_block(&client), BlockPreparationStatus::NotPrepared); } #[test] @@ -1383,7 +1416,7 @@ mod tests { // By default we use PendingSet::AlwaysSealing, so no transactions yet. assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 0); // This method will let us know if pending block was created (before calling that method) - assert!(miner.prepare_pending_block(&client)); + assert_eq!(miner.prepare_pending_block(&client), BlockPreparationStatus::Succeeded); // After pending block is created we should see a transaction. assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); } @@ -1418,7 +1451,7 @@ mod tests { assert_eq!(miner.pending_transactions(best_block), None); assert_eq!(miner.pending_receipts(best_block), None); assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 0); - assert!(miner.prepare_pending_block(&client)); + assert_eq!(miner.prepare_pending_block(&client), BlockPreparationStatus::Succeeded); assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 1); // when - 2nd part: create a local transaction from account_provider. @@ -1432,7 +1465,7 @@ mod tests { assert_eq!(miner.pending_transactions(best_block).unwrap().len(), 2); assert_eq!(miner.pending_receipts(best_block).unwrap().len(), 2); assert_eq!(miner.ready_transactions(&client, 10, PendingOrdering::Priority).len(), 2); - assert!(!miner.prepare_pending_block(&client)); + assert_eq!(miner.prepare_pending_block(&client), BlockPreparationStatus::NotPrepared); } #[test] @@ -1443,7 +1476,7 @@ mod tests { assert!(!miner.requires_reseal(1u8.into())); miner.import_external_transactions(&client, vec![transaction().into()]).pop().unwrap().unwrap(); - assert!(miner.prepare_pending_block(&client)); + assert_eq!(miner.prepare_pending_block(&client), BlockPreparationStatus::Succeeded); // Unless asked to prepare work. assert!(miner.requires_reseal(1u8.into())); } diff --git a/ethcore/src/test_helpers.rs b/ethcore/src/test_helpers.rs index 90ab15598b..443e0418b5 100644 --- a/ethcore/src/test_helpers.rs +++ b/ethcore/src/test_helpers.rs @@ -172,7 +172,7 @@ pub fn generate_dummy_client_with_spec_accounts_and_data(test_spec: F, accoun n += 1; } - let b = b.close_and_lock().seal(test_engine, vec![]).unwrap(); + let b = b.close_and_lock().unwrap().seal(test_engine, vec![]).unwrap(); if let Err(e) = client.import_block(b.rlp_bytes()) { panic!("error importing block which is valid by definition: {:?}", e); @@ -222,13 +222,13 @@ pub fn push_block_with_transactions(client: &Arc, transactions: &[Signed let test_engine = &*test_spec.engine; let block_number = client.chain_info().best_block_number as u64 + 1; - let mut b = client.prepare_open_block(Address::default(), (0.into(), 5000000.into()), Bytes::new()); + let mut b = client.prepare_open_block(Address::default(), (0.into(), 5000000.into()), Bytes::new()).unwrap(); b.set_timestamp(block_number * 10); for t in transactions { b.push_transaction(t.clone(), None).unwrap(); } - let b = b.close_and_lock().seal(test_engine, vec![]).unwrap(); + let b = b.close_and_lock().unwrap().seal(test_engine, vec![]).unwrap(); if let Err(e) = client.import_block(b.rlp_bytes()) { panic!("error importing block which is valid by definition: {:?}", e); diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 409248a2ea..0b8f2c4fa4 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -268,7 +268,7 @@ fn can_mine() { let dummy_blocks = get_good_dummy_block_seq(2); let client = get_test_client_with_blocks(vec![dummy_blocks[0].clone()]); - let b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]).close(); + let b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]).unwrap().close().unwrap(); assert_eq!(*b.block().header().parent_hash(), view!(BlockView, &dummy_blocks[0]).header_view().hash()); } @@ -291,10 +291,10 @@ fn change_history_size() { ).unwrap(); for _ in 0..20 { - let mut b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]); + let mut b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]).unwrap(); b.block_mut().state_mut().add_balance(&address, &5.into(), CleanupMode::NoEmpty).unwrap(); b.block_mut().state_mut().commit().unwrap(); - let b = b.close_and_lock().seal(&*test_spec.engine, vec![]).unwrap(); + let b = b.close_and_lock().unwrap().seal(&*test_spec.engine, vec![]).unwrap(); client.import_sealed_block(b).unwrap(); // account change is in the journal overlay } } @@ -350,10 +350,10 @@ fn transaction_proof() { let address = Address::random(); let test_spec = Spec::new_test(); for _ in 0..20 { - let mut b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]); + let mut b = client.prepare_open_block(Address::default(), (3141562.into(), 31415620.into()), vec![]).unwrap(); b.block_mut().state_mut().add_balance(&address, &5.into(), CleanupMode::NoEmpty).unwrap(); b.block_mut().state_mut().commit().unwrap(); - let b = b.close_and_lock().seal(&*test_spec.engine, vec![]).unwrap(); + let b = b.close_and_lock().unwrap().seal(&*test_spec.engine, vec![]).unwrap(); client.import_sealed_block(b).unwrap(); // account change is in the journal overlay } diff --git a/ethcore/src/tests/trace.rs b/ethcore/src/tests/trace.rs index fd0604cf5a..fd7c932cbd 100644 --- a/ethcore/src/tests/trace.rs +++ b/ethcore/src/tests/trace.rs @@ -89,7 +89,7 @@ fn can_trace_block_and_uncle_reward() { rolling_timestamp += 10; root_block.set_timestamp(rolling_timestamp); - let root_block = root_block.close_and_lock().seal(engine, vec![]).unwrap(); + let root_block = root_block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); if let Err(e) = client.import_block(root_block.rlp_bytes()) { panic!("error importing block which is valid by definition: {:?}", e); @@ -118,7 +118,7 @@ fn can_trace_block_and_uncle_reward() { rolling_timestamp += 10; parent_block.set_timestamp(rolling_timestamp); - let parent_block = parent_block.close_and_lock().seal(engine, vec![]).unwrap(); + let parent_block = parent_block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); if let Err(e) = client.import_block(parent_block.rlp_bytes()) { panic!("error importing block which is valid by definition: {:?}", e); @@ -168,7 +168,7 @@ fn can_trace_block_and_uncle_reward() { uncle.set_timestamp(rolling_timestamp); block.push_uncle(uncle).unwrap(); - let block = block.close_and_lock().seal(engine, vec![]).unwrap(); + let block = block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); let res = client.import_block(block.rlp_bytes()); if res.is_err() { diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index fa9f22b247..7ecd2a4749 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -189,8 +189,8 @@ impl MinerService for TestMinerService { fn work_package(&self, chain: &C) -> Option<(H256, BlockNumber, u64, U256)> { let params = self.authoring_params(); - let open_block = chain.prepare_open_block(params.author, params.gas_range_target, params.extra_data); - let closed = open_block.close(); + let open_block = chain.prepare_open_block(params.author, params.gas_range_target, params.extra_data).unwrap(); + let closed = open_block.close().unwrap(); let header = closed.header(); Some((header.hash(), header.number(), header.timestamp(), *header.difficulty())) -- GitLab From 0ca4250bd44961bc31f9cc148be7c3d0345a0df4 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Mon, 16 Jul 2018 21:05:47 +0200 Subject: [PATCH 145/191] fix verification in ethcore-sync collect_blocks (#9135) --- ethcore/sync/src/block_sync.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index bff9bb071a..2e508f4d69 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -477,18 +477,19 @@ impl BlockDownloader { for block_and_receipts in blocks { let block = block_and_receipts.block; let receipts = block_and_receipts.receipts; - let (h, number, parent) = { - let header = view!(BlockView, &block).header_view(); - (header.hash(), header.number(), header.parent_hash()) - }; // Perform basic block verification if !Block::is_good(&block) { - debug!(target: "sync", "Bad block rlp {:?} : {:?}", h, block); + debug!(target: "sync", "Bad block rlp: {:?}", block); bad = true; break; } + let (h, number, parent) = { + let header = view!(BlockView, &block).header_view(); + (header.hash(), header.number(), header.parent_hash()) + }; + if self.target_hash.as_ref().map_or(false, |t| t == &h) { self.state = State::Complete; trace!(target: "sync", "Sync target reached"); -- GitLab From ed45760425cf85213580da4dce966583b263ff38 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Mon, 16 Jul 2018 22:19:02 +0300 Subject: [PATCH 146/191] Update snapcraft.yaml (#9132) --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d67f6448af..b101770703 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -33,7 +33,7 @@ parts: # rust-channel: stable # @TODO enable after https://bugs.launchpad.net/snapcraft/+bug/1778530 rust-revision: 1.26.2 # @TODO remove after https://bugs.launchpad.net/snapcraft/+bug/1778530 build-attributes: [no-system-libraries] - build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config] + build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config, cmake] stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6] df: plugin: nil -- GitLab From 21e0cd7781f55f0007d5c7d87929f49513367e27 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Mon, 16 Jul 2018 21:19:59 +0200 Subject: [PATCH 147/191] `evm bench` fix broken dependencies (#9134) * `evm bench` use valid dependencies Benchmarks of the `evm` used stale versions of a couple a crates that this commit fixes! * fix warnings --- ethcore/benches/evm.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ethcore/benches/evm.rs b/ethcore/benches/evm.rs index 46e5bfb30c..1b8bea52ca 100644 --- a/ethcore/benches/evm.rs +++ b/ethcore/benches/evm.rs @@ -16,17 +16,16 @@ #![feature(test)] -extern crate test; -extern crate ethcore_util as util; -extern crate rand; extern crate bn; -extern crate parity_crypto; +extern crate ethereum_types; extern crate ethkey; +extern crate parity_crypto; +extern crate rand; extern crate rustc_hex; -extern crate ethcore_bigint; +extern crate test; -use self::test::{Bencher}; -use rand::{StdRng}; +use self::test::Bencher; +use rand::StdRng; #[bench] fn bn_128_pairing(b: &mut Bencher) { @@ -62,8 +61,7 @@ fn bn_128_mul(b: &mut Bencher) { fn sha256(b: &mut Bencher) { use parity_crypto::digest::sha256; - let mut input: [u8; 256] = [0; 256]; - let mut out = [0; 32]; + let input = [0_u8; 256]; b.iter(|| { sha256(&input); @@ -74,7 +72,7 @@ fn sha256(b: &mut Bencher) { fn ecrecover(b: &mut Bencher) { use rustc_hex::FromHex; use ethkey::{Signature, recover as ec_recover}; - use ethcore_bigint::hash::H256; + use ethereum_types::H256; let input = FromHex::from_hex("47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad000000000000000000000000000000000000000000000000000000000000001b650acf9d3f5f0a2c799776a1254355d5f4061762a237396a99a0e0e3fc2bcd6729514a0dacb2e623ac4abd157cb18163ff942280db4d5caad66ddf941ba12e03").unwrap(); let hash = H256::from_slice(&input[0..32]); let v = H256::from_slice(&input[32..64]); -- GitLab From a24e78fa925712a42c9e190aac5987dfdb8f099b Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 17 Jul 2018 17:55:46 +0200 Subject: [PATCH 148/191] Receipt constructor `Allocate less stack for blooms` (#9146) * Allocate less stack in `Receipt ctor` * ethcore: use accrue_bloom when computing transaction receipt --- ethcore/types/src/receipt.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethcore/types/src/receipt.rs b/ethcore/types/src/receipt.rs index e9ae1ad8dc..ec3b3c66f5 100644 --- a/ethcore/types/src/receipt.rs +++ b/ethcore/types/src/receipt.rs @@ -52,7 +52,10 @@ impl Receipt { pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec) -> Self { Self { gas_used, - log_bloom: logs.iter().fold(Bloom::default(), |b, l| b | l.bloom()), + log_bloom: logs.iter().fold(Bloom::default(), |mut b, l| { + b.accrue_bloom(&l.bloom()); + b + }), logs, outcome, } -- GitLab From c6e97d4dc5c96184aa0e6967a5e0c6fc6f77d320 Mon Sep 17 00:00:00 2001 From: Thibaut S <33178835+Tbaut@users.noreply.github.com> Date: Tue, 17 Jul 2018 18:36:12 +0200 Subject: [PATCH 149/191] Be more specific for `-l` CLI arguments (#9149) * typo * typo * Update mod.rs --- parity/cli/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 460a78d9b1..267d941e70 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -800,7 +800,7 @@ usage! { ARG arg_logging: (Option) = None, or |c: &Config| c.misc.as_ref()?.logging.clone(), "-l, --logging=[LOGGING]", - "Specify the logging level. Must conform to the same format as RUST_LOG.", + "Specify the general logging level (error, warn, info, debug or trace). It can also be set for a specific module, example: '-l sync=debug, rpc=trace'", ARG arg_log_file: (Option) = None, or |c: &Config| c.misc.as_ref()?.log_file.clone(), "--log-file=[FILENAME]", -- GitLab From 070695b34842d1268749ba8ce859cae8f2b21ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Wed, 18 Jul 2018 08:09:31 +0100 Subject: [PATCH 150/191] parity: fix logging cli parameter example (#9154) --- parity/cli/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 267d941e70..2179344f75 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -800,7 +800,7 @@ usage! { ARG arg_logging: (Option) = None, or |c: &Config| c.misc.as_ref()?.logging.clone(), "-l, --logging=[LOGGING]", - "Specify the general logging level (error, warn, info, debug or trace). It can also be set for a specific module, example: '-l sync=debug, rpc=trace'", + "Specify the general logging level (error, warn, info, debug or trace). It can also be set for a specific module, example: '-l sync=debug,rpc=trace'", ARG arg_log_file: (Option) = None, or |c: &Config| c.misc.as_ref()?.log_file.clone(), "--log-file=[FILENAME]", -- GitLab From 4d9c8926b12345c4ff69e2c80301a7499c852958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 18 Jul 2018 09:14:03 +0200 Subject: [PATCH 151/191] Disable per-sender limit for local transactions. (#9148) * Disable per-sender limit for local transactions. * Add a missing new line. --- miner/src/pool/scoring.rs | 4 ++++ miner/src/pool/tests/mod.rs | 11 +++++------ transaction-pool/src/pool.rs | 1 + transaction-pool/src/scoring.rs | 6 ++++++ transaction-pool/src/tests/helpers.rs | 4 ++++ transaction-pool/src/tests/mod.rs | 27 +++++++++++++++++++++++++++ transaction-pool/src/transactions.rs | 2 +- 7 files changed, 48 insertions(+), 7 deletions(-) diff --git a/miner/src/pool/scoring.rs b/miner/src/pool/scoring.rs index 3592204054..dbe3c08f45 100644 --- a/miner/src/pool/scoring.rs +++ b/miner/src/pool/scoring.rs @@ -143,6 +143,10 @@ impl txpool::Scoring for NonceAndGasPrice { } } } + + fn should_ignore_sender_limit(&self, new: &VerifiedTransaction) -> bool { + new.priority().is_local() + } } #[cfg(test)] diff --git a/miner/src/pool/tests/mod.rs b/miner/src/pool/tests/mod.rs index b5cbaab631..1f69355890 100644 --- a/miner/src/pool/tests/mod.rs +++ b/miner/src/pool/tests/mod.rs @@ -116,12 +116,11 @@ fn should_never_drop_local_transactions_from_different_senders() { let r1 = txq.import(TestClient::new(), vec![tx1].local()); let r2 = txq.import(TestClient::new(), vec![tx2].local()); assert_eq!(r1, vec![Ok(())]); - // max-per-sender is reached, that's ok. - assert_eq!(r2, vec![Err(transaction::Error::LimitReached)]); - assert_eq!(txq.status().status.transaction_count, 1); + assert_eq!(r2, vec![Ok(())]); + assert_eq!(txq.status().status.transaction_count, 2); // then - assert_eq!(txq.next_nonce(TestClient::new(), &sender), Some(nonce + 1.into())); + assert_eq!(txq.next_nonce(TestClient::new(), &sender), Some(nonce + 2.into())); // when let tx1 = Tx::gas_price(2).signed(); @@ -134,8 +133,8 @@ fn should_never_drop_local_transactions_from_different_senders() { // then assert_eq!(res, vec![Ok(()), Ok(())]); assert_eq!(res2, vec![Ok(()), Ok(())]); - assert_eq!(txq.status().status.transaction_count, 5); - assert_eq!(txq.next_nonce(TestClient::new(), &sender), Some(nonce + 1.into())); + assert_eq!(txq.status().status.transaction_count, 6); + assert_eq!(txq.next_nonce(TestClient::new(), &sender), Some(nonce + 2.into())); } #[test] diff --git a/transaction-pool/src/pool.rs b/transaction-pool/src/pool.rs index e2fa36c0e5..c94b736b8f 100644 --- a/transaction-pool/src/pool.rs +++ b/transaction-pool/src/pool.rs @@ -613,3 +613,4 @@ impl<'a, T, R, S, L> Iterator for PendingIterator<'a, T, R, S, L> where None } } + diff --git a/transaction-pool/src/scoring.rs b/transaction-pool/src/scoring.rs index 390e016af9..25189604cd 100644 --- a/transaction-pool/src/scoring.rs +++ b/transaction-pool/src/scoring.rs @@ -102,6 +102,12 @@ pub trait Scoring: fmt::Debug { /// /// NOTE returning `InsertNew` here can lead to some transactions being accepted above pool limits. fn should_replace(&self, old: &T, new: &T) -> Choice; + + /// Decides if the transaction should ignore per-sender limit in the pool. + /// + /// If you return `true` for given transaction it's going to be accepted even though + /// the per-sender limit is exceeded. + fn should_ignore_sender_limit(&self, _new: &T) -> bool { false } } /// A score with a reference to the transaction. diff --git a/transaction-pool/src/tests/helpers.rs b/transaction-pool/src/tests/helpers.rs index 76a81eb9a0..9918db91b4 100644 --- a/transaction-pool/src/tests/helpers.rs +++ b/transaction-pool/src/tests/helpers.rs @@ -77,6 +77,10 @@ impl Scoring for DummyScoring { scoring::Choice::RejectNew } } + + fn should_ignore_sender_limit(&self, _new: &Transaction) -> bool { + self.always_insert + } } #[derive(Default)] diff --git a/transaction-pool/src/tests/mod.rs b/transaction-pool/src/tests/mod.rs index 0029d0622f..85260133e3 100644 --- a/transaction-pool/src/tests/mod.rs +++ b/transaction-pool/src/tests/mod.rs @@ -591,6 +591,33 @@ fn should_not_import_even_if_limit_is_reached_and_should_replace_returns_false() }); } +#[test] +fn should_import_even_if_sender_limit_is_reached() { + // given + let b = TransactionBuilder::default(); + let mut txq = TestPool::with_scoring(DummyScoring::always_insert(), Options { + max_count: 1, + max_per_sender: 1, + ..Default::default() + }); + txq.import(b.tx().nonce(0).gas_price(5).new()).unwrap(); + assert_eq!(txq.light_status(), LightStatus { + transaction_count: 1, + senders: 1, + mem_usage: 0, + }); + + // when + txq.import(b.tx().nonce(1).gas_price(5).new()).unwrap(); + + // then + assert_eq!(txq.light_status(), LightStatus { + transaction_count: 2, + senders: 1, + mem_usage: 0, + }); +} + mod listener { use std::cell::RefCell; use std::rc::Rc; diff --git a/transaction-pool/src/transactions.rs b/transaction-pool/src/transactions.rs index edc26b69f4..96fe2e91bc 100644 --- a/transaction-pool/src/transactions.rs +++ b/transaction-pool/src/transactions.rs @@ -95,7 +95,7 @@ impl> Transactions { fn push_cheapest_transaction(&mut self, tx: Transaction, scoring: &S, max_count: usize) -> AddResult, S::Score> { let index = self.transactions.len(); - if index == max_count { + if index == max_count && !scoring.should_ignore_sender_limit(&tx) { let min_score = self.scores[index - 1].clone(); AddResult::TooCheapToEnter(tx, min_score) } else { -- GitLab From 9f90ff2e597f32c311c5e0d7c08dfb36ac3460e4 Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Wed, 18 Jul 2018 09:24:45 +0200 Subject: [PATCH 152/191] Changelogs for 1.11.7-stable and 2.0.0-beta (#9105) * docs: mark 1.10 as end-of-life * docs: move changelog for 1.11 * docs: Add changelog for 1.11.7-stable * docs: add changelog for 2.0.0-beta * docs: add release notes for 2.0.0 beta * docs: fix links in changelog * docs: Update changelog for 1.11.7-stable * docs: Update changelog for 2.0.0-beta * docs: address @tbaut's comments for the 2.0.0-beta changelog * docs: add note regarding txqueue changes as recommended by @tomusdrw --- CHANGELOG.md | 926 ++++++++++++++--------------------------- docs/CHANGELOG-1.10.md | 2 + docs/CHANGELOG-1.11.md | 680 ++++++++++++++++++++++++++++++ 3 files changed, 985 insertions(+), 623 deletions(-) create mode 100644 docs/CHANGELOG-1.11.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 467c078024..62317341a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,639 +1,319 @@ -## Parity [v1.11.6](https://github.com/paritytech/parity/releases/tag/v1.11.6) (2018-07-09) +## Parity-Ethereum [v2.0.0](https://github.com/paritytech/parity/releases/tag/v2.0.0) "Ethereum" (2018-07-18) -Parity 1.11.6 is a bug-fix release to improve performance and stability. +This is the Parity-Ethereum//v2.0.0-beta release, code-named "Ethereum", **YOLO!** -The full list of included changes: - -- Beta: 1.11.6 backports ([#9015](https://github.com/paritytech/parity/pull/9015)) - - Parity-version: bump beta to 1.11.6 - - Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884)) - - Add support for --chain tobalaba - - Convert indents to tabs :) - - Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998)) - - Aura: only report after checking for repeated skipped primaries - - Aura: refactor duplicate code for getting epoch validator set - - Aura: verify_external: report on validator set contract instance - - Aura: use correct validator set epoch number when reporting - - Aura: use epoch set when verifying blocks - - Aura: report skipped primaries when generating seal - - Aura: handle immediate transitions - - Aura: don't report skipped steps from genesis to first block - - Aura: fix reporting test - - Aura: refactor duplicate code to handle immediate_transitions - - Aura: let reporting fail on verify_block_basic - - Aura: add comment about possible failure of reporting - - Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025)) - - Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470)) - - Don't use ethereum_types in transaction pool. - - Hide internal insertion_id. - - Fix tests. - - Review grumbles. - - Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980)) - - Additional tests for NonceAndGasPrice::should_replace. - - Fix should_replace in the distinct sender case. - - Use natural priority ordering to simplify should_replace. - - Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934)) - - Minimal effective gas price. - - Fix naming, add test - - Fix minimal entry score and add test. - - Fix worst_transaction. - - Remove effective gas price threshold. - - Don't leak gas_price decisions out of Scoring. - - Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity/pull/9002)) - - Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity/pull/9005)) - - Store recently rejected transactions. - - Don't cache AlreadyImported rejections. - - Make the size of transaction verification queue dependent on pool size. - - Add a test for recently rejected. - - Fix logging for recently rejected. - - Make rejection cache smaller. - - Obsolete test removed - - Obsolete test removed - - Construct cache with_capacity. - - Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity/pull/9026)) - - Rpc: return unordered transactions in pending transactions filter - - Ethcore: use LruCache for nonce cache - - Only clear the nonce cache when a block is retracted - - Revert "ethcore: use LruCache for nonce cache" - - This reverts commit b382c19. - - Use only cached nonces when computing pending hashes. - - Give filters their own locks, so that they don't block one another. - - Fix pending transaction count if not sealing. - - Clear cache only when block is enacted. - - Fix RPC tests. - - Address review comments. - - A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity/pull/9024)) - - Clear cache only when block is enacted. - - Add tracing for cull. - - Cull split. - - Cull after creating pending block. - - Add constant, remove sync::read tracing. - - Reset debug. - - Remove excessive tracing. - - Use struct for NonceCache. - - Fix build - - Remove warnings. - - Fix build again. - - Miner: add missing macro use for trace_time - - Ci: remove md5 merge leftovers - -## Parity [v1.11.5](https://github.com/paritytech/parity/releases/tag/v1.11.5) (2018-06-29) - -Parity 1.11.5 is a bug-fix release to improve performance and stability. - -The full list of included changes: - -- Bump beta to 1.11.5 / Backports ([#8955](https://github.com/paritytech/parity/pull/8955)) - - Parity-version: bump beta to 1.11.5 - - Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926)) - - Update hardcoded headers ([#8925](https://github.com/paritytech/parity/pull/8925)) - - Update kovan.json - - Update Kovan to block 7693549 - - Update foundation.json - - Updated to block 5812225 - - Update ropsten.json - - Update to 3465217 - - Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930)) - - CI: enable 'latest' docker tag on master pipeline - - CI: mark both beta and stable as stable snap. - - CI: sign all windows binaries - - Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952)) - - Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943)) - - Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984)) - - Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 - - Snap: use plugin rust - - Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977)) - - Remove js-glue from workspace - - This fixes test error on Rust 1.27 but also prevents js-glue from building itself. - - Builtin dapp users can still use js-glue from crates.io. - - Fix Android build on beta ([#9003](https://github.com/paritytech/parity/pull/9003)) - -## Parity [v1.11.4](https://github.com/paritytech/parity/releases/tag/v1.11.4) (2018-06-20) - -Parity 1.11.4 is a bug-fix release to improve performance and stability. - -The full list of included changes: +Please note, Parity-Ethereum//v2.0.0 comes with some breaking changes that might be interrupting your usual workflows. Please mind them before upgrading: -- Backports ([#8916](https://github.com/paritytech/parity/pull/8916)) - - `Duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity/pull/8457)) - - Duration_ns: u64 -> duration: Duration - - Format on millis {:.2} -> {} - - Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity/pull/8524)) - - Keep all enacted blocks notify in order - - Collect is unnecessary - - Update ChainNotify to use ChainRouteType - - Fix all ethcore fn defs - - Wrap the type within ChainRoute - - Fix private-tx and sync api - - Fix secret_store API - - Fix updater API - - Fix rpc api - - Fix informant api - - Eagerly cache enacted/retracted and remove contain_enacted/retracted - - Fix indent - - Tests: should use full expr form for struct constructor - - Use into_enacted_retracted to further avoid copy - - Typo: not a function - - Rpc/tests: ChainRoute -> ChainRoute::new - - Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity/pull/8796)) - - Add removed geth compatibility field in log - - Fix mocked tests - - Add field block hash in PollFilter - - Store last block hash info for log filters - - Implement canon route - - Use canon logs for fetching reorg logs - - Make sure removed flag is set - - Address grumbles - - Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803)) - - Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822)) - - Scripts: enable docker builds for beta and stable - - Scripts: docker latest should be beta not master - - Scripts: docker latest is master - - Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity/pull/8832)) - - Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity/pull/8834)) - - Reject transactions that are already in pool without verifying them. - - Avoid verifying already imported transactions. - - Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854)) - - Fix concurrent access to signer queue - - Put request back to the queue if confirmation failed - - Typo: fix docs and rename functions to be more specific - - Change trace info "Transaction" -> "Request" - - Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity/pull/8867)) - - Don't allocate via format! in case there's no error - - Fix test? - - Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876)) - - Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886)) - - Add new ovh bootnodes and fix port for foundation bootnode 3.2 - - Remove old bootnodes. - - Remove duplicate 1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082 - - Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891)) - - Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892)) - - Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906)) - - Fix chain supplier increment - - Fix light provider block_headers - - Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity/pull/8853)) - - Remove unused Result wrap in has_account - - Check whether we need to reseal for external transactions - - Fix reference to has_account interface - - Typo: missing ) - - Refactor duplicates to prepare_and_update_sealing - - Fix build - - Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity/pull/8882)) - - Add tx_queue_allow_unknown_local config option - - Refactor flag name + don't change import_own_tx behaviour - - Add fn to TestMinerService - - Avoid race condition from trusted sources -- Parity-version: beta release 1.11.4 ([#8856](https://github.com/paritytech/parity/pull/8856)) - - Cherry-pick network-specific release flag ([#8821](https://github.com/paritytech/parity/pull/8821)) - - Parity-version: bump beta to 1.11.4 - - Parity-version: remove merge leftovers +- The Parity client is now called _Parity-Ethereum_ to distinguish it from other software we provide, such as [_Parity-Bitcoin_](https://github.com/paritytech/parity-bitcoin/) and [_Parity-Polkadot_](https://github.com/paritytech/polkadot) ([#9052](https://github.com/paritytech/parity/pull/9052)). +- The public node and the user interface (a.k.a. _"Parity Wallet"_) are completely removed from the Parity-Ethereum//v2.0.0 client ([#8758](https://github.com/paritytech/parity/pull/8758), [#8783](https://github.com/paritytech/parity/pull/8783), [#8641](https://github.com/paritytech/parity/pull/8641)). Users interested running a Parity Wallet, check out [the stand-alone UI application](https://github.com/Parity-JS/shell/releases). +- The DApps subsystem was completely removed from the client ([#9017](https://github.com/paritytech/parity/pull/9017), [#9107](https://github.com/paritytech/parity/pull/9107)). Again, use the standalone wallet if you wish to continue working with them. +- Windows and MacOS versions are not available as installer anymore and the system trays were removed ([#8778](https://github.com/paritytech/parity/pull/8778)). If you desire to run Parity-Ethereum on Windows or MacOS, you still can get the binaries from our mirrors. Furthermore, MacOS users are encouraged [to use our homebrew tap](https://github.com/paritytech/homebrew-paritytech/). +- Linux versions are not available as deb-/rpm-packages anymore ([#8887](https://github.com/paritytech/parity/pull/8887)). Communities are encouraged to provide their own packages or maintain their own repositories, such as [Arch Linux does](https://www.archlinux.org/packages/community/x86_64/parity/) for instance. +- MD5-checksums are completely replaced by SHA256-checksums ([#8884](https://github.com/paritytech/parity/pull/8884)). This is also reflected on our homepage by now. +- Deprecated, removed, or replaced CLI-options are hidden from client `--help` to further discourage their usage ([#8967](https://github.com/paritytech/parity/pull/8967)). -## Parity [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3) (2018-06-06) - -Parity 1.11.3 is a security-relevant release. Please upgrade your nodes as soon as possible to [v1.10.6](https://github.com/paritytech/parity/releases/tag/v1.10.6) or [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3). - -The full list of included changes: - -- Parity-version: bump beta to 1.11.3 ([#8806](https://github.com/paritytech/parity/pull/8806)) - - Parity-version: bump beta to 1.11.3 - - Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802)) - - Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751)) -- Update shell32-sys to fix windows build ([#8792](https://github.com/paritytech/parity/pull/8792)) -- Backports ([#8785](https://github.com/paritytech/parity/pull/8785)) - - Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) - - Fix #8468 - - Use U256::max_value() instead - - Also change initial transaction gas - - Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544)) - - Start dividing sync chain : first supplier method - - WIP - updated chain sync supplier - - Finish refactoring the Chain Sync Supplier - - Create Chain Sync Requester - - Add Propagator for Chain Sync - - Add the Chain Sync Handler - - Move tests from mod -> handler - - Move tests to propagator - - Refactor SyncRequester arguments - - Refactoring peer fork header handler - - Fix wrong highest block number in snapshot sync - - Small refactor... - - Resume warp-sync downloaded chunks - - Refactoring the previous chunks import - - Address PR grumbles - - Fix not seeding current snapshot - - Update SnapshotService readiness check - - Early abort importing previous chunks - - Update Gitlab CI config - - SyncState back to Waiting when Manifest peers disconnect - - Revert GitLab CI changes - - Refactor resuming snapshots - - Revert "Refactor resuming snapshots" - - Update informant log - - Refactor resuming snapshots - - Update informant message : show chunks done - - Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641)) - - Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity/pull/8642)) - - Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity/pull/8656)) - - Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity/pull/8658)) - - Shutdown the Snapshot Service when shutting down the runner - - Rename `service` to `client_service` - - Fix tests - - Fix cli signer ([#8682](https://github.com/paritytech/parity/pull/8682)) - - Update ethereum-types so `{:#x}` applies 0x prefix - - Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683)) - - Set the request index to that of the current request - - Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686)) - - Fix local transactions policy. ([#8691](https://github.com/paritytech/parity/pull/8691)) - - CI: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity/pull/8745)) - - Ci: Remove check for shared libraries in gitlab script - - Ci: allow android arm build to fail - - Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity/pull/8744)) - - Custom Error Messages on ENFILE and EMFILE IO Errors - - Use assert-matches for more readable tests - - Fix Wording and consistency - - Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity/pull/8710)) -- Parity-version: bump beta to 1.11.2 ([#8750](https://github.com/paritytech/parity/pull/8750)) - - Parity-version: bump beta to 1.11.2 - - Parity-version: unset critical flag - -## Parity [v1.11.1](https://github.com/paritytech/parity/releases/tag/v1.11.1) (2018-05-15) - -This is the Parity 1.11.1-beta release! Hurray! - -Notable changes in reversed alphabetical order: - -- TOOLING: **Whisper CLI** [#8201](https://github.com/paritytech/parity/pull/8201) - - `whisper-cli` is a standalone tool to communicate with the Whisper protocol. - - It provides functionality to specify `whisper-pool-size`, `port` and `address` to use. - - All whisper RPC APIs are enabled and can be directly accessed. -- JSON-RPC API: **Return error in case eth_call returns VM errors** [#8448](https://github.com/paritytech/parity/pull/8448) - - This changes the behaviors of `eth_call` to respect VM errors if any. - - In case of `REVERT`, it will also return the reverted return data in hex format. -- ENGINES: **Block Reward Contract** [#8419](https://github.com/paritytech/parity/pull/8419) - - The _AuRa_ PoA engine has now support for having a contract to calculate the block rewards. - - The engine passes a list of benefactors and reward types to the contract which then returns a list of addresses and respective rewards. -- CORE: **Private Transactions** [#6422](https://github.com/paritytech/parity/pull/6422) - - Parity now provides a private transactions system. - - Please, check out our wiki to get an [overview and setup instructions](https://wiki.parity.io/Private-Transactions.html). -- CORE: **New Transaction Queue implementation** [#8074](https://github.com/paritytech/parity/pull/8074) - - Verification is now done in parallel. - - Previous queue had `O(1)` time to get pending set, but `O(n^2)` insertion time. And obviously insertion/removal happens much more often than retrieving the pending set (only for propagation and pending block building) Currently we have `O(n * log(senders))` pending set time (with cache) and `O(tx_per_sender)` (usually within `log(tx_per_sender)`) insertion time. - - `Scoring` and `Readiness` are separated from the pool, so it's easier to customize them or introduce different definitions (for instance for [EIP-859](https://github.com/ethereum/EIPs/issues/859) or private transactions, etc). - - Banning removed, soft-penalization introduced instead: if transaction exceeds the limit other transactions from that sender get lower priority. - - There is no explicit distinction between current and future transactions in the pool - `Readiness` determines that. Because of this we additionally remove `future` transactions that occupy the pool for long time. -- CONFIGURATION: **Warp-only sync with --warp-barrier [block-number] flag.** [#8228](https://github.com/paritytech/parity/pull/8228) - - Enables warp-only sync in case `--warp-barrier [block-number]` is provided. - - This avoids clients to warp to outdated snapshots that are too far away from the best block. - - This avoids clients to fall back to normal sync if there are no recent snapshots available currently. -- CONFIGURATION: **Disable UI by default.** [#8105](https://github.com/paritytech/parity/pull/8105) - - The user interface is now disabled by default. It still can be activated with the `--force-ui` flag. - - To get the stand-alone Parity UI, please check the dedicated [releases page](https://github.com/parity-js/shell/releases). -- CONFIGURATION: **Auto-updater improvements** [#8078](https://github.com/paritytech/parity/pull/8078) - - Added `--auto-update-delay` to randomly delay updates by `n` blocks. This takes into account the number of the block of the update release (old updates aren't delayed). - - Added `--auto-update-check-frequency` to define the periodicity of auto-update checks in number of blocks. - - This is an important improvement to ensure the network does not update all clients at the same time. -- CHAIN SPECS: **Enable WebAssembly and Byzantium for Ellaism** [#8520](https://github.com/paritytech/parity/pull/8520) - - This activates the Ellaism Byzantium hardfork ([2018-0004-byzantium](https://github.com/ellaism/specs/blob/master/specs/2018-0004-byzantium.md)) at block `2_000_000`. - - This enables the Wasm VM on Ellaism ([2018-0003-wasm-hardfork](https://github.com/ellaism/specs/blob/master/specs/2018-0003-wasm-hardfork.md)) at block `2_000_000`. - - Please, upgrade your clients if you run an Ellaism configuration. -- CHAIN SPECS: **Dev chain - increase gasLimit to 8_000_000** [#8362](https://github.com/paritytech/parity/pull/8362) - - This increases the default block gas limit on development chains to `8_000_000`. - - Please note, this makes previous dev chain configurations incompatible. -- CHAIN SPECS: **Add MCIP-6 Byzyantium transition to Musicoin spec** [#7841](https://github.com/paritytech/parity/pull/7841) - - This activates the Musicoin Byzantium hardfork ([MCIP-6](https://github.com/Musicoin/MCIPs/blob/master/MCIPS/mcip-6.md)) at block `2_222_222`. - - Please, upgrade your clients if you run a Musicoin configuration. - -The full list of included changes: +Additional noteworthy changes to the client: -- Backports ([#8624](https://github.com/paritytech/parity/pull/8624)) - - Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486)) - - Trace precompiled contracts when the transfer value is not zero - - Add tests for precompiled CALL tracing - - Use byzantium test machine for the new test - - Add notes in comments on why we don't trace all precompiles - - Use is_transferred instead of transferred - - Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity/pull/8473)) - - Return error if RLP size of transaction exceeds the limit - - Review comments fixed - - RLP check moved to verifier, corresponding pool test added - - Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity/pull/8530)) - - Alter IO queueing. - - Don't require IoMessages to be Clone - - Ancient blocks imported via IoChannel. - - Get rid of private transactions io message. - - Get rid of deadlock and fix disconnected handler. - - Revert to old disconnect condition. - - Fix tests. - - Fix deadlock. - - Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity/pull/8543)) - - Start dividing sync chain : first supplier method - - WIP - updated chain sync supplier - - Finish refactoring the Chain Sync Supplier - - Create Chain Sync Requester - - Add Propagator for Chain Sync - - Add the Chain Sync Handler - - Move tests from mod -> handler - - Move tests to propagator - - Refactor SyncRequester arguments - - Refactoring peer fork header handler - - Fix wrong highest block number in snapshot sync - - Small refactor... - - Address PR grumbles - - Retry failed CI job - - Fix tests - - PR Grumbles - - Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity/pull/8545)) - - Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity/pull/8555)) - - Support diferent packet counts in different protocol versions. - - Fix light timeouts and eclipse protection. - - Fix devp2p tests. - - Fix whisper-cli compilation. - - Fix compilation. - - Fix ethcore-sync tests. - - Revert "Fix light timeouts and eclipse protection." - - Increase timeouts. - - Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity/pull/8578)) - - Add whisper CLI to the pipelines - - Address todo, ref [#8579](https://github.com/paritytech/parity/pull/8579) - - Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity/pull/8579)) - - Rename whisper-cli binary to whisper - - Fix tests - - Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity/pull/8595)) - - Fix account list double 0x display ([#8596](https://github.com/paritytech/parity/pull/8596)) - - Remove unused self import - - Fix account list double 0x display - - Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity/pull/8611)) - - Fix BlockReward contract "arithmetic operation overflow" - - Add docs on how execute_as_system works - - Fix typo - - Rlp decode returns Result ([#8527](https://github.com/paritytech/parity/pull/8527)) - - Remove expect ([#8536](https://github.com/paritytech/parity/pull/8536)) - - Remove expect and propagate rlp::DecoderErrors as TrieErrors - - Decoding headers can fail ([#8570](https://github.com/paritytech/parity/pull/8570)) - - Rlp::decode returns Result - - Fix journaldb to handle rlp::decode Result - - Fix ethcore to work with rlp::decode returning Result - - Light client handles rlp::decode returning Result - - Fix tests in rlp_derive - - Fix tests - - Cleanup - - Cleanup - - Allow panic rather than breaking out of iterator - - Let decoding failures when reading from disk blow up - - Syntax - - Fix the trivial grumbles - - Fix failing tests - - Make Account::from_rlp return Result - - Syntx, sigh - - Temp-fix for decoding failures - - Header::decode returns Result - - Do not continue reading from the DB when a value could not be read - - Fix tests - - Handle header decoding in light_sync - - Handling header decoding errors - - Let the DecodeError bubble up unchanged - - Remove redundant error conversion - - Fix compiler warning ([#8590](https://github.com/paritytech/parity/pull/8590)) - - Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity/pull/8584)) - - Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity/pull/8581)) - - Block_header can fail so return Result - - Restore previous return type based on feedback - - Fix failing doc tests running on non-code - - Block::decode() returns Result ([#8586](https://github.com/paritytech/parity/pull/8586)) - - Gitlab test script fixes ([#8573](https://github.com/paritytech/parity/pull/8573)) - - Exclude /docs from modified files. - - Ensure all references in the working tree are available - - Remove duplicated line from test script -- Bump beta to 1.11.1 ([#8627](https://github.com/paritytech/parity/pull/8627)) +- Tracing of precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486)) +- _Parity-Ethereum_ as a library now provides APIs for running full and light nodes and a C interface ([#8412](https://github.com/paritytech/parity/pull/8412)). Shared crates are now available in [_Parity-Common_](https://github.com/paritytech/parity-common) ([#9083](https://github.com/paritytech/parity/pull/9083)). +- The Morden database and keys are now moved to a `./Morden` subdirectory instead of `./test` which is by default used by Ropsten ([#8621](https://github.com/paritytech/parity/pull/8621)). +- Adding support for having an on-chain contract calculating the block rewards ([#8419](https://github.com/paritytech/parity/pull/8419)). +- Enforcing warp-only synchronization with `--warp-barrier [blocknumber]` flag ([#8228](https://github.com/paritytech/parity/pull/8228)). +- Adding a fork-choice and meta-data framework suitable for implementing Casper ([#8401](https://github.com/paritytech/parity/pull/8401)). +- Returning an error if RLP-size of a transaction exceeds a 300kB limit ([#8473](https://github.com/paritytech/parity/pull/8473)). +- Warp-sync is now resumable by keeping the downloaded chunks between client restarts. Also, it seeds downloaded snapshots for other nodes ([#8544](https://github.com/paritytech/parity/pull/8544)). +- The developer chain `--chain dev` now contains Byzantium features, this breaks existing developer chains ([#8717](https://github.com/paritytech/parity/pull/8717)). +- The EIP150, EIP160 and EIP161 forks are now to be specified in common params section of a chain-spec file instead of the Ethash params to enable these features on non-proof-of-work chains ([#8614](https://github.com/paritytech/parity/pull/8614)). Please update your chain specs. +- Allowing to disable local-by-default for transactions with new configurations ([#8882](https://github.com/paritytech/parity/pull/8882)). +- Never drop local transactions from different senders ([#9002](https://github.com/paritytech/parity/pull/9002)). +- Optimize pending transactions filter and fix ethstats reporting of pending transactions ([#9026](https://github.com/paritytech/parity/pull/9026)). +- Add separate database directory for light client allowing to run full and light nodes at the same time ([#9064](https://github.com/paritytech/parity/pull/9064)). -## Parity [v1.11.0](https://github.com/paritytech/parity/releases/tag/v1.11.0) (2018-05-09) +If you are upgrading directly from versions 1.10.9 or earlier, please note important changes to our transaction-queue implementation, namely: -This is the Parity 1.11.0-beta release! ~~Hurray!~~ This release has been pulled due to peering issues, please use 1.11.1-beta. +- The pool now limits transactions per-sender (see `--tx-queue-per-sender`), local transactions also have to obey that limit. Consider increasing the limit via CLI-flag when running benchmarks or sending a lot of transactions at once. +- In case the pool is full, transactions received over the network, but originating from accounts that you have private keys for might not get accepted to the pool any more with higher priority. Consider running with larger pool size or submitting the transactions directly on the node via `eth_sendRawTransaction`. The full list of included changes: -- Backports ([#8558](https://github.com/paritytech/parity/pull/8558)) - - Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463)) - - Fetch logs by hash in blockchain database - - Fix tests - - Add unit test for branch block logs fetching - - Add docs that blocks must already be sorted - - Handle branch block cases properly - - typo: empty -> is_empty - - Remove return_empty_if_none by using a closure - - Use BTreeSet to avoid sorting again - - Move is_canon to BlockChain - - typo: pass value by reference - - Use loop and wrap inside blocks to simplify the code - - typo: missed a comment - - Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491)) - - Pass on storage keys even if it is not modified - - typo: account and storage query - - Fix tests - - Use state query directly because of suicided accounts - - Fix a RefCell borrow issue - - Add tests for unmodified storage trace - - Address grumbles - - typo: remove unwanted empty line - - ensure_cached compiles with the original signature - - Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493)) - - Update wasmi to 0.2 - - Update pwasm-utils to 0.1.5 - - Show imported messages for light client ([#8517](https://github.com/paritytech/parity/pull/8517)) - - Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520)) - - Enable WebAssembly and Byzantium for Ellaism - - Fix indentation - - Remove empty lines - - Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity/pull/8522)) - - Don't panic in import_block if invalid rlp - - Remove redundant type annotation - - Replace RLP header view usage with safe decoding - - Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541)) - - network-devp2p: sort nodes in node table using last contact data - - network-devp2p: rename node contact types in node table json output - - network-devp2p: fix node table tests - - network-devp2p: note node failure when failed to establish connection - - network-devp2p: handle UselessPeer error - - network-devp2p: note failure when marking node as useless -- Betalize 1.11 :) ([#8475](https://github.com/paritytech/parity/pull/8475)) - - Betalize 1.11 :) - - Update Gitlab scripts - - Use master as gitlab latest - - Fix snap builds ([#8483](https://github.com/paritytech/parity/pull/8483)) - - Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity/pull/8489)) -- Fix typos in vm description comment ([#8446](https://github.com/paritytech/parity/pull/8446)) -- Add changelog for 1.9.7 and 1.10.2 ([#8460](https://github.com/paritytech/parity/pull/8460)) -- Fix docker build ([#8462](https://github.com/paritytech/parity/pull/8462)) -- Parityshell::open `Return result` ([#8377](https://github.com/paritytech/parity/pull/8377)) -- Return error in case eth_call returns VM errors ([#8448](https://github.com/paritytech/parity/pull/8448)) -- Update wasmi ([#8452](https://github.com/paritytech/parity/pull/8452)) -- Allow 32 bit pipelines to fail ([#8454](https://github.com/paritytech/parity/pull/8454)) -- Update Cargo hidapi-rs dependency ([#8447](https://github.com/paritytech/parity/pull/8447)) -- Private transactions processing error handling ([#8431](https://github.com/paritytech/parity/pull/8431)) -- Improve VM executor stack size estimation rules ([#8439](https://github.com/paritytech/parity/pull/8439)) -- Block reward contract ([#8419](https://github.com/paritytech/parity/pull/8419)) -- Permission fix ([#8441](https://github.com/paritytech/parity/pull/8441)) -- Use forked app_dirs crate for reverted Windows dir behavior ([#8438](https://github.com/paritytech/parity/pull/8438)) -- Remove From::from. ([#8390](https://github.com/paritytech/parity/pull/8390)) -- Move ethcore::Error to error_chain ([#8386](https://github.com/paritytech/parity/pull/8386)) -- Changelogs for 1.9.6 and 1.10.1 ([#8411](https://github.com/paritytech/parity/pull/8411)) -- Fix receipts stripping. ([#8414](https://github.com/paritytech/parity/pull/8414)) -- Typo, docs parity_chainId: empty string -> None ([#8434](https://github.com/paritytech/parity/pull/8434)) -- Update zip to 0.3 ([#8381](https://github.com/paritytech/parity/pull/8381)) -- Fix TODO comments ([#8413](https://github.com/paritytech/parity/pull/8413)) -- Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views ([#8316](https://github.com/paritytech/parity/pull/8316)) -- Tokio-core v0.1.16 -> v0.1.17 ([#8408](https://github.com/paritytech/parity/pull/8408)) -- More code refactoring to integrate Duration ([#8322](https://github.com/paritytech/parity/pull/8322)) -- Remove Tendermint extra_info due to seal inconsistencies ([#8367](https://github.com/paritytech/parity/pull/8367)) -- Use tokio::spawn in secret_store listener and fix Uri ([#8373](https://github.com/paritytech/parity/pull/8373)) -- Unify and limit rocksdb dependency places ([#8371](https://github.com/paritytech/parity/pull/8371)) -- Clarify that windows need perl and yasm ([#8402](https://github.com/paritytech/parity/pull/8402)) -- New Transaction Queue implementation ([#8074](https://github.com/paritytech/parity/pull/8074)) -- Some tweaks to main.rs for parity as a library ([#8370](https://github.com/paritytech/parity/pull/8370)) -- Handle queue import errors a bit more gracefully ([#8385](https://github.com/paritytech/parity/pull/8385)) -- Ci: fix change detection in master builds ([#8382](https://github.com/paritytech/parity/pull/8382)) -- Fix config test by adding no-hardcodec-sync ([#8380](https://github.com/paritytech/parity/pull/8380)) -- Fixed unsafe shell call on windows ([#8372](https://github.com/paritytech/parity/pull/8372)) -- Parity uses winapi 0.3.4 ([#8366](https://github.com/paritytech/parity/pull/8366)) -- No hardcoded client name ([#8368](https://github.com/paritytech/parity/pull/8368)) -- Add `util/mem` to zero out memory on drop. ([#8356](https://github.com/paritytech/parity/pull/8356)) -- Use atty instead of isatty ([#8365](https://github.com/paritytech/parity/pull/8365)) -- Increase gasLimit to 8'000'000 ([#8362](https://github.com/paritytech/parity/pull/8362)) -- Util `fake-fetch` ([#8363](https://github.com/paritytech/parity/pull/8363)) -- Bump snappy and ring, use single rayon version, closes [#8296](https://github.com/paritytech/parity/issues/8296) ([#8364](https://github.com/paritytech/parity/pull/8364)) -- Use async hyper server in secret_store and upgrade igd ([#8359](https://github.com/paritytech/parity/pull/8359)) -- Enable UI by default, but only display deprecation notice ([#8262](https://github.com/paritytech/parity/pull/8262)) -- Ethcrypto renamed to ethcore-crypto and moved to ethcore dir ([#8340](https://github.com/paritytech/parity/pull/8340)) -- Use hyper 0.11 in ethcore-miner and improvements in parity-reactor ([#8335](https://github.com/paritytech/parity/pull/8335)) -- Ethcore-sync ([#8347](https://github.com/paritytech/parity/pull/8347)) -- Rpc, eth_filter: return error if the filter id does not exist ([#8341](https://github.com/paritytech/parity/pull/8341)) -- Ethcore-stratum crate moved to ethcore directory ([#8338](https://github.com/paritytech/parity/pull/8338)) -- Secretstore: get rid of engine.signer dependency ([#8173](https://github.com/paritytech/parity/pull/8173)) -- Whisper cli ([#8201](https://github.com/paritytech/parity/pull/8201)) -- Replace_home for password_files, reserved_peers and log_file ([#8324](https://github.com/paritytech/parity/pull/8324)) -- Add Ethereum Social support ([#8325](https://github.com/paritytech/parity/pull/8325)) -- Private transactions integration pr ([#6422](https://github.com/paritytech/parity/pull/6422)) -- Decouple rocksdb dependency from ethcore ([#8320](https://github.com/paritytech/parity/pull/8320)) -- Remove the clone operation of code_cache ([#8334](https://github.com/paritytech/parity/pull/8334)) -- Fix the JSONRPC API not running with the light client ([#8326](https://github.com/paritytech/parity/pull/8326)) -- Read registry_address from block with REQUEST_CONFIRMATIONS_REQUIRED ([#8309](https://github.com/paritytech/parity/pull/8309)) -- Tweaks and add a Dockerfile for Android ([#8036](https://github.com/paritytech/parity/pull/8036)) -- Use associated type M::Error instead of Error ([#8308](https://github.com/paritytech/parity/pull/8308)) -- Remove InvalidParentHash in favor of assert! ([#8300](https://github.com/paritytech/parity/pull/8300)) -- Bump proc macro deps ([#8310](https://github.com/paritytech/parity/pull/8310)) -- Decouple timestamp open-block-assignment/verification to Engine ([#8305](https://github.com/paritytech/parity/pull/8305)) -- Validate if gas limit is not zero ([#8307](https://github.com/paritytech/parity/pull/8307)) -- Implement Easthub chain spec ([#8295](https://github.com/paritytech/parity/pull/8295)) -- Update some dependencies ([#8285](https://github.com/paritytech/parity/pull/8285)) -- Ethcore now uses Rayon 1.0 as a dependency ([#8296](https://github.com/paritytech/parity/pull/8296)) ([#8304](https://github.com/paritytech/parity/pull/8304)) -- Upgrader `remove raw unwrap` and bump semver ([#8251](https://github.com/paritytech/parity/pull/8251)) -- Cleaner binary shutdown system ([#8284](https://github.com/paritytech/parity/pull/8284)) -- Ethcore now uses rayon to 0.9 as a dependency ([#8296](https://github.com/paritytech/parity/pull/8296)) ([#8302](https://github.com/paritytech/parity/pull/8302)) -- Include suicided accounts in state diff ([#8297](https://github.com/paritytech/parity/pull/8297)) -- Remove evmjit ([#8229](https://github.com/paritytech/parity/pull/8229)) -- Build: fix updater rand dependency in Cargo.lock ([#8298](https://github.com/paritytech/parity/pull/8298)) -- Honor --max-peers if --min-peers is not specified ([#8087](https://github.com/paritytech/parity/pull/8087)) -- Auto-updater improvements ([#8078](https://github.com/paritytech/parity/pull/8078)) -- Dapps-fetcher: calculate keccak in-flight while reading the response ([#8294](https://github.com/paritytech/parity/pull/8294)) -- Cleanup Ellaism bootnodes ([#8276](https://github.com/paritytech/parity/pull/8276)) -- Allow unsafe js eval on Parity Wallet. ([#8204](https://github.com/paritytech/parity/pull/8204)) -- Remove RefCell from Header ([#8227](https://github.com/paritytech/parity/pull/8227)) -- Typo fix: todo with no content ([#8292](https://github.com/paritytech/parity/pull/8292)) -- Revert "ci: disable link-dead-code in coverage build ([#8118](https://github.com/paritytech/parity/pull/8118))" ([#8287](https://github.com/paritytech/parity/pull/8287)) -- Bump ethabi & ethereum-types. ([#8258](https://github.com/paritytech/parity/pull/8258)) -- Allow customization of max WS connections. ([#8257](https://github.com/paritytech/parity/pull/8257)) -- Supress TemporaryInvalid verification failures. ([#8256](https://github.com/paritytech/parity/pull/8256)) -- Return null number for pending block in eth_getBlockByNumber ([#8281](https://github.com/paritytech/parity/pull/8281)) -- Use constant durations ([#8278](https://github.com/paritytech/parity/pull/8278)) -- Typo fix: Mode doc - RLP should be client ([#8283](https://github.com/paritytech/parity/pull/8283)) -- Eth_uninstallfilter should return false for non-existent filter ([#8280](https://github.com/paritytech/parity/pull/8280)) -- Update `app_dirs` to 1.2.1 ([#8268](https://github.com/paritytech/parity/pull/8268)) -- Add missing license header for runtime.rs ([#8252](https://github.com/paritytech/parity/pull/8252)) -- Warp-only sync with warp-barrier [blocknumber] flag. ([#8228](https://github.com/paritytech/parity/pull/8228)) -- Replace all Rlp usages with UntrustedRlp except for ethcore views ([#8233](https://github.com/paritytech/parity/pull/8233)) -- Add test for ethstore-cli, fixes [#8027](https://github.com/paritytech/parity/issues/8027) ([#8187](https://github.com/paritytech/parity/pull/8187)) -- Update musicoin spec in line with gmc v2.6.2 ([#8242](https://github.com/paritytech/parity/pull/8242)) -- Fixed ethcore tx_filter ([#8200](https://github.com/paritytech/parity/pull/8200)) -- Update CLI help for jsonrpc-apis, ws-apis and ipc-apis ([#8234](https://github.com/paritytech/parity/pull/8234)) -- Remove network stats ([#8225](https://github.com/paritytech/parity/pull/8225)) -- Node-filter does not use ChainNotify ([#8231](https://github.com/paritytech/parity/pull/8231)) -- Implement hardcoded sync in the light client ([#8075](https://github.com/paritytech/parity/pull/8075)) -- Update some of the dependencies for WASM ([#8223](https://github.com/paritytech/parity/pull/8223)) -- Bump wasmi version ([#8209](https://github.com/paritytech/parity/pull/8209)) -- Updated jsonrpc to point to the 1.11 branch ([#8180](https://github.com/paritytech/parity/pull/8180)) -- Change name Wallet -> UI ([#8164](https://github.com/paritytech/parity/pull/8164)) -- Introduce Parity UI ([#8202](https://github.com/paritytech/parity/pull/8202)) -- Update Changelogs ([#8175](https://github.com/paritytech/parity/pull/8175)) -- Returns number of topcis to take fr.. ([#8199](https://github.com/paritytech/parity/pull/8199)) -- Make docopt usage non-const ([#8189](https://github.com/paritytech/parity/pull/8189)) -- Avoid allocations when computing triehash. ([#8176](https://github.com/paritytech/parity/pull/8176)) -- Handle rlp decoding Result in patricia trie ([#8166](https://github.com/paritytech/parity/pull/8166)) -- Bump wasm libs ([#8171](https://github.com/paritytech/parity/pull/8171)) -- Re-enable signer, even with no UI. ([#8167](https://github.com/paritytech/parity/pull/8167)) -- Update daemonize ([#8165](https://github.com/paritytech/parity/pull/8165)) -- Some tiny modifications. ([#8163](https://github.com/paritytech/parity/pull/8163)) -- Secretstore: store key author address in db ([#7887](https://github.com/paritytech/parity/pull/7887)) -- Rename DatabaseValueView::new to from_rlp ([#8159](https://github.com/paritytech/parity/pull/8159)) -- Dapps: update parity-ui dependencies ([#8160](https://github.com/paritytech/parity/pull/8160)) -- Disable UI by default. ([#8105](https://github.com/paritytech/parity/pull/8105)) -- Fix wasmi x32 builds ([#8155](https://github.com/paritytech/parity/pull/8155)) -- Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137)) -- Secretstore: ability to identify requester via Public/Address ([#7886](https://github.com/paritytech/parity/pull/7886)) -- Optional dependency on secp256k1 for ethcrypto ([#8109](https://github.com/paritytech/parity/pull/8109)) -- Network: init discovery using healthy nodes ([#8061](https://github.com/paritytech/parity/pull/8061)) -- Check one step deeper if we're on release track branches ([#8134](https://github.com/paritytech/parity/pull/8134)) -- Explicitly mention pruning_history uses RAM ([#8130](https://github.com/paritytech/parity/pull/8130)) -- Remove `ethcrypto::{en,de}crypt_single_message`. ([#8126](https://github.com/paritytech/parity/pull/8126)) -- Fix typo ([#8124](https://github.com/paritytech/parity/pull/8124)) -- Secret_store: use `ecies::encrypt`/`ecies::decrypt`. ([#8125](https://github.com/paritytech/parity/pull/8125)) -- Fix comment for fn gas() in wasm/runtime ([#8122](https://github.com/paritytech/parity/pull/8122)) -- Structured rlp encoding in journaldb ([#8047](https://github.com/paritytech/parity/pull/8047)) -- Ci: disable link-dead-code in coverage build ([#8118](https://github.com/paritytech/parity/pull/8118)) -- Fix trace filter returning returning unrelated reward calls, closes [#8070](https://github.com/paritytech/parity/issues/8070) ([#8098](https://github.com/paritytech/parity/pull/8098)) -- Const time comparison ([#8113](https://github.com/paritytech/parity/pull/8113)) -- Replace reqwest with hyper ([#8099](https://github.com/paritytech/parity/pull/8099)) -- More dos protection ([#8104](https://github.com/paritytech/parity/pull/8104)) -- Remove the time dependency where possible ([#8100](https://github.com/paritytech/parity/pull/8100)) -- Fix comment for gas extern in Wasm runtime ([#8101](https://github.com/paritytech/parity/pull/8101)) -- Replace std::env::temp_dir with tempdir in tests ([#8103](https://github.com/paritytech/parity/pull/8103)) -- Fix Cargo.lock not parsable ([#8102](https://github.com/paritytech/parity/pull/8102)) -- Additional data in EVMTestClient ([#7964](https://github.com/paritytech/parity/pull/7964)) -- Update serde, serde-derive, ethabi-derive, syn, quote and rlp_derive ([#8085](https://github.com/paritytech/parity/pull/8085)) -- Ethcore-service ([#8089](https://github.com/paritytech/parity/pull/8089)) -- [contract-client] refactor ([#7978](https://github.com/paritytech/parity/pull/7978)) -- Revert removing blooms ([#8066](https://github.com/paritytech/parity/pull/8066)) -- Ethcore test::helpers cleanup ([#8086](https://github.com/paritytech/parity/pull/8086)) -- Add some dos protection ([#8084](https://github.com/paritytech/parity/pull/8084)) -- Wasm libraries bump ([#7970](https://github.com/paritytech/parity/pull/7970)) -- Echo back the message hash of a ping in the pong request ([#8042](https://github.com/paritytech/parity/pull/8042)) -- Add Kovan WASM activation blocknumber ([#8057](https://github.com/paritytech/parity/pull/8057)) -- [ethkey] Unify debug/display for Address/Public/Secret ([#8076](https://github.com/paritytech/parity/pull/8076)) -- Limit incoming connections. ([#8060](https://github.com/paritytech/parity/pull/8060)) -- Max code size on Kovan ([#8067](https://github.com/paritytech/parity/pull/8067)) -- Updater: apply exponential backoff after download failure ([#8059](https://github.com/paritytech/parity/pull/8059)) -- Make blockchain functions more idiomatic, avoid needless writes to cache_man ([#8054](https://github.com/paritytech/parity/pull/8054)) -- Make patricia-trie more idiomatic and remove redundant code ([#8056](https://github.com/paritytech/parity/pull/8056)) -- Abstract devp2p ([#8048](https://github.com/paritytech/parity/pull/8048)) -- Update refs to shell ([#8051](https://github.com/paritytech/parity/pull/8051)) -- Fix cache & snapcraft CI build ([#8052](https://github.com/paritytech/parity/pull/8052)) -- Prelude to the block module cleanup ([#8025](https://github.com/paritytech/parity/pull/8025)) -- Add MCIP-6 Byzyantium transition to Musicoin spec ([#7841](https://github.com/paritytech/parity/pull/7841)) -- Bump master to 1.11.0 ([#8021](https://github.com/paritytech/parity/pull/8021)) -- `client` refactoring ([#7038](https://github.com/paritytech/parity/pull/7038)) -- [hardware wallet] sleeping -> pollling ([#8018](https://github.com/paritytech/parity/pull/8018)) -- Fixed broken link in README ([#8012](https://github.com/paritytech/parity/pull/8012)) -- Support parity protocol. ([#8035](https://github.com/paritytech/parity/pull/8035)) -- Add changelog for 1.8.11 stable and 1.9.4 beta ([#8017](https://github.com/paritytech/parity/pull/8017)) -- Fix for verify_block_basic crashing on invalid transaction rlp ([#8032](https://github.com/paritytech/parity/pull/8032)) -- Extract the hard dependency on rocksdb from the light client ([#8034](https://github.com/paritytech/parity/pull/8034)) -- Fixed parsing ethash seals and verify_block_undordered ([#8031](https://github.com/paritytech/parity/pull/8031)) -- Fixed ethstore sign ([#8026](https://github.com/paritytech/parity/pull/8026)) -- Ci: Fix cargo cache ([#7968](https://github.com/paritytech/parity/pull/7968)) -- Update ref to new shell ([#8024](https://github.com/paritytech/parity/pull/8024)) +- Backports to 2.0.0-beta ([#9094](https://github.com/paritytech/parity/pull/9094)) + - Parity-version: betalize 2.0 + - Multiple improvements to discovery ping handling ([#8771](https://github.com/paritytech/parity/pull/8771)) + - Discovery: Only add nodes to routing table after receiving pong. + - Discovery: Refactor packet creation into its own function. + - Discovery: Additional testing for new add_node behavior. + - Discovery: Track expiration of pings to non-yet-in-bucket nodes. + - Discovery: Verify echo hash on pong packets. + - Discovery: Track timeouts on FIND_NODE requests. + - Discovery: Retry failed pings with exponential backoff. + - !fixup Use slice instead of Vec for request_backoff. + - Add separate database directory for light client ([#9064](https://github.com/paritytech/parity/pull/9064)) + - Add separate default DB path for light client ([#8927](https://github.com/paritytech/parity/pull/8927)) + - Improve readability + - Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity/pull/9077))" ([#9097](https://github.com/paritytech/parity/pull/9097)) + - Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity/pull/9077))" + - This reverts commit 7e77932. + - Restore some of the changes + - Update parity-common + - Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity/pull/9099)) + - Fix work-notify. ([#9104](https://github.com/paritytech/parity/pull/9104)) + - Update hidapi, fixes #7542 ([#9108](https://github.com/paritytech/parity/pull/9108)) + - Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity/pull/9111)) + - Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity/pull/9098)) + - Insert Kovan hardcoded headers until 7690241 + - Insert Kovan hardcoded headers until block 7690241 + - Insert Ropsten hardcoded headers until 3612673 + - Insert Mainnet hardcoded headers until block 5941249 + - Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115)) + - Insert ETC (classic) hardcoded headers until block 6170625 ([#9121](https://github.com/paritytech/parity/pull/9121)) + - Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity/pull/9135)) + - Completely remove all dapps struct from rpc ([#9107](https://github.com/paritytech/parity/pull/9107)) + - Completely remove all dapps struct from rpc + - Remove unused pub use + - `evm bench` fix broken dependencies ([#9134](https://github.com/paritytech/parity/pull/9134)) + - `evm bench` use valid dependencies + - Benchmarks of the `evm` used stale versions of a couple a crates that this commit fixes! + - Fix warnings + - Update snapcraft.yaml ([#9132](https://github.com/paritytech/parity/pull/9132)) +- Parity Ethereum 2.0.0 ([#9052](https://github.com/paritytech/parity/pull/9052)) +- Don't fetch snapshot chunks at random ([#9088](https://github.com/paritytech/parity/pull/9088)) +- Remove the dapps system ([#9017](https://github.com/paritytech/parity/pull/9017)) +- Fix nightly warnings ([#9080](https://github.com/paritytech/parity/pull/9080)) +- Db: remove wal disabling / fast-and-loose option. ([#8963](https://github.com/paritytech/parity/pull/8963)) +- Transactions hashes missing in trace_replayBlockTransactions method result [#8725](https://github.com/paritytech/parity/issues/8725) ([#8883](https://github.com/paritytech/parity/pull/8883)) +- Delete crates from parity-ethereum and fetch them from parity-common instead ([#9083](https://github.com/paritytech/parity/pull/9083)) +- Updater verification ([#8787](https://github.com/paritytech/parity/pull/8787)) +- Phrasing, precisions and typos in CLI help ([#9060](https://github.com/paritytech/parity/pull/9060)) +- Some work towards iOS build ([#9045](https://github.com/paritytech/parity/pull/9045)) +- Clean up deprecated options and add CHECK macro ([#9036](https://github.com/paritytech/parity/pull/9036)) +- Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity/pull/9077)) +- Fix warning in secret-store test ([#9074](https://github.com/paritytech/parity/pull/9074)) +- Seedhashcompute remove needless `new` impl ([#9063](https://github.com/paritytech/parity/pull/9063)) +- Remove trait bounds from several structs ([#9055](https://github.com/paritytech/parity/pull/9055)) +- Docs: add changelog for 1.10.9 stable and 1.11.6 beta ([#9069](https://github.com/paritytech/parity/pull/9069)) +- Enable test in `miner/pool/test` ([#9072](https://github.com/paritytech/parity/pull/9072)) +- Fetch: replace futures-timer with tokio-timer ([#9066](https://github.com/paritytech/parity/pull/9066)) +- Remove util-error ([#9054](https://github.com/paritytech/parity/pull/9054)) +- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998)) +- A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity/pull/9024)) +- Reduce number of constraints for triedb types ([#9043](https://github.com/paritytech/parity/pull/9043)) +- Bump fs-swap to 0.2.3 so it is compatible with osx 10.11 again ([#9050](https://github.com/paritytech/parity/pull/9050)) +- Recursive test ([#9042](https://github.com/paritytech/parity/pull/9042)) +- Introduce more optional features in ethcore ([#9020](https://github.com/paritytech/parity/pull/9020)) +- Update ETSC bootnodes ([#9038](https://github.com/paritytech/parity/pull/9038)) +- Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity/pull/9026)) +- Eip160/eip161 spec: u64 -> BlockNumber ([#9044](https://github.com/paritytech/parity/pull/9044)) +- Move the C/C++ example to another directory ([#9032](https://github.com/paritytech/parity/pull/9032)) +- Bump parking_lot to 0.6 ([#9013](https://github.com/paritytech/parity/pull/9013)) +- Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity/pull/9002)) +- Precise HTTP or WebSockets for JSON-RPC options ([#9027](https://github.com/paritytech/parity/pull/9027)) +- Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity/pull/9005)) +- Make HashDB generic ([#8739](https://github.com/paritytech/parity/pull/8739)) +- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025)) +- Update Changelogs for 1.10.8 and 1.11.5 ([#9012](https://github.com/paritytech/parity/pull/9012)) +- Attempt to graceful shutdown in case of panics ([#8999](https://github.com/paritytech/parity/pull/8999)) +- Simplify kvdb error types ([#8924](https://github.com/paritytech/parity/pull/8924)) +- Add option for user to set max size limit for RPC requests ([#9010](https://github.com/paritytech/parity/pull/9010)) +- Bump ntp to 0.5.0 ([#9009](https://github.com/paritytech/parity/pull/9009)) +- Removed duplicate dependency ([#9021](https://github.com/paritytech/parity/pull/9021)) +- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934)) +- Parity: fix db path when migrating to blooms db ([#8975](https://github.com/paritytech/parity/pull/8975)) +- Preserve the current abort behavior ([#8995](https://github.com/paritytech/parity/pull/8995)) +- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980)) +- Tentative fix for missing dependency error ([#8973](https://github.com/paritytech/parity/pull/8973)) +- Refactor evm Instruction to be a c-like enum ([#8914](https://github.com/paritytech/parity/pull/8914)) +- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977)) +- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984)) +- Use local parity-dapps-glue instead of crate published at crates.io ([#8983](https://github.com/paritytech/parity/pull/8983)) +- Parity: omit redundant last imported block number in light sync informant ([#8962](https://github.com/paritytech/parity/pull/8962)) +- Disable hardware-wallets on platforms that don't support `libusb` ([#8464](https://github.com/paritytech/parity/pull/8464)) +- Bump error-chain and quick_error versions ([#8972](https://github.com/paritytech/parity/pull/8972)) +- Evm benchmark utilities ([#8944](https://github.com/paritytech/parity/pull/8944)) +- Parity: hide legacy options from cli --help ([#8967](https://github.com/paritytech/parity/pull/8967)) +- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952)) +- Add type for passwords. ([#8920](https://github.com/paritytech/parity/pull/8920)) +- Deps: bump fs-swap ([#8953](https://github.com/paritytech/parity/pull/8953)) +- Eliminate some more `transmute()` ([#8879](https://github.com/paritytech/parity/pull/8879)) +- Restrict vault.json permssion to owner and using random suffix for temp vault.json file ([#8932](https://github.com/paritytech/parity/pull/8932)) +- Print SS.self_public when starting SS node ([#8949](https://github.com/paritytech/parity/pull/8949)) +- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930)) +- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943)) +- Docs: update changelogs ([#8931](https://github.com/paritytech/parity/pull/8931)) +- Ethcore: fix compilation when using slow-blocks or evm-debug features ([#8936](https://github.com/paritytech/parity/pull/8936)) +- Fixed blooms dir creation ([#8941](https://github.com/paritytech/parity/pull/8941)) +- Update hardcoded headers ([#8925](https://github.com/paritytech/parity/pull/8925)) +- New blooms database ([#8712](https://github.com/paritytech/parity/pull/8712)) +- Ethstore: retry deduplication of wallet file names until success ([#8910](https://github.com/paritytech/parity/pull/8910)) +- Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926)) +- Include node identity in the P2P advertised client version. ([#8830](https://github.com/paritytech/parity/pull/8830)) +- Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity/pull/8882)) +- Allow Poll Lifetime to be configured via CLI ([#8885](https://github.com/paritytech/parity/pull/8885)) +- Cleanup nibbleslice ([#8915](https://github.com/paritytech/parity/pull/8915)) +- Hardware-wallets `Clean up things I missed in the latest PR` ([#8890](https://github.com/paritytech/parity/pull/8890)) +- Remove debian/.deb and centos/.rpm packaging scripts ([#8887](https://github.com/paritytech/parity/pull/8887)) +- Remove a weird emoji in new_social docs ([#8913](https://github.com/paritytech/parity/pull/8913)) +- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906)) +- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891)) +- Fixed osx permissions ([#8901](https://github.com/paritytech/parity/pull/8901)) +- Atomic create new files with permissions to owner in ethstore ([#8896](https://github.com/paritytech/parity/pull/8896)) +- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892)) +- Add support for --chain tobalaba ([#8870](https://github.com/paritytech/parity/pull/8870)) +- Fix some warns on nightly ([#8889](https://github.com/paritytech/parity/pull/8889)) +- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886)) +- Secretstore: service pack 1 ([#8435](https://github.com/paritytech/parity/pull/8435)) +- Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity/pull/8796)) +- Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876)) +- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884)) +- Hardware_wallet/Ledger `Sign messages` + some refactoring ([#8868](https://github.com/paritytech/parity/pull/8868)) +- Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity/pull/8853)) +- Docker: Fix alpine build ([#8878](https://github.com/paritytech/parity/pull/8878)) +- Remove mac os installers etc ([#8875](https://github.com/paritytech/parity/pull/8875)) +- Readme.md: update the list of dependencies ([#8864](https://github.com/paritytech/parity/pull/8864)) +- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854)) +- Tx permission contract improvement ([#8400](https://github.com/paritytech/parity/pull/8400)) +- Limit the number of transactions in pending set ([#8777](https://github.com/paritytech/parity/pull/8777)) +- Use sealing.enabled to emit eth_mining information ([#8844](https://github.com/paritytech/parity/pull/8844)) +- Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity/pull/8867)) +- Fix Cli Return Code on --help for ethkey, ethstore & whisper ([#8863](https://github.com/paritytech/parity/pull/8863)) +- Fix subcrate test compile ([#8862](https://github.com/paritytech/parity/pull/8862)) +- Network-devp2p: downgrade logging to debug, add target ([#8784](https://github.com/paritytech/parity/pull/8784)) +- Clearing up a comment about the prefix for signing ([#8828](https://github.com/paritytech/parity/pull/8828)) +- Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity/pull/8834)) +- Devp2p: Move UDP socket handling from Discovery to Host. ([#8790](https://github.com/paritytech/parity/pull/8790)) +- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803)) +- Specify critical release flag per network ([#8821](https://github.com/paritytech/parity/pull/8821)) +- Fix `deadlock_detection` feature branch compilation ([#8824](https://github.com/paritytech/parity/pull/8824)) +- Use system allocator when profiling memory ([#8831](https://github.com/paritytech/parity/pull/8831)) +- Added from and to to Receipt ([#8756](https://github.com/paritytech/parity/pull/8756)) +- Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity/pull/8832)) +- Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822)) +- Parity: fix indentation in sync logging ([#8794](https://github.com/paritytech/parity/pull/8794)) +- Removed obsolete IpcMode enum ([#8819](https://github.com/paritytech/parity/pull/8819)) +- Remove UI related settings from CLI ([#8783](https://github.com/paritytech/parity/pull/8783)) +- Remove windows tray and installer ([#8778](https://github.com/paritytech/parity/pull/8778)) +- Docs: add changelogs for 1.10.6 and 1.11.3 ([#8810](https://github.com/paritytech/parity/pull/8810)) +- Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751)) +- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802)) +- Fix evmbin compilation ([#8795](https://github.com/paritytech/parity/pull/8795)) +- Have space between feature cfg flag ([#8791](https://github.com/paritytech/parity/pull/8791)) +- Rpc: fix address formatting in TransactionRequest Display ([#8786](https://github.com/paritytech/parity/pull/8786)) +- Conditionally compile ethcore public test helpers ([#8743](https://github.com/paritytech/parity/pull/8743)) +- Remove Result wrapper from AccountProvider in RPC impls ([#8763](https://github.com/paritytech/parity/pull/8763)) +- Update `license header` and `scripts` ([#8666](https://github.com/paritytech/parity/pull/8666)) +- Remove HostTrait altogether ([#8681](https://github.com/paritytech/parity/pull/8681)) +- Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity/pull/8710)) +- Remove public node settings from cli ([#8758](https://github.com/paritytech/parity/pull/8758)) +- Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity/pull/8744)) +- Ci: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity/pull/8745)) +- Remove NetworkService::config() ([#8653](https://github.com/paritytech/parity/pull/8653)) +- Fix XOR distance calculation in discovery Kademlia impl ([#8589](https://github.com/paritytech/parity/pull/8589)) +- Print warnings when fetching pending blocks ([#8711](https://github.com/paritytech/parity/pull/8711)) +- Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity/pull/8656)) +- Remove -k/--insecure option from curl installer ([#8719](https://github.com/paritytech/parity/pull/8719)) +- Ease tiny-keccak version requirements (1.4.1 -> 1.4) ([#8726](https://github.com/paritytech/parity/pull/8726)) +- Bump tinykeccak to 1.4 ([#8728](https://github.com/paritytech/parity/pull/8728)) +- Remove a couple of unnecessary `transmute()` ([#8736](https://github.com/paritytech/parity/pull/8736)) +- Fix some nits using clippy ([#8731](https://github.com/paritytech/parity/pull/8731)) +- Add 'interface' option to cli ([#8699](https://github.com/paritytech/parity/pull/8699)) +- Remove unused function new_pow_test_spec ([#8735](https://github.com/paritytech/parity/pull/8735)) +- Add a deadlock detection thread ([#8727](https://github.com/paritytech/parity/pull/8727)) +- Fix local transactions policy. ([#8691](https://github.com/paritytech/parity/pull/8691)) +- Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity/pull/8658)) +- Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686)) +- Fix compilation error on nightly rust ([#8707](https://github.com/paritytech/parity/pull/8707)) +- Add a test for decoding corrupt data ([#8713](https://github.com/paritytech/parity/pull/8713)) +- Update dev chain ([#8717](https://github.com/paritytech/parity/pull/8717)) +- Remove unused imports ([#8722](https://github.com/paritytech/parity/pull/8722)) +- Implement recursive Debug for Nodes in patrica_trie::TrieDB ([#8697](https://github.com/paritytech/parity/pull/8697)) +- Parity: trim whitespace when parsing duration strings ([#8692](https://github.com/paritytech/parity/pull/8692)) +- Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683)) +- Remove empty file ([#8705](https://github.com/paritytech/parity/pull/8705)) +- Update mod.rs ([#8695](https://github.com/paritytech/parity/pull/8695)) +- Use impl Future in the light client RPC helpers ([#8628](https://github.com/paritytech/parity/pull/8628)) +- Fix cli signer ([#8682](https://github.com/paritytech/parity/pull/8682)) +- Allow making direct RPC queries from the C API ([#8588](https://github.com/paritytech/parity/pull/8588)) +- Remove the error when stopping the network ([#8671](https://github.com/paritytech/parity/pull/8671)) +- Move connection_filter to the network crate ([#8674](https://github.com/paritytech/parity/pull/8674)) +- Remove HostInfo::client_version() and secret() ([#8677](https://github.com/paritytech/parity/pull/8677)) +- Refactor EIP150, EIP160 and EIP161 forks to be specified in CommonParams ([#8614](https://github.com/paritytech/parity/pull/8614)) +- Parity: improve cli help and logging ([#8665](https://github.com/paritytech/parity/pull/8665)) +- Updated tiny-keccak to 1.4.2 ([#8669](https://github.com/paritytech/parity/pull/8669)) +- Remove the Keccak C library and use the pure Rust impl ([#8657](https://github.com/paritytech/parity/pull/8657)) +- Remove HostInfo::next_nonce ([#8644](https://github.com/paritytech/parity/pull/8644)) +- Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity/pull/8642)) +- Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544)) +- Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641)) +- Changelog for 1.10.4-stable and 1.11.1-beta ([#8637](https://github.com/paritytech/parity/pull/8637)) +- Typo ([#8640](https://github.com/paritytech/parity/pull/8640)) +- Fork choice and metadata framework for Engine ([#8401](https://github.com/paritytech/parity/pull/8401)) +- Check that the Android build doesn't dep on c++_shared ([#8538](https://github.com/paritytech/parity/pull/8538)) +- Remove NetworkContext::io_channel() ([#8625](https://github.com/paritytech/parity/pull/8625)) +- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) +- Store morden db and keys in "path/to/parity/data/Morden" (ropsten uses "test", like before) ([#8621](https://github.com/paritytech/parity/pull/8621)) +- ´main.rs´ typo ([#8629](https://github.com/paritytech/parity/pull/8629)) +- Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity/pull/8611)) +- Gitlab test script fixes ([#8573](https://github.com/paritytech/parity/pull/8573)) +- Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity/pull/8595)) +- Fix account list double 0x display ([#8596](https://github.com/paritytech/parity/pull/8596)) +- Typo: wrong indentation in kovan config ([#8610](https://github.com/paritytech/parity/pull/8610)) +- Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity/pull/8555)) +- Use full qualified syntax for itertools::Itertools::flatten ([#8606](https://github.com/paritytech/parity/pull/8606)) +- 2 tiny modification on snapshot ([#8601](https://github.com/paritytech/parity/pull/8601)) +- Fix the mio test again ([#8602](https://github.com/paritytech/parity/pull/8602)) +- Remove inject.js server-side injection for dapps ([#8539](https://github.com/paritytech/parity/pull/8539)) +- Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity/pull/8581)) +- Block::decode() returns Result ([#8586](https://github.com/paritytech/parity/pull/8586)) +- Fix compiler warning ([#8590](https://github.com/paritytech/parity/pull/8590)) +- Fix Parity UI link ([#8600](https://github.com/paritytech/parity/pull/8600)) +- Make mio optional in ethcore-io ([#8537](https://github.com/paritytech/parity/pull/8537)) +- Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity/pull/8584)) +- Changelog and Readme ([#8591](https://github.com/paritytech/parity/pull/8591)) +- Added Dockerfile for alpine linux by @andresilva, closes [#3565](https://github.com/paritytech/parity/issues/3565) ([#8587](https://github.com/paritytech/parity/pull/8587)) +- Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity/pull/8578)) +- Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity/pull/8579)) +- Changelog nit ([#8585](https://github.com/paritytech/parity/pull/8585)) +- Remove unnecessary cloning in overwrite_with ([#8580](https://github.com/paritytech/parity/pull/8580)) +- Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity/pull/8545)) +- Update CHANGELOG for 1.9, 1.10, and 1.11 ([#8556](https://github.com/paritytech/parity/pull/8556)) +- Decoding headers can fail ([#8570](https://github.com/paritytech/parity/pull/8570)) +- Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity/pull/8543)) +- Remove State::replace_backend ([#8569](https://github.com/paritytech/parity/pull/8569)) +- Make trace-time publishable. ([#8568](https://github.com/paritytech/parity/pull/8568)) +- Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity/pull/8530)) +- Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486)) +- Parity as a library ([#8412](https://github.com/paritytech/parity/pull/8412)) +- Rlp decode returns Result ([#8527](https://github.com/paritytech/parity/pull/8527)) +- Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541)) +- Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity/pull/8524)) +- Ethcore, rpc, machine: refactor block reward application and tracing ([#8490](https://github.com/paritytech/parity/pull/8490)) +- Consolidate crypto functionality in `ethcore-crypto`. ([#8432](https://github.com/paritytech/parity/pull/8432)) +- Eip 145: Bitwise shifting instructions in EVM ([#8451](https://github.com/paritytech/parity/pull/8451)) +- Remove expect ([#8536](https://github.com/paritytech/parity/pull/8536)) +- Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity/pull/8522)) +- Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491)) +- Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463)) +- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470)) +- More changes for Android ([#8421](https://github.com/paritytech/parity/pull/8421)) +- Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520)) +- Secretstore: merge two types of errors into single one + Error::is_non_fatal ([#8357](https://github.com/paritytech/parity/pull/8357)) +- Hardware Wallet trait ([#8071](https://github.com/paritytech/parity/pull/8071)) +- Directly return None if tracing is disabled ([#8504](https://github.com/paritytech/parity/pull/8504)) +- Show imported messages for light client ([#8517](https://github.com/paritytech/parity/pull/8517)) +- Remove unused dependency `bigint` ([#8505](https://github.com/paritytech/parity/pull/8505)) +- `duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity/pull/8457)) +- Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity/pull/8473)) +- Remove three old warp boot nodes. ([#8497](https://github.com/paritytech/parity/pull/8497)) +- Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493)) +- Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity/pull/8489)) +- Fix snap builds ([#8483](https://github.com/paritytech/parity/pull/8483)) +- Bump master to 1.12 ([#8477](https://github.com/paritytech/parity/pull/8477)) +- Don't require write lock when fetching status. ([#8481](https://github.com/paritytech/parity/pull/8481)) +- Use rename_all for RichBlock and RichHeader serialization ([#8471](https://github.com/paritytech/parity/pull/8471)) ## Previous releases -- [CHANGELOG-1.10](docs/CHANGELOG-1.10.md) (_stable_) +- [CHANGELOG-1.11](docs/CHANGELOG-1.11.md) (_stable_) +- [CHANGELOG-1.10](docs/CHANGELOG-1.10.md) (EOL: 2018-07-18) - [CHANGELOG-1.9](docs/CHANGELOG-1.9.md) (EOL: 2018-05-09) - [CHANGELOG-1.8](docs/CHANGELOG-1.8.md) (EOL: 2018-03-22) - [CHANGELOG-1.7](docs/CHANGELOG-1.7.md) (EOL: 2018-01-25) diff --git a/docs/CHANGELOG-1.10.md b/docs/CHANGELOG-1.10.md index caa440f6d7..21a18cbb31 100644 --- a/docs/CHANGELOG-1.10.md +++ b/docs/CHANGELOG-1.10.md @@ -1,3 +1,5 @@ +Note: Parity 1.10 reached End-of-Life on 2018-07-18 (EOL). + ## Parity [v1.10.9](https://github.com/paritytech/parity/releases/tag/v1.10.9) (2018-07-07) Parity 1.10.9 is a bug-fix release to improve performance and stability. diff --git a/docs/CHANGELOG-1.11.md b/docs/CHANGELOG-1.11.md new file mode 100644 index 0000000000..ecbcf62e2f --- /dev/null +++ b/docs/CHANGELOG-1.11.md @@ -0,0 +1,680 @@ +## Parity [v1.11.7](https://github.com/paritytech/parity/releases/tag/v1.11.7) "Prosperity" (2018-07-17) + +Parity 1.11.7 "Prosperity" is a bug-fix release to improve performance and stability that marks the 1.11 release track as `stable`. Among other fixes, this release significantly addresses peering and synchronization issues. If you experienced such issues before, upgrading is highly recommended. If you rely on old versions of Parity, check out the `old-stable-1.10` branch, cherry-pick fixes, and compile your binaries independently. There will be no official support for any versions prior to 1.11.7, however (EOL). + +If you are upgrading directly from versions 1.10.9 or earlier, please note important changes to our transaction-queue implementation, namely: + +- The pool now limits transactions per-sender (see `--tx-queue-per-sender`), local transactions also have to obey that limit. Consider increasing the limit via CLI-flag when running benchmarks or sending a lot of transactions at once. +- In case the pool is full, transactions received over the network, but originating from accounts that you have private keys for might not get accepted to the pool any more with higher priority. Consider running with larger pool size or submitting the transactions directly on the node via `eth_sendRawTransaction`. + +The full list of included changes: + +- Backports to 1.11.7-stable ([#9093](https://github.com/paritytech/parity/pull/9093)) + - Parity-version: stabilize 1.11 + - Parity-version: bump stable to 1.11.7 + - Don't fetch snapshot chunks at random ([#9088](https://github.com/paritytech/parity/pull/9088)) + - Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity/pull/9099)) + - Limit the number of transactions in pending set ([#8777](https://github.com/paritytech/parity/pull/8777)) + - Unordered iterator. + - Use unordered and limited set if full not required. + - Split timeout work into smaller timers. + - Avoid collecting all pending transactions when mining + - Remove println. + - Use priority ordering in eth-filter. + - Fix ethcore-miner tests and tx propagation. + - Review grumbles addressed. + - Add test for unordered not populating the cache. + - Fix ethcore tests. + - Fix light tests. + - Fix ethcore-sync tests. + - Fix RPC tests. + - Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115)) + - Update hidapi, fixes #7542 ([#9108](https://github.com/paritytech/parity/pull/9108)) + - Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity/pull/9111)) + - Fix miner tests. + - Revert "Make sure to produce full blocks." + - This reverts commit b12d592. + - Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity/pull/9098)) + - Insert Kovan hardcoded headers until 7690241 + - Insert Kovan hardcoded headers until block 7690241 + - Insert Ropsten hardcoded headers until 3612673 + - Insert Mainnet hardcoded headers until block 5941249 + - Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115)) + - Insert ETC (classic) hardcoded headers until block 6170625 ([#9121](https://github.com/paritytech/parity/pull/9121)) + - Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity/pull/9135)) + - `evm bench` fix broken dependencies ([#9134](https://github.com/paritytech/parity/pull/9134)) + - `evm bench` use valid dependencies + - Fix warnings + +## Parity [v1.11.6](https://github.com/paritytech/parity/releases/tag/v1.11.6) (2018-07-09) + +Parity 1.11.6 is a bug-fix release to improve performance and stability. + +The full list of included changes: + +- Beta: 1.11.6 backports ([#9015](https://github.com/paritytech/parity/pull/9015)) + - Parity-version: bump beta to 1.11.6 + - Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884)) + - Add support for --chain tobalaba + - Convert indents to tabs :) + - Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998)) + - Aura: only report after checking for repeated skipped primaries + - Aura: refactor duplicate code for getting epoch validator set + - Aura: verify_external: report on validator set contract instance + - Aura: use correct validator set epoch number when reporting + - Aura: use epoch set when verifying blocks + - Aura: report skipped primaries when generating seal + - Aura: handle immediate transitions + - Aura: don't report skipped steps from genesis to first block + - Aura: fix reporting test + - Aura: refactor duplicate code to handle immediate_transitions + - Aura: let reporting fail on verify_block_basic + - Aura: add comment about possible failure of reporting + - Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025)) + - Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470)) + - Don't use ethereum_types in transaction pool. + - Hide internal insertion_id. + - Fix tests. + - Review grumbles. + - Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980)) + - Additional tests for NonceAndGasPrice::should_replace. + - Fix should_replace in the distinct sender case. + - Use natural priority ordering to simplify should_replace. + - Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934)) + - Minimal effective gas price. + - Fix naming, add test + - Fix minimal entry score and add test. + - Fix worst_transaction. + - Remove effective gas price threshold. + - Don't leak gas_price decisions out of Scoring. + - Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity/pull/9002)) + - Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity/pull/9005)) + - Store recently rejected transactions. + - Don't cache AlreadyImported rejections. + - Make the size of transaction verification queue dependent on pool size. + - Add a test for recently rejected. + - Fix logging for recently rejected. + - Make rejection cache smaller. + - Obsolete test removed + - Obsolete test removed + - Construct cache with_capacity. + - Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity/pull/9026)) + - Rpc: return unordered transactions in pending transactions filter + - Ethcore: use LruCache for nonce cache + - Only clear the nonce cache when a block is retracted + - Revert "ethcore: use LruCache for nonce cache" + - This reverts commit b382c19. + - Use only cached nonces when computing pending hashes. + - Give filters their own locks, so that they don't block one another. + - Fix pending transaction count if not sealing. + - Clear cache only when block is enacted. + - Fix RPC tests. + - Address review comments. + - A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity/pull/9024)) + - Clear cache only when block is enacted. + - Add tracing for cull. + - Cull split. + - Cull after creating pending block. + - Add constant, remove sync::read tracing. + - Reset debug. + - Remove excessive tracing. + - Use struct for NonceCache. + - Fix build + - Remove warnings. + - Fix build again. + - Miner: add missing macro use for trace_time + - Ci: remove md5 merge leftovers + +## Parity [v1.11.5](https://github.com/paritytech/parity/releases/tag/v1.11.5) (2018-06-29) + +Parity 1.11.5 is a bug-fix release to improve performance and stability. + +The full list of included changes: + +- Bump beta to 1.11.5 / Backports ([#8955](https://github.com/paritytech/parity/pull/8955)) + - Parity-version: bump beta to 1.11.5 + - Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926)) + - Update hardcoded headers ([#8925](https://github.com/paritytech/parity/pull/8925)) + - Update kovan.json + - Update Kovan to block 7693549 + - Update foundation.json + - Updated to block 5812225 + - Update ropsten.json + - Update to 3465217 + - Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930)) + - CI: enable 'latest' docker tag on master pipeline + - CI: mark both beta and stable as stable snap. + - CI: sign all windows binaries + - Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952)) + - Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943)) + - Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984)) + - Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 + - Snap: use plugin rust + - Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977)) + - Remove js-glue from workspace + - This fixes test error on Rust 1.27 but also prevents js-glue from building itself. + - Builtin dapp users can still use js-glue from crates.io. + - Fix Android build on beta ([#9003](https://github.com/paritytech/parity/pull/9003)) + +## Parity [v1.11.4](https://github.com/paritytech/parity/releases/tag/v1.11.4) (2018-06-20) + +Parity 1.11.4 is a bug-fix release to improve performance and stability. + +The full list of included changes: + +- Backports ([#8916](https://github.com/paritytech/parity/pull/8916)) + - `Duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity/pull/8457)) + - Duration_ns: u64 -> duration: Duration + - Format on millis {:.2} -> {} + - Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity/pull/8524)) + - Keep all enacted blocks notify in order + - Collect is unnecessary + - Update ChainNotify to use ChainRouteType + - Fix all ethcore fn defs + - Wrap the type within ChainRoute + - Fix private-tx and sync api + - Fix secret_store API + - Fix updater API + - Fix rpc api + - Fix informant api + - Eagerly cache enacted/retracted and remove contain_enacted/retracted + - Fix indent + - Tests: should use full expr form for struct constructor + - Use into_enacted_retracted to further avoid copy + - Typo: not a function + - Rpc/tests: ChainRoute -> ChainRoute::new + - Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity/pull/8796)) + - Add removed geth compatibility field in log + - Fix mocked tests + - Add field block hash in PollFilter + - Store last block hash info for log filters + - Implement canon route + - Use canon logs for fetching reorg logs + - Make sure removed flag is set + - Address grumbles + - Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803)) + - Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822)) + - Scripts: enable docker builds for beta and stable + - Scripts: docker latest should be beta not master + - Scripts: docker latest is master + - Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity/pull/8832)) + - Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity/pull/8834)) + - Reject transactions that are already in pool without verifying them. + - Avoid verifying already imported transactions. + - Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854)) + - Fix concurrent access to signer queue + - Put request back to the queue if confirmation failed + - Typo: fix docs and rename functions to be more specific + - Change trace info "Transaction" -> "Request" + - Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity/pull/8867)) + - Don't allocate via format! in case there's no error + - Fix test? + - Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876)) + - Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886)) + - Add new ovh bootnodes and fix port for foundation bootnode 3.2 + - Remove old bootnodes. + - Remove duplicate 1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082 + - Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891)) + - Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892)) + - Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906)) + - Fix chain supplier increment + - Fix light provider block_headers + - Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity/pull/8853)) + - Remove unused Result wrap in has_account + - Check whether we need to reseal for external transactions + - Fix reference to has_account interface + - Typo: missing ) + - Refactor duplicates to prepare_and_update_sealing + - Fix build + - Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity/pull/8882)) + - Add tx_queue_allow_unknown_local config option + - Refactor flag name + don't change import_own_tx behaviour + - Add fn to TestMinerService + - Avoid race condition from trusted sources +- Parity-version: beta release 1.11.4 ([#8856](https://github.com/paritytech/parity/pull/8856)) + - Cherry-pick network-specific release flag ([#8821](https://github.com/paritytech/parity/pull/8821)) + - Parity-version: bump beta to 1.11.4 + - Parity-version: remove merge leftovers + +## Parity [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3) (2018-06-06) + +Parity 1.11.3 is a security-relevant release. Please upgrade your nodes as soon as possible to [v1.10.6](https://github.com/paritytech/parity/releases/tag/v1.10.6) or [v1.11.3](https://github.com/paritytech/parity/releases/tag/v1.11.3). + +The full list of included changes: + +- Parity-version: bump beta to 1.11.3 ([#8806](https://github.com/paritytech/parity/pull/8806)) + - Parity-version: bump beta to 1.11.3 + - Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802)) + - Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751)) +- Update shell32-sys to fix windows build ([#8792](https://github.com/paritytech/parity/pull/8792)) +- Backports ([#8785](https://github.com/paritytech/parity/pull/8785)) + - Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) + - Fix #8468 + - Use U256::max_value() instead + - Also change initial transaction gas + - Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544)) + - Start dividing sync chain : first supplier method + - WIP - updated chain sync supplier + - Finish refactoring the Chain Sync Supplier + - Create Chain Sync Requester + - Add Propagator for Chain Sync + - Add the Chain Sync Handler + - Move tests from mod -> handler + - Move tests to propagator + - Refactor SyncRequester arguments + - Refactoring peer fork header handler + - Fix wrong highest block number in snapshot sync + - Small refactor... + - Resume warp-sync downloaded chunks + - Refactoring the previous chunks import + - Address PR grumbles + - Fix not seeding current snapshot + - Update SnapshotService readiness check + - Early abort importing previous chunks + - Update Gitlab CI config + - SyncState back to Waiting when Manifest peers disconnect + - Revert GitLab CI changes + - Refactor resuming snapshots + - Revert "Refactor resuming snapshots" + - Update informant log + - Refactor resuming snapshots + - Update informant message : show chunks done + - Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641)) + - Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity/pull/8642)) + - Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity/pull/8656)) + - Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity/pull/8658)) + - Shutdown the Snapshot Service when shutting down the runner + - Rename `service` to `client_service` + - Fix tests + - Fix cli signer ([#8682](https://github.com/paritytech/parity/pull/8682)) + - Update ethereum-types so `{:#x}` applies 0x prefix + - Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683)) + - Set the request index to that of the current request + - Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686)) + - Fix local transactions policy. ([#8691](https://github.com/paritytech/parity/pull/8691)) + - CI: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity/pull/8745)) + - Ci: Remove check for shared libraries in gitlab script + - Ci: allow android arm build to fail + - Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity/pull/8744)) + - Custom Error Messages on ENFILE and EMFILE IO Errors + - Use assert-matches for more readable tests + - Fix Wording and consistency + - Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity/pull/8710)) +- Parity-version: bump beta to 1.11.2 ([#8750](https://github.com/paritytech/parity/pull/8750)) + - Parity-version: bump beta to 1.11.2 + - Parity-version: unset critical flag + +## Parity [v1.11.1](https://github.com/paritytech/parity/releases/tag/v1.11.1) (2018-05-15) + +This is the Parity 1.11.1-beta release! Hurray! + +Notable changes in reversed alphabetical order: + +- TOOLING: **Whisper CLI** [#8201](https://github.com/paritytech/parity/pull/8201) + - `whisper-cli` is a standalone tool to communicate with the Whisper protocol. + - It provides functionality to specify `whisper-pool-size`, `port` and `address` to use. + - All whisper RPC APIs are enabled and can be directly accessed. +- JSON-RPC API: **Return error in case eth_call returns VM errors** [#8448](https://github.com/paritytech/parity/pull/8448) + - This changes the behaviors of `eth_call` to respect VM errors if any. + - In case of `REVERT`, it will also return the reverted return data in hex format. +- ENGINES: **Block Reward Contract** [#8419](https://github.com/paritytech/parity/pull/8419) + - The _AuRa_ PoA engine has now support for having a contract to calculate the block rewards. + - The engine passes a list of benefactors and reward types to the contract which then returns a list of addresses and respective rewards. +- CORE: **Private Transactions** [#6422](https://github.com/paritytech/parity/pull/6422) + - Parity now provides a private transactions system. + - Please, check out our wiki to get an [overview and setup instructions](https://wiki.parity.io/Private-Transactions.html). +- CORE: **New Transaction Queue implementation** [#8074](https://github.com/paritytech/parity/pull/8074) + - Verification is now done in parallel. + - Previous queue had `O(1)` time to get pending set, but `O(n^2)` insertion time. And obviously insertion/removal happens much more often than retrieving the pending set (only for propagation and pending block building) Currently we have `O(n * log(senders))` pending set time (with cache) and `O(tx_per_sender)` (usually within `log(tx_per_sender)`) insertion time. + - `Scoring` and `Readiness` are separated from the pool, so it's easier to customize them or introduce different definitions (for instance for [EIP-859](https://github.com/ethereum/EIPs/issues/859) or private transactions, etc). + - Banning removed, soft-penalization introduced instead: if transaction exceeds the limit other transactions from that sender get lower priority. + - There is no explicit distinction between current and future transactions in the pool - `Readiness` determines that. Because of this we additionally remove `future` transactions that occupy the pool for long time. +- CONFIGURATION: **Warp-only sync with --warp-barrier [block-number] flag.** [#8228](https://github.com/paritytech/parity/pull/8228) + - Enables warp-only sync in case `--warp-barrier [block-number]` is provided. + - This avoids clients to warp to outdated snapshots that are too far away from the best block. + - This avoids clients to fall back to normal sync if there are no recent snapshots available currently. +- CONFIGURATION: **Disable UI by default.** [#8105](https://github.com/paritytech/parity/pull/8105) + - The user interface is now disabled by default. It still can be activated with the `--force-ui` flag. + - To get the stand-alone Parity UI, please check the dedicated [releases page](https://github.com/parity-js/shell/releases). +- CONFIGURATION: **Auto-updater improvements** [#8078](https://github.com/paritytech/parity/pull/8078) + - Added `--auto-update-delay` to randomly delay updates by `n` blocks. This takes into account the number of the block of the update release (old updates aren't delayed). + - Added `--auto-update-check-frequency` to define the periodicity of auto-update checks in number of blocks. + - This is an important improvement to ensure the network does not update all clients at the same time. +- CHAIN SPECS: **Enable WebAssembly and Byzantium for Ellaism** [#8520](https://github.com/paritytech/parity/pull/8520) + - This activates the Ellaism Byzantium hardfork ([2018-0004-byzantium](https://github.com/ellaism/specs/blob/master/specs/2018-0004-byzantium.md)) at block `2_000_000`. + - This enables the Wasm VM on Ellaism ([2018-0003-wasm-hardfork](https://github.com/ellaism/specs/blob/master/specs/2018-0003-wasm-hardfork.md)) at block `2_000_000`. + - Please, upgrade your clients if you run an Ellaism configuration. +- CHAIN SPECS: **Dev chain - increase gasLimit to 8_000_000** [#8362](https://github.com/paritytech/parity/pull/8362) + - This increases the default block gas limit on development chains to `8_000_000`. + - Please note, this makes previous dev chain configurations incompatible. +- CHAIN SPECS: **Add MCIP-6 Byzyantium transition to Musicoin spec** [#7841](https://github.com/paritytech/parity/pull/7841) + - This activates the Musicoin Byzantium hardfork ([MCIP-6](https://github.com/Musicoin/MCIPs/blob/master/MCIPS/mcip-6.md)) at block `2_222_222`. + - Please, upgrade your clients if you run a Musicoin configuration. + +The full list of included changes: + +- Backports ([#8624](https://github.com/paritytech/parity/pull/8624)) + - Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486)) + - Trace precompiled contracts when the transfer value is not zero + - Add tests for precompiled CALL tracing + - Use byzantium test machine for the new test + - Add notes in comments on why we don't trace all precompiles + - Use is_transferred instead of transferred + - Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity/pull/8473)) + - Return error if RLP size of transaction exceeds the limit + - Review comments fixed + - RLP check moved to verifier, corresponding pool test added + - Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity/pull/8530)) + - Alter IO queueing. + - Don't require IoMessages to be Clone + - Ancient blocks imported via IoChannel. + - Get rid of private transactions io message. + - Get rid of deadlock and fix disconnected handler. + - Revert to old disconnect condition. + - Fix tests. + - Fix deadlock. + - Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity/pull/8543)) + - Start dividing sync chain : first supplier method + - WIP - updated chain sync supplier + - Finish refactoring the Chain Sync Supplier + - Create Chain Sync Requester + - Add Propagator for Chain Sync + - Add the Chain Sync Handler + - Move tests from mod -> handler + - Move tests to propagator + - Refactor SyncRequester arguments + - Refactoring peer fork header handler + - Fix wrong highest block number in snapshot sync + - Small refactor... + - Address PR grumbles + - Retry failed CI job + - Fix tests + - PR Grumbles + - Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity/pull/8545)) + - Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity/pull/8555)) + - Support diferent packet counts in different protocol versions. + - Fix light timeouts and eclipse protection. + - Fix devp2p tests. + - Fix whisper-cli compilation. + - Fix compilation. + - Fix ethcore-sync tests. + - Revert "Fix light timeouts and eclipse protection." + - Increase timeouts. + - Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity/pull/8578)) + - Add whisper CLI to the pipelines + - Address todo, ref [#8579](https://github.com/paritytech/parity/pull/8579) + - Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity/pull/8579)) + - Rename whisper-cli binary to whisper + - Fix tests + - Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity/pull/8595)) + - Fix account list double 0x display ([#8596](https://github.com/paritytech/parity/pull/8596)) + - Remove unused self import + - Fix account list double 0x display + - Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity/pull/8611)) + - Fix BlockReward contract "arithmetic operation overflow" + - Add docs on how execute_as_system works + - Fix typo + - Rlp decode returns Result ([#8527](https://github.com/paritytech/parity/pull/8527)) + - Remove expect ([#8536](https://github.com/paritytech/parity/pull/8536)) + - Remove expect and propagate rlp::DecoderErrors as TrieErrors + - Decoding headers can fail ([#8570](https://github.com/paritytech/parity/pull/8570)) + - Rlp::decode returns Result + - Fix journaldb to handle rlp::decode Result + - Fix ethcore to work with rlp::decode returning Result + - Light client handles rlp::decode returning Result + - Fix tests in rlp_derive + - Fix tests + - Cleanup + - Cleanup + - Allow panic rather than breaking out of iterator + - Let decoding failures when reading from disk blow up + - Syntax + - Fix the trivial grumbles + - Fix failing tests + - Make Account::from_rlp return Result + - Syntx, sigh + - Temp-fix for decoding failures + - Header::decode returns Result + - Do not continue reading from the DB when a value could not be read + - Fix tests + - Handle header decoding in light_sync + - Handling header decoding errors + - Let the DecodeError bubble up unchanged + - Remove redundant error conversion + - Fix compiler warning ([#8590](https://github.com/paritytech/parity/pull/8590)) + - Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity/pull/8584)) + - Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity/pull/8581)) + - Block_header can fail so return Result + - Restore previous return type based on feedback + - Fix failing doc tests running on non-code + - Block::decode() returns Result ([#8586](https://github.com/paritytech/parity/pull/8586)) + - Gitlab test script fixes ([#8573](https://github.com/paritytech/parity/pull/8573)) + - Exclude /docs from modified files. + - Ensure all references in the working tree are available + - Remove duplicated line from test script +- Bump beta to 1.11.1 ([#8627](https://github.com/paritytech/parity/pull/8627)) + +## Parity [v1.11.0](https://github.com/paritytech/parity/releases/tag/v1.11.0) (2018-05-09) + +This is the Parity 1.11.0-beta release! ~~Hurray!~~ This release has been pulled due to peering issues, please use 1.11.1-beta. + +The full list of included changes: + +- Backports ([#8558](https://github.com/paritytech/parity/pull/8558)) + - Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463)) + - Fetch logs by hash in blockchain database + - Fix tests + - Add unit test for branch block logs fetching + - Add docs that blocks must already be sorted + - Handle branch block cases properly + - typo: empty -> is_empty + - Remove return_empty_if_none by using a closure + - Use BTreeSet to avoid sorting again + - Move is_canon to BlockChain + - typo: pass value by reference + - Use loop and wrap inside blocks to simplify the code + - typo: missed a comment + - Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491)) + - Pass on storage keys even if it is not modified + - typo: account and storage query + - Fix tests + - Use state query directly because of suicided accounts + - Fix a RefCell borrow issue + - Add tests for unmodified storage trace + - Address grumbles + - typo: remove unwanted empty line + - ensure_cached compiles with the original signature + - Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493)) + - Update wasmi to 0.2 + - Update pwasm-utils to 0.1.5 + - Show imported messages for light client ([#8517](https://github.com/paritytech/parity/pull/8517)) + - Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520)) + - Enable WebAssembly and Byzantium for Ellaism + - Fix indentation + - Remove empty lines + - Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity/pull/8522)) + - Don't panic in import_block if invalid rlp + - Remove redundant type annotation + - Replace RLP header view usage with safe decoding + - Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541)) + - network-devp2p: sort nodes in node table using last contact data + - network-devp2p: rename node contact types in node table json output + - network-devp2p: fix node table tests + - network-devp2p: note node failure when failed to establish connection + - network-devp2p: handle UselessPeer error + - network-devp2p: note failure when marking node as useless +- Betalize 1.11 :) ([#8475](https://github.com/paritytech/parity/pull/8475)) + - Betalize 1.11 :) + - Update Gitlab scripts + - Use master as gitlab latest + - Fix snap builds ([#8483](https://github.com/paritytech/parity/pull/8483)) + - Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity/pull/8489)) +- Fix typos in vm description comment ([#8446](https://github.com/paritytech/parity/pull/8446)) +- Add changelog for 1.9.7 and 1.10.2 ([#8460](https://github.com/paritytech/parity/pull/8460)) +- Fix docker build ([#8462](https://github.com/paritytech/parity/pull/8462)) +- Parityshell::open `Return result` ([#8377](https://github.com/paritytech/parity/pull/8377)) +- Return error in case eth_call returns VM errors ([#8448](https://github.com/paritytech/parity/pull/8448)) +- Update wasmi ([#8452](https://github.com/paritytech/parity/pull/8452)) +- Allow 32 bit pipelines to fail ([#8454](https://github.com/paritytech/parity/pull/8454)) +- Update Cargo hidapi-rs dependency ([#8447](https://github.com/paritytech/parity/pull/8447)) +- Private transactions processing error handling ([#8431](https://github.com/paritytech/parity/pull/8431)) +- Improve VM executor stack size estimation rules ([#8439](https://github.com/paritytech/parity/pull/8439)) +- Block reward contract ([#8419](https://github.com/paritytech/parity/pull/8419)) +- Permission fix ([#8441](https://github.com/paritytech/parity/pull/8441)) +- Use forked app_dirs crate for reverted Windows dir behavior ([#8438](https://github.com/paritytech/parity/pull/8438)) +- Remove From::from. ([#8390](https://github.com/paritytech/parity/pull/8390)) +- Move ethcore::Error to error_chain ([#8386](https://github.com/paritytech/parity/pull/8386)) +- Changelogs for 1.9.6 and 1.10.1 ([#8411](https://github.com/paritytech/parity/pull/8411)) +- Fix receipts stripping. ([#8414](https://github.com/paritytech/parity/pull/8414)) +- Typo, docs parity_chainId: empty string -> None ([#8434](https://github.com/paritytech/parity/pull/8434)) +- Update zip to 0.3 ([#8381](https://github.com/paritytech/parity/pull/8381)) +- Fix TODO comments ([#8413](https://github.com/paritytech/parity/pull/8413)) +- Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views ([#8316](https://github.com/paritytech/parity/pull/8316)) +- Tokio-core v0.1.16 -> v0.1.17 ([#8408](https://github.com/paritytech/parity/pull/8408)) +- More code refactoring to integrate Duration ([#8322](https://github.com/paritytech/parity/pull/8322)) +- Remove Tendermint extra_info due to seal inconsistencies ([#8367](https://github.com/paritytech/parity/pull/8367)) +- Use tokio::spawn in secret_store listener and fix Uri ([#8373](https://github.com/paritytech/parity/pull/8373)) +- Unify and limit rocksdb dependency places ([#8371](https://github.com/paritytech/parity/pull/8371)) +- Clarify that windows need perl and yasm ([#8402](https://github.com/paritytech/parity/pull/8402)) +- New Transaction Queue implementation ([#8074](https://github.com/paritytech/parity/pull/8074)) +- Some tweaks to main.rs for parity as a library ([#8370](https://github.com/paritytech/parity/pull/8370)) +- Handle queue import errors a bit more gracefully ([#8385](https://github.com/paritytech/parity/pull/8385)) +- Ci: fix change detection in master builds ([#8382](https://github.com/paritytech/parity/pull/8382)) +- Fix config test by adding no-hardcodec-sync ([#8380](https://github.com/paritytech/parity/pull/8380)) +- Fixed unsafe shell call on windows ([#8372](https://github.com/paritytech/parity/pull/8372)) +- Parity uses winapi 0.3.4 ([#8366](https://github.com/paritytech/parity/pull/8366)) +- No hardcoded client name ([#8368](https://github.com/paritytech/parity/pull/8368)) +- Add `util/mem` to zero out memory on drop. ([#8356](https://github.com/paritytech/parity/pull/8356)) +- Use atty instead of isatty ([#8365](https://github.com/paritytech/parity/pull/8365)) +- Increase gasLimit to 8'000'000 ([#8362](https://github.com/paritytech/parity/pull/8362)) +- Util `fake-fetch` ([#8363](https://github.com/paritytech/parity/pull/8363)) +- Bump snappy and ring, use single rayon version, closes [#8296](https://github.com/paritytech/parity/issues/8296) ([#8364](https://github.com/paritytech/parity/pull/8364)) +- Use async hyper server in secret_store and upgrade igd ([#8359](https://github.com/paritytech/parity/pull/8359)) +- Enable UI by default, but only display deprecation notice ([#8262](https://github.com/paritytech/parity/pull/8262)) +- Ethcrypto renamed to ethcore-crypto and moved to ethcore dir ([#8340](https://github.com/paritytech/parity/pull/8340)) +- Use hyper 0.11 in ethcore-miner and improvements in parity-reactor ([#8335](https://github.com/paritytech/parity/pull/8335)) +- Ethcore-sync ([#8347](https://github.com/paritytech/parity/pull/8347)) +- Rpc, eth_filter: return error if the filter id does not exist ([#8341](https://github.com/paritytech/parity/pull/8341)) +- Ethcore-stratum crate moved to ethcore directory ([#8338](https://github.com/paritytech/parity/pull/8338)) +- Secretstore: get rid of engine.signer dependency ([#8173](https://github.com/paritytech/parity/pull/8173)) +- Whisper cli ([#8201](https://github.com/paritytech/parity/pull/8201)) +- Replace_home for password_files, reserved_peers and log_file ([#8324](https://github.com/paritytech/parity/pull/8324)) +- Add Ethereum Social support ([#8325](https://github.com/paritytech/parity/pull/8325)) +- Private transactions integration pr ([#6422](https://github.com/paritytech/parity/pull/6422)) +- Decouple rocksdb dependency from ethcore ([#8320](https://github.com/paritytech/parity/pull/8320)) +- Remove the clone operation of code_cache ([#8334](https://github.com/paritytech/parity/pull/8334)) +- Fix the JSONRPC API not running with the light client ([#8326](https://github.com/paritytech/parity/pull/8326)) +- Read registry_address from block with REQUEST_CONFIRMATIONS_REQUIRED ([#8309](https://github.com/paritytech/parity/pull/8309)) +- Tweaks and add a Dockerfile for Android ([#8036](https://github.com/paritytech/parity/pull/8036)) +- Use associated type M::Error instead of Error ([#8308](https://github.com/paritytech/parity/pull/8308)) +- Remove InvalidParentHash in favor of assert! ([#8300](https://github.com/paritytech/parity/pull/8300)) +- Bump proc macro deps ([#8310](https://github.com/paritytech/parity/pull/8310)) +- Decouple timestamp open-block-assignment/verification to Engine ([#8305](https://github.com/paritytech/parity/pull/8305)) +- Validate if gas limit is not zero ([#8307](https://github.com/paritytech/parity/pull/8307)) +- Implement Easthub chain spec ([#8295](https://github.com/paritytech/parity/pull/8295)) +- Update some dependencies ([#8285](https://github.com/paritytech/parity/pull/8285)) +- Ethcore now uses Rayon 1.0 as a dependency ([#8296](https://github.com/paritytech/parity/pull/8296)) ([#8304](https://github.com/paritytech/parity/pull/8304)) +- Upgrader `remove raw unwrap` and bump semver ([#8251](https://github.com/paritytech/parity/pull/8251)) +- Cleaner binary shutdown system ([#8284](https://github.com/paritytech/parity/pull/8284)) +- Ethcore now uses rayon to 0.9 as a dependency ([#8296](https://github.com/paritytech/parity/pull/8296)) ([#8302](https://github.com/paritytech/parity/pull/8302)) +- Include suicided accounts in state diff ([#8297](https://github.com/paritytech/parity/pull/8297)) +- Remove evmjit ([#8229](https://github.com/paritytech/parity/pull/8229)) +- Build: fix updater rand dependency in Cargo.lock ([#8298](https://github.com/paritytech/parity/pull/8298)) +- Honor --max-peers if --min-peers is not specified ([#8087](https://github.com/paritytech/parity/pull/8087)) +- Auto-updater improvements ([#8078](https://github.com/paritytech/parity/pull/8078)) +- Dapps-fetcher: calculate keccak in-flight while reading the response ([#8294](https://github.com/paritytech/parity/pull/8294)) +- Cleanup Ellaism bootnodes ([#8276](https://github.com/paritytech/parity/pull/8276)) +- Allow unsafe js eval on Parity Wallet. ([#8204](https://github.com/paritytech/parity/pull/8204)) +- Remove RefCell from Header ([#8227](https://github.com/paritytech/parity/pull/8227)) +- Typo fix: todo with no content ([#8292](https://github.com/paritytech/parity/pull/8292)) +- Revert "ci: disable link-dead-code in coverage build ([#8118](https://github.com/paritytech/parity/pull/8118))" ([#8287](https://github.com/paritytech/parity/pull/8287)) +- Bump ethabi & ethereum-types. ([#8258](https://github.com/paritytech/parity/pull/8258)) +- Allow customization of max WS connections. ([#8257](https://github.com/paritytech/parity/pull/8257)) +- Supress TemporaryInvalid verification failures. ([#8256](https://github.com/paritytech/parity/pull/8256)) +- Return null number for pending block in eth_getBlockByNumber ([#8281](https://github.com/paritytech/parity/pull/8281)) +- Use constant durations ([#8278](https://github.com/paritytech/parity/pull/8278)) +- Typo fix: Mode doc - RLP should be client ([#8283](https://github.com/paritytech/parity/pull/8283)) +- Eth_uninstallfilter should return false for non-existent filter ([#8280](https://github.com/paritytech/parity/pull/8280)) +- Update `app_dirs` to 1.2.1 ([#8268](https://github.com/paritytech/parity/pull/8268)) +- Add missing license header for runtime.rs ([#8252](https://github.com/paritytech/parity/pull/8252)) +- Warp-only sync with warp-barrier [blocknumber] flag. ([#8228](https://github.com/paritytech/parity/pull/8228)) +- Replace all Rlp usages with UntrustedRlp except for ethcore views ([#8233](https://github.com/paritytech/parity/pull/8233)) +- Add test for ethstore-cli, fixes [#8027](https://github.com/paritytech/parity/issues/8027) ([#8187](https://github.com/paritytech/parity/pull/8187)) +- Update musicoin spec in line with gmc v2.6.2 ([#8242](https://github.com/paritytech/parity/pull/8242)) +- Fixed ethcore tx_filter ([#8200](https://github.com/paritytech/parity/pull/8200)) +- Update CLI help for jsonrpc-apis, ws-apis and ipc-apis ([#8234](https://github.com/paritytech/parity/pull/8234)) +- Remove network stats ([#8225](https://github.com/paritytech/parity/pull/8225)) +- Node-filter does not use ChainNotify ([#8231](https://github.com/paritytech/parity/pull/8231)) +- Implement hardcoded sync in the light client ([#8075](https://github.com/paritytech/parity/pull/8075)) +- Update some of the dependencies for WASM ([#8223](https://github.com/paritytech/parity/pull/8223)) +- Bump wasmi version ([#8209](https://github.com/paritytech/parity/pull/8209)) +- Updated jsonrpc to point to the 1.11 branch ([#8180](https://github.com/paritytech/parity/pull/8180)) +- Change name Wallet -> UI ([#8164](https://github.com/paritytech/parity/pull/8164)) +- Introduce Parity UI ([#8202](https://github.com/paritytech/parity/pull/8202)) +- Update Changelogs ([#8175](https://github.com/paritytech/parity/pull/8175)) +- Returns number of topcis to take fr.. ([#8199](https://github.com/paritytech/parity/pull/8199)) +- Make docopt usage non-const ([#8189](https://github.com/paritytech/parity/pull/8189)) +- Avoid allocations when computing triehash. ([#8176](https://github.com/paritytech/parity/pull/8176)) +- Handle rlp decoding Result in patricia trie ([#8166](https://github.com/paritytech/parity/pull/8166)) +- Bump wasm libs ([#8171](https://github.com/paritytech/parity/pull/8171)) +- Re-enable signer, even with no UI. ([#8167](https://github.com/paritytech/parity/pull/8167)) +- Update daemonize ([#8165](https://github.com/paritytech/parity/pull/8165)) +- Some tiny modifications. ([#8163](https://github.com/paritytech/parity/pull/8163)) +- Secretstore: store key author address in db ([#7887](https://github.com/paritytech/parity/pull/7887)) +- Rename DatabaseValueView::new to from_rlp ([#8159](https://github.com/paritytech/parity/pull/8159)) +- Dapps: update parity-ui dependencies ([#8160](https://github.com/paritytech/parity/pull/8160)) +- Disable UI by default. ([#8105](https://github.com/paritytech/parity/pull/8105)) +- Fix wasmi x32 builds ([#8155](https://github.com/paritytech/parity/pull/8155)) +- Postpone Kovan hard fork ([#8137](https://github.com/paritytech/parity/pull/8137)) +- Secretstore: ability to identify requester via Public/Address ([#7886](https://github.com/paritytech/parity/pull/7886)) +- Optional dependency on secp256k1 for ethcrypto ([#8109](https://github.com/paritytech/parity/pull/8109)) +- Network: init discovery using healthy nodes ([#8061](https://github.com/paritytech/parity/pull/8061)) +- Check one step deeper if we're on release track branches ([#8134](https://github.com/paritytech/parity/pull/8134)) +- Explicitly mention pruning_history uses RAM ([#8130](https://github.com/paritytech/parity/pull/8130)) +- Remove `ethcrypto::{en,de}crypt_single_message`. ([#8126](https://github.com/paritytech/parity/pull/8126)) +- Fix typo ([#8124](https://github.com/paritytech/parity/pull/8124)) +- Secret_store: use `ecies::encrypt`/`ecies::decrypt`. ([#8125](https://github.com/paritytech/parity/pull/8125)) +- Fix comment for fn gas() in wasm/runtime ([#8122](https://github.com/paritytech/parity/pull/8122)) +- Structured rlp encoding in journaldb ([#8047](https://github.com/paritytech/parity/pull/8047)) +- Ci: disable link-dead-code in coverage build ([#8118](https://github.com/paritytech/parity/pull/8118)) +- Fix trace filter returning returning unrelated reward calls, closes [#8070](https://github.com/paritytech/parity/issues/8070) ([#8098](https://github.com/paritytech/parity/pull/8098)) +- Const time comparison ([#8113](https://github.com/paritytech/parity/pull/8113)) +- Replace reqwest with hyper ([#8099](https://github.com/paritytech/parity/pull/8099)) +- More dos protection ([#8104](https://github.com/paritytech/parity/pull/8104)) +- Remove the time dependency where possible ([#8100](https://github.com/paritytech/parity/pull/8100)) +- Fix comment for gas extern in Wasm runtime ([#8101](https://github.com/paritytech/parity/pull/8101)) +- Replace std::env::temp_dir with tempdir in tests ([#8103](https://github.com/paritytech/parity/pull/8103)) +- Fix Cargo.lock not parsable ([#8102](https://github.com/paritytech/parity/pull/8102)) +- Additional data in EVMTestClient ([#7964](https://github.com/paritytech/parity/pull/7964)) +- Update serde, serde-derive, ethabi-derive, syn, quote and rlp_derive ([#8085](https://github.com/paritytech/parity/pull/8085)) +- Ethcore-service ([#8089](https://github.com/paritytech/parity/pull/8089)) +- [contract-client] refactor ([#7978](https://github.com/paritytech/parity/pull/7978)) +- Revert removing blooms ([#8066](https://github.com/paritytech/parity/pull/8066)) +- Ethcore test::helpers cleanup ([#8086](https://github.com/paritytech/parity/pull/8086)) +- Add some dos protection ([#8084](https://github.com/paritytech/parity/pull/8084)) +- Wasm libraries bump ([#7970](https://github.com/paritytech/parity/pull/7970)) +- Echo back the message hash of a ping in the pong request ([#8042](https://github.com/paritytech/parity/pull/8042)) +- Add Kovan WASM activation blocknumber ([#8057](https://github.com/paritytech/parity/pull/8057)) +- [ethkey] Unify debug/display for Address/Public/Secret ([#8076](https://github.com/paritytech/parity/pull/8076)) +- Limit incoming connections. ([#8060](https://github.com/paritytech/parity/pull/8060)) +- Max code size on Kovan ([#8067](https://github.com/paritytech/parity/pull/8067)) +- Updater: apply exponential backoff after download failure ([#8059](https://github.com/paritytech/parity/pull/8059)) +- Make blockchain functions more idiomatic, avoid needless writes to cache_man ([#8054](https://github.com/paritytech/parity/pull/8054)) +- Make patricia-trie more idiomatic and remove redundant code ([#8056](https://github.com/paritytech/parity/pull/8056)) +- Abstract devp2p ([#8048](https://github.com/paritytech/parity/pull/8048)) +- Update refs to shell ([#8051](https://github.com/paritytech/parity/pull/8051)) +- Fix cache & snapcraft CI build ([#8052](https://github.com/paritytech/parity/pull/8052)) +- Prelude to the block module cleanup ([#8025](https://github.com/paritytech/parity/pull/8025)) +- Add MCIP-6 Byzyantium transition to Musicoin spec ([#7841](https://github.com/paritytech/parity/pull/7841)) +- Bump master to 1.11.0 ([#8021](https://github.com/paritytech/parity/pull/8021)) +- `client` refactoring ([#7038](https://github.com/paritytech/parity/pull/7038)) +- [hardware wallet] sleeping -> pollling ([#8018](https://github.com/paritytech/parity/pull/8018)) +- Fixed broken link in README ([#8012](https://github.com/paritytech/parity/pull/8012)) +- Support parity protocol. ([#8035](https://github.com/paritytech/parity/pull/8035)) +- Add changelog for 1.8.11 stable and 1.9.4 beta ([#8017](https://github.com/paritytech/parity/pull/8017)) +- Fix for verify_block_basic crashing on invalid transaction rlp ([#8032](https://github.com/paritytech/parity/pull/8032)) +- Extract the hard dependency on rocksdb from the light client ([#8034](https://github.com/paritytech/parity/pull/8034)) +- Fixed parsing ethash seals and verify_block_undordered ([#8031](https://github.com/paritytech/parity/pull/8031)) +- Fixed ethstore sign ([#8026](https://github.com/paritytech/parity/pull/8026)) +- Ci: Fix cargo cache ([#7968](https://github.com/paritytech/parity/pull/7968)) +- Update ref to new shell ([#8024](https://github.com/paritytech/parity/pull/8024)) -- GitLab From dbccc700f1ad5c40307fc52c6d511a8684b0b19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Wed, 18 Jul 2018 10:58:14 +0200 Subject: [PATCH 153/191] Remove unused tx_queue_gas parameter. (#9153) --- parity/cli/mod.rs | 7 ------- parity/cli/tests/config.full.toml | 1 - parity/cli/tests/config.toml | 1 - 3 files changed, 9 deletions(-) diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 2179344f75..d67da3db7b 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -720,10 +720,6 @@ usage! { "--tx-queue-per-sender=[LIMIT]", "Maximum number of transactions per sender in the queue. By default it's 1% of the entire queue, but not less than 16.", - ARG arg_tx_queue_gas: (String) = "off", or |c: &Config| c.mining.as_ref()?.tx_queue_gas.clone(), - "--tx-queue-gas=[LIMIT]", - "Maximum amount of total gas for external transactions in the queue. LIMIT can be either an amount of gas or 'auto' or 'off'. 'auto' sets the limit to be 20x the current block gas limit.", - ARG arg_tx_queue_strategy: (String) = "gas_price", or |c: &Config| c.mining.as_ref()?.tx_queue_strategy.clone(), "--tx-queue-strategy=[S]", "Prioritization strategy used to order transactions in the queue. S may be: gas_price - Prioritize txs with high gas price", @@ -1303,7 +1299,6 @@ struct Mining { tx_queue_size: Option, tx_queue_per_sender: Option, tx_queue_mem_limit: Option, - tx_queue_gas: Option, tx_queue_strategy: Option, tx_queue_ban_count: Option, tx_queue_ban_time: Option, @@ -1729,7 +1724,6 @@ mod tests { arg_tx_queue_size: 8192usize, arg_tx_queue_per_sender: None, arg_tx_queue_mem_limit: 4u32, - arg_tx_queue_gas: "off".into(), arg_tx_queue_strategy: "gas_factor".into(), arg_tx_queue_ban_count: Some(1u16), arg_tx_queue_ban_time: Some(180u16), @@ -1991,7 +1985,6 @@ mod tests { tx_queue_size: Some(8192), tx_queue_per_sender: None, tx_queue_mem_limit: None, - tx_queue_gas: Some("off".into()), tx_queue_strategy: None, tx_queue_ban_count: None, tx_queue_ban_time: None, diff --git a/parity/cli/tests/config.full.toml b/parity/cli/tests/config.full.toml index 0c1efb1840..2dcba6f195 100644 --- a/parity/cli/tests/config.full.toml +++ b/parity/cli/tests/config.full.toml @@ -128,7 +128,6 @@ price_update_period = "hourly" gas_floor_target = "4700000" gas_cap = "6283184" tx_queue_size = 8192 -tx_queue_gas = "off" tx_queue_strategy = "gas_factor" tx_queue_ban_count = 1 tx_queue_ban_time = 180 #s diff --git a/parity/cli/tests/config.toml b/parity/cli/tests/config.toml index 245935de12..9fffe4cb05 100644 --- a/parity/cli/tests/config.toml +++ b/parity/cli/tests/config.toml @@ -57,7 +57,6 @@ reseal_min_period = 4000 reseal_max_period = 60000 price_update_period = "hourly" tx_queue_size = 8192 -tx_queue_gas = "off" [footprint] tracing = "on" -- GitLab From 3c27587d83567a2538f9768830e11a59ddf3c26c Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 18 Jul 2018 16:27:29 +0200 Subject: [PATCH 154/191] Remove node-health (#9119) * Remove node-health * Remove ntp_servers * Add --ntp-servers as legacy instead of removing it * Add --ntp-servers to deprecated args * Remove unused stuff * Remove _legacy_ntp_servers --- Cargo.lock | 46 ---- Cargo.toml | 1 - node-health/Cargo.toml | 18 -- node-health/src/health.rs | 122 ---------- node-health/src/lib.rs | 49 ---- node-health/src/time.rs | 357 ------------------------------ node-health/src/types.rs | 57 ----- parity/cli/mod.rs | 12 +- parity/cli/tests/config.toml | 1 - parity/configuration.rs | 11 - parity/deprecated.rs | 6 + parity/lib.rs | 1 - parity/rpc_apis.rs | 5 - parity/run.rs | 55 ----- rpc/Cargo.toml | 1 - rpc/src/lib.rs | 1 - rpc/src/v1/impls/light/parity.rs | 9 - rpc/src/v1/impls/parity.rs | 11 +- rpc/src/v1/tests/mocked/parity.rs | 27 --- rpc/src/v1/traits/parity.rs | 5 - 20 files changed, 12 insertions(+), 783 deletions(-) delete mode 100644 node-health/Cargo.toml delete mode 100644 node-health/src/health.rs delete mode 100644 node-health/src/lib.rs delete mode 100644 node-health/src/time.rs delete mode 100644 node-health/src/types.rs diff --git a/Cargo.lock b/Cargo.lock index 109db6de67..cf965ba42e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,14 +239,6 @@ dependencies = [ "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "conv" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossbeam" version = "0.3.2" @@ -336,11 +328,6 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "custom_derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "daemonize" version = "0.2.3" @@ -1802,39 +1789,11 @@ dependencies = [ "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "node-health" -version = "0.1.0" -dependencies = [ - "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "ntp 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-reactor 0.1.0", - "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "nodrop" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ntp" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num" version = "0.1.42" @@ -2010,7 +1969,6 @@ dependencies = [ "mem 0.1.0", "migration-rocksdb 0.1.0", "node-filter 1.12.0", - "node-health 0.1.0", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "number_prefix 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "panic_hook 0.1.0", @@ -2156,7 +2114,6 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", "multihash 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "node-health 0.1.0", "order-stat 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "parity-crypto 0.1.0 (git+https://github.com/paritytech/parity-common)", @@ -3650,7 +3607,6 @@ dependencies = [ "checksum cid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d85ee025368e69063c420cbb2ed9f852cb03a5e69b73be021e65726ce03585b6" "checksum clap 2.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f4a2b3bb7ef3c672d7c13d15613211d5a6976b6892c598b0fcb5d40765f19c2" "checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3" -"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" "checksum crossbeam-deque 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1bdc73742c36f7f35ebcda81dbb33a7e0d33757d03a06d9ddca762712ec5ea2" @@ -3661,7 +3617,6 @@ dependencies = [ "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum ct-logs 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61cd11fb222fecf889f4531855c614548e92e8bd2eb178e35296885df5ee9a7c" "checksum ctrlc 1.1.1 (git+https://github.com/paritytech/rust-ctrlc.git)" = "" -"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" "checksum daemonize 0.2.3 (git+https://github.com/paritytech/daemonize)" = "" "checksum difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3304d19798a8e067e48d8e69b2c37f0b5e9b4e462504ad9e27e9f3fce02bba8" "checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" @@ -3754,7 +3709,6 @@ dependencies = [ "checksum nan-preserving-float 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34d4f00fcc2f4c9efa8cc971db0da9e28290e28e97af47585e48691ef10ff31f" "checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" -"checksum ntp 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06b0d2de4a2cd60c3ac85c98a1fc23668bc97bef2b10b706bccd88efb229497d" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "81b483ea42927c463e191802e7334556b48e7875297564c0e9951bd3a0ae53e3" "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" diff --git a/Cargo.toml b/Cargo.toml index e7dc4393a8..697afeab3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,6 @@ ethcore-transaction = { path = "ethcore/transaction" } ethereum-types = "0.3" node-filter = { path = "ethcore/node_filter" } ethkey = { path = "ethkey" } -node-health = { path = "node-health" } rlp = { git = "https://github.com/paritytech/parity-common" } rpc-cli = { path = "rpc_cli" } parity-hash-fetch = { path = "hash-fetch" } diff --git a/node-health/Cargo.toml b/node-health/Cargo.toml deleted file mode 100644 index 22432a5f39..0000000000 --- a/node-health/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "node-health" -description = "Node's health status" -version = "0.1.0" -license = "GPL-3.0" -authors = ["Parity Technologies "] - -[dependencies] -futures = "0.1" -futures-cpupool = "0.1" -log = "0.3" -ntp = "0.5.0" -parking_lot = "0.6" -serde = "1.0" -serde_derive = "1.0" -time = "0.1.35" - -parity-reactor = { path = "../util/reactor" } diff --git a/node-health/src/health.rs b/node-health/src/health.rs deleted file mode 100644 index 430061ea2b..0000000000 --- a/node-health/src/health.rs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Reporting node's health. - -use std::sync::Arc; -use std::time::Duration; -use futures::Future; -use futures::sync::oneshot; -use types::{HealthInfo, HealthStatus, Health}; -use time::{TimeChecker, MAX_DRIFT}; -use parity_reactor::Remote; -use parking_lot::Mutex; -use {SyncStatus}; - -const TIMEOUT: Duration = Duration::from_secs(5); -const PROOF: &str = "Only one closure is invoked."; - -/// A struct enabling you to query for node's health. -#[derive(Debug, Clone)] -pub struct NodeHealth { - sync_status: Arc, - time: TimeChecker, - remote: Remote, -} - -impl NodeHealth { - /// Creates new `NodeHealth`. - pub fn new(sync_status: Arc, time: TimeChecker, remote: Remote) -> Self { - NodeHealth { sync_status, time, remote, } - } - - /// Query latest health report. - pub fn health(&self) -> Box + Send> { - trace!(target: "dapps", "Checking node health."); - // Check timediff - let sync_status = self.sync_status.clone(); - let time = self.time.time_drift(); - let (tx, rx) = oneshot::channel(); - let tx = Arc::new(Mutex::new(Some(tx))); - let tx2 = tx.clone(); - self.remote.spawn_with_timeout( - move |_| time.then(move |result| { - let _ = tx.lock().take().expect(PROOF).send(Ok(result)); - Ok(()) - }), - TIMEOUT, - move || { - let _ = tx2.lock().take().expect(PROOF).send(Err(())); - }, - ); - - Box::new(rx.map_err(|err| { - warn!(target: "dapps", "Health request cancelled: {:?}", err); - }).and_then(move |time| { - // Check peers - let peers = { - let (connected, max) = sync_status.peers(); - let (status, message) = match connected { - 0 => { - (HealthStatus::Bad, "You are not connected to any peers. There is most likely some network issue. Fix connectivity.".into()) - }, - 1 => (HealthStatus::NeedsAttention, "You are connected to only one peer. Your node might not be reliable. Check your network connection.".into()), - _ => (HealthStatus::Ok, "".into()), - }; - HealthInfo { status, message, details: (connected, max) } - }; - - // Check sync - let sync = { - let is_syncing = sync_status.is_major_importing(); - let (status, message) = if is_syncing { - (HealthStatus::NeedsAttention, "Your node is still syncing, the values you see might be outdated. Wait until it's fully synced.".into()) - } else { - (HealthStatus::Ok, "".into()) - }; - HealthInfo { status, message, details: is_syncing } - }; - - // Check time - let time = { - let (status, message, details) = match time { - Ok(Ok(diff)) if diff < MAX_DRIFT && diff > -MAX_DRIFT => { - (HealthStatus::Ok, "".into(), diff) - }, - Ok(Ok(diff)) => { - (HealthStatus::Bad, format!( - "Your clock is not in sync. Detected difference is too big for the protocol to work: {}ms. Synchronize your clock.", - diff, - ), diff) - }, - Ok(Err(err)) => { - (HealthStatus::NeedsAttention, format!( - "Unable to reach time API: {}. Make sure that your clock is synchronized.", - err, - ), 0) - }, - Err(_) => { - (HealthStatus::NeedsAttention, "Time API request timed out. Make sure that the clock is synchronized.".into(), 0) - }, - }; - - HealthInfo { status, message, details, } - }; - - Ok(Health { peers, sync, time}) - })) - } -} diff --git a/node-health/src/lib.rs b/node-health/src/lib.rs deleted file mode 100644 index 13529004a6..0000000000 --- a/node-health/src/lib.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Node Health status reporting. - -#![warn(missing_docs)] - -extern crate futures; -extern crate futures_cpupool; -extern crate ntp; -extern crate time as time_crate; -extern crate parity_reactor; -extern crate parking_lot; - -#[macro_use] -extern crate log; -#[macro_use] -extern crate serde_derive; - -mod health; -mod time; -mod types; - -pub use futures_cpupool::CpuPool; -pub use health::NodeHealth; -pub use types::{Health, HealthInfo, HealthStatus}; -pub use time::{TimeChecker, Error}; - -/// Indicates sync status -pub trait SyncStatus: ::std::fmt::Debug + Send + Sync { - /// Returns true if there is a major sync happening. - fn is_major_importing(&self) -> bool; - - /// Returns number of connected and ideal peers. - fn peers(&self) -> (usize, usize); -} diff --git a/node-health/src/time.rs b/node-health/src/time.rs deleted file mode 100644 index 9dfb3aa87f..0000000000 --- a/node-health/src/time.rs +++ /dev/null @@ -1,357 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Periodically checks node's time drift using [SNTP](https://tools.ietf.org/html/rfc1769). -//! -//! An NTP packet is sent to the server with a local timestamp, the server then completes the packet, yielding the -//! following timestamps: -//! -//! Timestamp Name ID When Generated -//! ------------------------------------------------------------ -//! Originate Timestamp T1 time request sent by client -//! Receive Timestamp T2 time request received at server -//! Transmit Timestamp T3 time reply sent by server -//! Destination Timestamp T4 time reply received at client -//! -//! The drift is defined as: -//! -//! drift = ((T2 - T1) + (T3 - T4)) / 2. -//! - -use std::io; -use std::{fmt, mem, time}; -use std::collections::VecDeque; -use std::sync::atomic::{self, AtomicUsize}; -use std::sync::Arc; - -use futures::{self, Future}; -use futures::future::{self, IntoFuture}; -use futures_cpupool::{CpuPool, CpuFuture}; -use ntp; -use parking_lot::RwLock; -use time_crate::{Duration, Timespec}; - -/// Time checker error. -#[derive(Debug, Clone, PartialEq)] -pub enum Error { - /// No servers are currently available for a query. - NoServersAvailable, - /// There was an error when trying to reach the NTP server. - Ntp(String), - /// IO error when reading NTP response. - Io(String), -} - -impl fmt::Display for Error { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - use self::Error::*; - - match *self { - NoServersAvailable => write!(fmt, "No NTP servers available"), - Ntp(ref err) => write!(fmt, "NTP error: {}", err), - Io(ref err) => write!(fmt, "Connection Error: {}", err), - } - } -} - -impl From for Error { - fn from(err: io::Error) -> Self { Error::Io(format!("{}", err)) } -} - -impl From for Error { - fn from(err: ntp::errors::Error) -> Self { Error::Ntp(format!("{}", err)) } -} - -/// NTP time drift checker. -pub trait Ntp { - /// Returned Future. - type Future: IntoFuture; - - /// Returns the current time drift. - fn drift(&self) -> Self::Future; -} - -const SERVER_MAX_POLL_INTERVAL_SECS: u64 = 60; -#[derive(Debug)] -struct Server { - pub address: String, - next_call: RwLock, - failures: AtomicUsize, -} - -impl Server { - pub fn is_available(&self) -> bool { - *self.next_call.read() < time::Instant::now() - } - - pub fn report_success(&self) { - self.failures.store(0, atomic::Ordering::SeqCst); - self.update_next_call(1) - } - - pub fn report_failure(&self) { - let errors = self.failures.fetch_add(1, atomic::Ordering::SeqCst); - self.update_next_call(1 << errors) - } - - fn update_next_call(&self, delay: usize) { - *self.next_call.write() = time::Instant::now() + time::Duration::from_secs(delay as u64 * SERVER_MAX_POLL_INTERVAL_SECS); - } -} - -impl> From for Server { - fn from(t: T) -> Self { - Server { - address: t.as_ref().to_owned(), - next_call: RwLock::new(time::Instant::now()), - failures: Default::default(), - } - } -} - -/// NTP client using the SNTP algorithm for calculating drift. -#[derive(Clone)] -pub struct SimpleNtp { - addresses: Vec>, - pool: CpuPool, -} - -impl fmt::Debug for SimpleNtp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f - .debug_struct("SimpleNtp") - .field("addresses", &self.addresses) - .finish() - } -} - -impl SimpleNtp { - fn new>(addresses: &[T], pool: CpuPool) -> SimpleNtp { - SimpleNtp { - addresses: addresses.iter().map(Server::from).map(Arc::new).collect(), - pool: pool, - } - } -} - -impl Ntp for SimpleNtp { - type Future = future::Either< - CpuFuture, - future::FutureResult, - >; - - fn drift(&self) -> Self::Future { - use self::future::Either::{A, B}; - - let server = self.addresses.iter().find(|server| server.is_available()); - server.map(|server| { - let server = server.clone(); - A(self.pool.spawn_fn(move || { - debug!(target: "dapps", "Fetching time from {}.", server.address); - - match ntp::request(&server.address) { - Ok(packet) => { - let dest_time = ::time_crate::now_utc().to_timespec(); - let orig_time = Timespec::from(packet.orig_time); - let recv_time = Timespec::from(packet.recv_time); - let transmit_time = Timespec::from(packet.transmit_time); - - let drift = ((recv_time - orig_time) + (transmit_time - dest_time)) / 2; - - server.report_success(); - Ok(drift) - }, - Err(err) => { - server.report_failure(); - Err(err.into()) - }, - } - })) - }).unwrap_or_else(|| B(future::err(Error::NoServersAvailable))) - } -} - -// NOTE In a positive scenario first results will be seen after: -// MAX_RESULTS * UPDATE_TIMEOUT_INCOMPLETE_SECS seconds. -const MAX_RESULTS: usize = 4; -const UPDATE_TIMEOUT_OK_SECS: u64 = 6 * 60 * 60; -const UPDATE_TIMEOUT_WARN_SECS: u64 = 15 * 60; -const UPDATE_TIMEOUT_ERR_SECS: u64 = 60; -const UPDATE_TIMEOUT_INCOMPLETE_SECS: u64 = 10; - -/// Maximal valid time drift. -pub const MAX_DRIFT: i64 = 10_000; - -type BoxFuture = Box + Send>; - -#[derive(Debug, Clone)] -/// A time checker. -pub struct TimeChecker { - ntp: N, - last_result: Arc>)>>, -} - -impl TimeChecker { - /// Creates new time checker given the NTP server address. - pub fn new>(ntp_addresses: &[T], pool: CpuPool) -> Self { - let last_result = Arc::new(RwLock::new( - // Assume everything is ok at the very beginning. - (time::Instant::now(), vec![Ok(0)].into()) - )); - - let ntp = SimpleNtp::new(ntp_addresses, pool); - - TimeChecker { - ntp, - last_result, - } - } -} - -impl TimeChecker where ::Future: Send + 'static { - /// Updates the time - pub fn update(&self) -> BoxFuture { - trace!(target: "dapps", "Updating time from NTP."); - let last_result = self.last_result.clone(); - Box::new(self.ntp.drift().into_future().then(move |res| { - let res = res.map(|d| d.num_milliseconds()); - - if let Err(Error::NoServersAvailable) = res { - debug!(target: "dapps", "No NTP servers available. Selecting an older result."); - return select_result(last_result.read().1.iter()); - } - - // Update the results. - let mut results = mem::replace(&mut last_result.write().1, VecDeque::new()); - let has_all_results = results.len() >= MAX_RESULTS; - let valid_till = time::Instant::now() + time::Duration::from_secs( - match res { - Ok(time) if has_all_results && time < MAX_DRIFT => UPDATE_TIMEOUT_OK_SECS, - Ok(_) if has_all_results => UPDATE_TIMEOUT_WARN_SECS, - Err(_) if has_all_results => UPDATE_TIMEOUT_ERR_SECS, - _ => UPDATE_TIMEOUT_INCOMPLETE_SECS, - } - ); - - trace!(target: "dapps", "New time drift received: {:?}", res); - // Push the result. - results.push_back(res); - while results.len() > MAX_RESULTS { - results.pop_front(); - } - - // Select a response and update last result. - let res = select_result(results.iter()); - *last_result.write() = (valid_till, results); - res - })) - } - - /// Returns a current time drift or error if last request to NTP server failed. - pub fn time_drift(&self) -> BoxFuture { - // return cached result - { - let res = self.last_result.read(); - if res.0 > time::Instant::now() { - return Box::new(futures::done(select_result(res.1.iter()))); - } - } - // or update and return result - self.update() - } -} - -fn select_result<'a, T: Iterator>>(results: T) -> Result { - let mut min = None; - for res in results { - min = Some(match (min.take(), res) { - (Some(Ok(min)), &Ok(ref new)) => Ok(::std::cmp::min(min, *new)), - (Some(Ok(old)), &Err(_)) => Ok(old), - (_, ref new) => (*new).clone(), - }) - } - - min.unwrap_or_else(|| Err(Error::Ntp("NTP server unavailable.".into()))) -} - -#[cfg(test)] -mod tests { - use std::sync::Arc; - use std::cell::{Cell, RefCell}; - use std::time::Instant; - use time::Duration; - use futures::{future, Future}; - use super::{Ntp, TimeChecker, Error}; - use parking_lot::RwLock; - - #[derive(Clone)] - struct FakeNtp(RefCell>, Cell); - impl FakeNtp { - fn new() -> FakeNtp { - FakeNtp( - RefCell::new(vec![Duration::milliseconds(150)]), - Cell::new(0)) - } - } - - impl Ntp for FakeNtp { - type Future = future::FutureResult; - - fn drift(&self) -> Self::Future { - self.1.set(self.1.get() + 1); - future::ok(self.0.borrow_mut().pop().expect("Unexpected call to drift().")) - } - } - - fn time_checker() -> TimeChecker { - let last_result = Arc::new(RwLock::new( - (Instant::now(), vec![Err(Error::Ntp("NTP server unavailable".into()))].into()) - )); - - TimeChecker { - ntp: FakeNtp::new(), - last_result: last_result, - } - } - - #[test] - fn should_fetch_time_on_start() { - // given - let time = time_checker(); - - // when - let diff = time.time_drift().wait().unwrap(); - - // then - assert_eq!(diff, 150); - assert_eq!(time.ntp.1.get(), 1); - } - - #[test] - fn should_not_fetch_twice_if_timeout_has_not_passed() { - // given - let time = time_checker(); - - // when - let diff1 = time.time_drift().wait().unwrap(); - let diff2 = time.time_drift().wait().unwrap(); - - // then - assert_eq!(diff1, 150); - assert_eq!(diff2, 150); - assert_eq!(time.ntp.1.get(), 1); - } -} diff --git a/node-health/src/types.rs b/node-health/src/types.rs deleted file mode 100644 index 76fd3682f9..0000000000 --- a/node-health/src/types.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015-2018 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 . - -//! Base health types. - -/// Health API endpoint status. -#[derive(Debug, PartialEq, Serialize)] -pub enum HealthStatus { - /// Everything's OK. - #[serde(rename = "ok")] - Ok, - /// Node health need attention - /// (the issue is not critical, but may need investigation) - #[serde(rename = "needsAttention")] - NeedsAttention, - /// There is something bad detected with the node. - #[serde(rename = "bad")] - Bad, -} - -/// Represents a single check in node health. -/// Cointains the status of that check and apropriate message and details. -#[derive(Debug, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct HealthInfo { - /// Check status. - pub status: HealthStatus, - /// Human-readable message. - pub message: String, - /// Technical details of the check. - pub details: T, -} - -/// Node Health status. -#[derive(Debug, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct Health { - /// Status of peers. - pub peers: HealthInfo<(usize, usize)>, - /// Sync status. - pub sync: HealthInfo, - /// Time diff info. - pub time: HealthInfo, -} diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index d67da3db7b..8c1721160a 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -790,10 +790,6 @@ usage! { "--no-config", "Don't load a configuration file.", - ARG arg_ntp_servers: (String) = "0.parity.pool.ntp.org:123,1.parity.pool.ntp.org:123,2.parity.pool.ntp.org:123,3.parity.pool.ntp.org:123", or |c: &Config| c.misc.as_ref()?.ntp_servers.clone().map(|vec| vec.join(",")), - "--ntp-servers=[HOSTS]", - "Comma separated list of NTP servers to provide current time (host:port). Used to verify node health. Parity uses pool.ntp.org NTP servers; consider joining the pool: http://www.pool.ntp.org/join.html", - ARG arg_logging: (Option) = None, or |c: &Config| c.misc.as_ref()?.logging.clone(), "-l, --logging=[LOGGING]", "Specify the general logging level (error, warn, info, debug or trace). It can also be set for a specific module, example: '-l sync=debug,rpc=trace'", @@ -1073,6 +1069,10 @@ usage! { ARG arg_dapps_path: (Option) = None, or |c: &Config| c.dapps.as_ref()?._legacy_path.clone(), "--dapps-path=[PATH]", "Specify directory where dapps should be installed.", + + ARG arg_ntp_servers: (Option) = None, or |_| None, + "--ntp-servers=[HOSTS]", + "Does nothing; checking if clock is sync with NTP servers is now done on the UI.", } } @@ -1345,7 +1345,6 @@ struct Snapshots { #[derive(Default, Debug, PartialEq, Deserialize)] #[serde(deny_unknown_fields)] struct Misc { - ntp_servers: Option>, logging: Option, log_file: Option, color: Option, @@ -1812,7 +1811,7 @@ mod tests { flag_can_restart: false, // -- Miscellaneous Options - arg_ntp_servers: "0.parity.pool.ntp.org:123,1.parity.pool.ntp.org:123,2.parity.pool.ntp.org:123,3.parity.pool.ntp.org:123".into(), + arg_ntp_servers: None, flag_version: false, arg_logging: Some("own_tx=trace".into()), arg_log_file: Some("/var/log/parity.log".into()), @@ -2017,7 +2016,6 @@ mod tests { disable_periodic: Some(true), }), misc: Some(Misc { - ntp_servers: Some(vec!["0.parity.pool.ntp.org:123".into()]), logging: Some("own_tx=trace".into()), log_file: Some("/var/log/parity.log".into()), color: Some(true), diff --git a/parity/cli/tests/config.toml b/parity/cli/tests/config.toml index 9fffe4cb05..5f9e655d51 100644 --- a/parity/cli/tests/config.toml +++ b/parity/cli/tests/config.toml @@ -74,7 +74,6 @@ scale_verifiers = false disable_periodic = true [misc] -ntp_servers = ["0.parity.pool.ntp.org:123"] logging = "own_tx=trace" log_file = "/var/log/parity.log" color = true diff --git a/parity/configuration.rs b/parity/configuration.rs index f904c169c0..52bcc40b21 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -348,7 +348,6 @@ impl Configuration { miner_options: self.miner_options()?, gas_price_percentile: self.args.arg_gas_price_percentile, poll_lifetime: self.args.arg_poll_lifetime, - ntp_servers: self.ntp_servers(), ws_conf: ws_conf, http_conf: http_conf, ipc_conf: ipc_conf, @@ -574,10 +573,6 @@ impl Configuration { }) } - fn ntp_servers(&self) -> Vec { - self.args.arg_ntp_servers.split(",").map(str::to_owned).collect() - } - fn secretstore_config(&self) -> Result { Ok(SecretStoreConfiguration { enabled: self.secretstore_enabled(), @@ -1368,12 +1363,6 @@ mod tests { miner_options: Default::default(), gas_price_percentile: 50, poll_lifetime: 60, - ntp_servers: vec![ - "0.parity.pool.ntp.org:123".into(), - "1.parity.pool.ntp.org:123".into(), - "2.parity.pool.ntp.org:123".into(), - "3.parity.pool.ntp.org:123".into(), - ], ws_conf: Default::default(), http_conf: Default::default(), ipc_conf: Default::default(), diff --git a/parity/deprecated.rs b/parity/deprecated.rs index 514e7d5d92..91a872e220 100644 --- a/parity/deprecated.rs +++ b/parity/deprecated.rs @@ -225,6 +225,10 @@ pub fn find_deprecated(args: &Args) -> Vec { result.push(Deprecated::Removed("--dapps-path")); } + if args.arg_ntp_servers.is_some() { + result.push(Deprecated::Removed("--ntp-servers")); + } + result } @@ -256,6 +260,7 @@ mod tests { args.arg_dapps_pass = Some(Default::default()); args.flag_dapps_apis_all = true; args.flag_fast_and_loose = true; + args.arg_ntp_servers = Some(Default::default()); args }), vec![ Deprecated::DoesNothing("--warp"), @@ -276,6 +281,7 @@ mod tests { Deprecated::Removed("--dapps-pass"), Deprecated::Replaced("--dapps-apis-all", "--jsonrpc-apis"), Deprecated::Removed("--fast-and-loose"), + Deprecated::Removed("--ntp-servers"), ]); } } diff --git a/parity/lib.rs b/parity/lib.rs index b1b385a1a3..93edd74982 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -57,7 +57,6 @@ extern crate ethcore_transaction as transaction; extern crate ethereum_types; extern crate ethkey; extern crate kvdb; -extern crate node_health; extern crate panic_hook; extern crate parity_hash_fetch as hash_fetch; extern crate parity_ipfs_api; diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index cf9f6d2dd5..7ecbaee5f5 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -34,7 +34,6 @@ use jsonrpc_core::{self as core, MetaIoHandler}; use light::client::LightChainClient; use light::{TransactionQueue as LightTransactionQueue, Cache as LightDataCache}; use miner::external::ExternalMiner; -use node_health::NodeHealth; use parity_reactor; use parity_rpc::dispatch::{FullDispatcher, LightDispatcher}; use parity_rpc::informant::{ActivityNotifier, ClientNotifier}; @@ -224,7 +223,6 @@ pub struct FullDependencies { pub settings: Arc, pub net_service: Arc, pub updater: Arc, - pub health: NodeHealth, pub geth_compatibility: bool, pub ws_address: Option, pub fetch: FetchClient, @@ -329,7 +327,6 @@ impl FullDependencies { self.sync.clone(), self.updater.clone(), self.net_service.clone(), - self.health.clone(), self.secret_store.clone(), self.logger.clone(), self.settings.clone(), @@ -430,7 +427,6 @@ pub struct LightDependencies { pub secret_store: Arc, pub logger: Arc, pub settings: Arc, - pub health: NodeHealth, pub on_demand: Arc<::light::on_demand::OnDemand>, pub cache: Arc>, pub transaction_queue: Arc>, @@ -544,7 +540,6 @@ impl LightDependencies { self.secret_store.clone(), self.logger.clone(), self.settings.clone(), - self.health.clone(), signer, self.ws_address.clone(), self.gas_price_percentile, diff --git a/parity/run.rs b/parity/run.rs index fb52d86798..8d738b493b 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -15,7 +15,6 @@ // along with Parity. If not, see . use std::any::Any; -use std::fmt; use std::sync::{Arc, Weak}; use std::time::{Duration, Instant}; use std::thread; @@ -42,7 +41,6 @@ use journaldb::Algorithm; use light::Cache as LightDataCache; use miner::external::ExternalMiner; use node_filter::NodeFilter; -use node_health; use parity_reactor::EventLoop; use parity_rpc::{Origin, Metadata, NetworkSettings, informant, is_major_importing}; use updater::{UpdatePolicy, Updater}; @@ -95,7 +93,6 @@ pub struct RunCmd { pub miner_options: MinerOptions, pub gas_price_percentile: usize, pub poll_lifetime: u32, - pub ntp_servers: Vec, pub ws_conf: rpc::WsConfiguration, pub http_conf: rpc::HttpConfiguration, pub ipc_conf: rpc::IpcConfiguration, @@ -287,28 +284,6 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc) -> Result); - impl fmt::Debug for LightSyncStatus { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt, "Light Sync Status") - } - } - impl node_health::SyncStatus for LightSyncStatus { - fn is_major_importing(&self) -> bool { self.0.is_major_importing() } - fn peers(&self) -> (usize, usize) { - let peers = sync::LightSyncProvider::peer_numbers(&*self.0); - (peers.connected, peers.max) - } - } - - let sync_status = Arc::new(LightSyncStatus(light_sync.clone())); - node_health::NodeHealth::new( - sync_status.clone(), - node_health::TimeChecker::new(&cmd.ntp_servers, cpu_pool.clone()), - event_loop.remote(), - ) - }; // start RPCs let deps_for_rpc_apis = Arc::new(rpc_apis::LightDependencies { @@ -316,7 +291,6 @@ fn execute_light_impl(cmd: RunCmd, logger: Arc) -> Result(cmd: RunCmd, logger: Arc, on_client_rq: let secret_store = account_provider.clone(); let signer_service = Arc::new(signer::new_service(&cmd.ws_conf, &cmd.logger_config)); - // the dapps server - let node_health = { - let (sync, client) = (sync_provider.clone(), client.clone()); - - struct SyncStatus(Arc, Arc, sync::NetworkConfiguration); - impl fmt::Debug for SyncStatus { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt, "Dapps Sync Status") - } - } - impl node_health::SyncStatus for SyncStatus { - fn is_major_importing(&self) -> bool { - is_major_importing(Some(self.0.status().state), self.1.queue_info()) - } - fn peers(&self) -> (usize, usize) { - let status = self.0.status(); - (status.num_peers, status.current_max_peers(self.2.min_peers, self.2.max_peers) as usize) - } - } - - let sync_status = Arc::new(SyncStatus(sync, client, net_conf)); - node_health::NodeHealth::new( - sync_status.clone(), - node_health::TimeChecker::new(&cmd.ntp_servers, cpu_pool.clone()), - event_loop.remote(), - ) - }; - let deps_for_rpc_apis = Arc::new(rpc_apis::FullDependencies { signer_service: signer_service, snapshot: snapshot_service.clone(), client: client.clone(), sync: sync_provider.clone(), - health: node_health, net: manage_network.clone(), secret_store: secret_store, miner: miner.clone(), diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index d551d90c53..7e25871a35 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -54,7 +54,6 @@ ethkey = { path = "../ethkey" } ethstore = { path = "../ethstore" } fetch = { path = "../util/fetch" } keccak-hash = { git = "https://github.com/paritytech/parity-common" } -node-health = { path = "../node-health" } parity-reactor = { path = "../util/reactor" } parity-updater = { path = "../updater" } parity-version = { path = "../util/version" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index bef7d9effb..e748b840c0 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -60,7 +60,6 @@ extern crate ethkey; extern crate ethstore; extern crate fetch; extern crate keccak_hash as hash; -extern crate node_health; extern crate parity_reactor; extern crate parity_updater as updater; extern crate parity_version as version; diff --git a/rpc/src/v1/impls/light/parity.rs b/rpc/src/v1/impls/light/parity.rs index f9ec03cd37..e7dcbe9e9a 100644 --- a/rpc/src/v1/impls/light/parity.rs +++ b/rpc/src/v1/impls/light/parity.rs @@ -26,7 +26,6 @@ use ethstore::random_phrase; use sync::LightSyncProvider; use ethcore::account_provider::AccountProvider; use ethcore_logger::RotatingLogger; -use node_health::{NodeHealth, Health}; use ethcore::ids::BlockId; use light::client::LightChainClient; @@ -56,7 +55,6 @@ pub struct ParityClient { accounts: Arc, logger: Arc, settings: Arc, - health: NodeHealth, signer: Option>, ws_address: Option, eip86_transition: u64, @@ -71,7 +69,6 @@ impl ParityClient { accounts: Arc, logger: Arc, settings: Arc, - health: NodeHealth, signer: Option>, ws_address: Option, gas_price_percentile: usize, @@ -81,7 +78,6 @@ impl ParityClient { accounts, logger, settings, - health, signer, ws_address, eip86_transition: client.eip86_transition(), @@ -432,9 +428,4 @@ impl Parity for ParityClient { fn call(&self, _meta: Self::Metadata, _requests: Vec, _block: Trailing) -> Result> { Err(errors::light_unimplemented(None)) } - - fn node_health(&self) -> BoxFuture { - Box::new(self.health.health() - .map_err(|err| errors::internal("Health API failure.", err))) - } } diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index 93560836f9..c4c2ac9dba 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -32,10 +32,9 @@ use ethcore::ids::BlockId; use ethcore::miner::{self, MinerService}; use ethcore::state::StateInfo; use ethcore_logger::RotatingLogger; -use node_health::{NodeHealth, Health}; use updater::{Service as UpdateService}; use jsonrpc_core::{BoxFuture, Result}; -use jsonrpc_core::futures::{future, Future}; +use jsonrpc_core::futures::future; use jsonrpc_macros::Trailing; use v1::helpers::{self, errors, fake_sign, ipfs, SigningQueue, SignerService, NetworkSettings}; use v1::metadata::Metadata; @@ -58,7 +57,6 @@ pub struct ParityClient { updater: Arc, sync: Arc, net: Arc, - health: NodeHealth, accounts: Arc, logger: Arc, settings: Arc, @@ -77,7 +75,6 @@ impl ParityClient where sync: Arc, updater: Arc, net: Arc, - health: NodeHealth, accounts: Arc, logger: Arc, settings: Arc, @@ -91,7 +88,6 @@ impl ParityClient where sync, updater, net, - health, accounts, logger, settings, @@ -466,9 +462,4 @@ impl Parity for ParityClient where .map(|res| res.into_iter().map(|res| res.output.into()).collect()) .map_err(errors::call) } - - fn node_health(&self) -> BoxFuture { - Box::new(self.health.health() - .map_err(|err| errors::internal("Health API failure.", err))) - } } diff --git a/rpc/src/v1/tests/mocked/parity.rs b/rpc/src/v1/tests/mocked/parity.rs index ca24114064..300badd742 100644 --- a/rpc/src/v1/tests/mocked/parity.rs +++ b/rpc/src/v1/tests/mocked/parity.rs @@ -21,8 +21,6 @@ use ethcore_logger::RotatingLogger; use ethereum_types::{Address, U256, H256}; use ethstore::ethkey::{Generator, Random}; use miner::pool::local_transactions::Status as LocalTransactionStatus; -use node_health::{self, NodeHealth}; -use parity_reactor; use sync::ManageNetwork; use jsonrpc_core::IoHandler; @@ -40,7 +38,6 @@ pub struct Dependencies { pub client: Arc, pub sync: Arc, pub updater: Arc, - pub health: NodeHealth, pub logger: Arc, pub settings: Arc, pub network: Arc, @@ -57,11 +54,6 @@ impl Dependencies { network_id: 3, num_peers: 120, })), - health: NodeHealth::new( - Arc::new(FakeSync), - node_health::TimeChecker::new::(&[], node_health::CpuPool::new(1)), - parity_reactor::Remote::new_sync(), - ), updater: Arc::new(TestUpdater::default()), logger: Arc::new(RotatingLogger::new("rpc=trace".to_owned())), settings: Arc::new(NetworkSettings { @@ -85,7 +77,6 @@ impl Dependencies { self.sync.clone(), self.updater.clone(), self.network.clone(), - self.health.clone(), self.accounts.clone(), self.logger.clone(), self.settings.clone(), @@ -107,13 +98,6 @@ impl Dependencies { } } -#[derive(Debug)] -struct FakeSync; -impl node_health::SyncStatus for FakeSync { - fn is_major_importing(&self) -> bool { false } - fn peers(&self) -> (usize, usize) { (4, 25) } -} - #[test] fn rpc_parity_accounts_info() { let deps = Dependencies::new(); @@ -554,14 +538,3 @@ fn rpc_parity_call() { assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); } - -#[test] -fn rpc_parity_node_health() { - let deps = Dependencies::new(); - let io = deps.default_client(); - - let request = r#"{"jsonrpc": "2.0", "method": "parity_nodeHealth", "params":[], "id": 1}"#; - let response = r#"{"jsonrpc":"2.0","result":{"peers":{"details":[4,25],"message":"","status":"ok"},"sync":{"details":false,"message":"","status":"ok"},"time":{"details":0,"message":"","status":"ok"}},"id":1}"#; - - assert_eq!(io.handle_request_sync(request), Some(response.to_owned())); -} diff --git a/rpc/src/v1/traits/parity.rs b/rpc/src/v1/traits/parity.rs index 2f2eef9074..1cc6aca962 100644 --- a/rpc/src/v1/traits/parity.rs +++ b/rpc/src/v1/traits/parity.rs @@ -21,7 +21,6 @@ use std::collections::BTreeMap; use jsonrpc_core::{BoxFuture, Result}; use jsonrpc_macros::Trailing; -use node_health::Health; use v1::types::{ H160, H256, H512, U256, U64, Bytes, CallRequest, Peers, Transaction, RpcSettings, Histogram, @@ -219,9 +218,5 @@ build_rpc_trait! { /// Call contract, returning the output data. #[rpc(meta, name = "parity_call")] fn call(&self, Self::Metadata, Vec, Trailing) -> Result>; - - /// Returns node's health report. - #[rpc(name = "parity_nodeHealth")] - fn node_health(&self) -> BoxFuture; } } -- GitLab From 073365d5d9a76af9987f0441161d91e0f3822867 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Thu, 19 Jul 2018 12:46:33 +0200 Subject: [PATCH 155/191] handle SyncHandler errors properly (#9151) * handle SyncHandler errors properly, closes #9150 * applied review suggestions --- ethcore/sync/src/block_sync.rs | 12 +- ethcore/sync/src/blocks.rs | 9 +- ethcore/sync/src/chain/handler.rs | 216 +++++++++--------------------- 3 files changed, 79 insertions(+), 158 deletions(-) diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index 2e508f4d69..cc04fb04d7 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -22,7 +22,7 @@ use std::collections::{HashSet, VecDeque}; use std::cmp; use heapsize::HeapSizeOf; use ethereum_types::H256; -use rlp::Rlp; +use rlp::{self, Rlp}; use ethcore::views::BlockView; use ethcore::header::{BlockNumber, Header as BlockHeader}; use ethcore::client::{BlockStatus, BlockId, BlockImportError, BlockImportErrorKind}; @@ -76,12 +76,18 @@ pub enum DownloadAction { #[derive(Eq, PartialEq, Debug)] pub enum BlockDownloaderImportError { - /// Imported data is rejected as invalid. + /// Imported data is rejected as invalid. Peer should be dropped. Invalid, /// Imported data is valid but rejected cause the downloader does not need it. Useless, } +impl From for BlockDownloaderImportError { + fn from(_: rlp::DecoderError) -> BlockDownloaderImportError { + BlockDownloaderImportError::Invalid + } +} + /// Block downloader strategy. /// Manages state and block data for a block download process. pub struct BlockDownloader { @@ -316,7 +322,7 @@ impl BlockDownloader { } /// Called by peer once it has new block bodies - pub fn import_bodies(&mut self, _io: &mut SyncIo, r: &Rlp) -> Result<(), BlockDownloaderImportError> { + pub fn import_bodies(&mut self, r: &Rlp) -> Result<(), BlockDownloaderImportError> { let item_count = r.item_count().unwrap_or(0); if item_count == 0 { return Err(BlockDownloaderImportError::Useless); diff --git a/ethcore/sync/src/blocks.rs b/ethcore/sync/src/blocks.rs index a275e1dcc7..df7d7a3bfd 100644 --- a/ethcore/sync/src/blocks.rs +++ b/ethcore/sync/src/blocks.rs @@ -14,8 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::collections::{HashSet, HashMap}; -use std::collections::hash_map::Entry; +use std::collections::{HashSet, HashMap, hash_map}; use smallvec::SmallVec; use hash::{keccak, KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP}; use heapsize::HeapSizeOf; @@ -380,7 +379,7 @@ impl BlockCollection { }; self.downloading_receipts.remove(&receipt_root); match self.receipt_ids.entry(receipt_root) { - Entry::Occupied(entry) => { + hash_map::Entry::Occupied(entry) => { for h in entry.remove() { match self.blocks.get_mut(&h) { Some(ref mut block) => { @@ -394,8 +393,8 @@ impl BlockCollection { } } Ok(()) - } - _ => { + }, + hash_map::Entry::Vacant(_) => { trace!(target: "sync", "Ignored unknown/stale block receipt {:?}", receipt_root); Err(network::ErrorKind::BadProtocol.into()) } diff --git a/ethcore/sync/src/chain/handler.rs b/ethcore/sync/src/chain/handler.rs index 75111a4d4a..136ff3395a 100644 --- a/ethcore/sync/src/chain/handler.rs +++ b/ethcore/sync/src/chain/handler.rs @@ -87,9 +87,23 @@ impl SyncHandler { Ok(()) } }; - result.unwrap_or_else(|e| { - debug!(target:"sync", "{} -> Malformed packet {} : {}", peer, packet_id, e); - }) + + match result { + Err(DownloaderImportError::Invalid) => { + debug!(target:"sync", "{} -> Invalid packet {}", peer, packet_id); + io.disable_peer(peer); + sync.deactivate_peer(io, peer); + }, + Err(DownloaderImportError::Useless) => { + sync.deactivate_peer(io, peer); + }, + Ok(()) => { + // give a task to the same peer first + sync.sync_peer(io, peer, false); + }, + } + // give tasks to other peers + sync.continue_sync(io); } /// Called when peer sends us new consensus packet @@ -137,7 +151,7 @@ impl SyncHandler { } /// Called by peer once it has new block bodies - pub fn on_peer_new_block(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + pub fn on_peer_new_block(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { if !sync.peers.get(&peer_id).map_or(false, |p| p.can_sync()) { trace!(target: "sync", "Ignoring new block from unconfirmed peer {}", peer_id); return Ok(()); @@ -165,8 +179,7 @@ impl SyncHandler { let last_imported_number = sync.new_blocks.last_imported_block_number(); if last_imported_number > header.number() && last_imported_number - header.number() > MAX_NEW_BLOCK_AGE { trace!(target: "sync", "Ignored ancient new block {:?}", h); - io.disable_peer(peer_id); - return Ok(()); + return Err(DownloaderImportError::Invalid); } match io.chain().import_block(block_rlp.as_raw().to_vec()) { Err(BlockImportError(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain), _)) => { @@ -187,7 +200,7 @@ impl SyncHandler { }, Err(e) => { debug!(target: "sync", "Bad new block {:?} : {:?}", h, e); - io.disable_peer(peer_id); + return Err(DownloaderImportError::Invalid); } }; if unknown { @@ -199,12 +212,11 @@ impl SyncHandler { sync.sync_peer(io, peer_id, true); } } - sync.continue_sync(io); Ok(()) } /// Handles `NewHashes` packet. Initiates headers download for any unknown hashes. - pub fn on_peer_new_hashes(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + pub fn on_peer_new_hashes(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { if !sync.peers.get(&peer_id).map_or(false, |p| p.can_sync()) { trace!(target: "sync", "Ignoring new hashes from unconfirmed peer {}", peer_id); return Ok(()); @@ -223,7 +235,6 @@ impl SyncHandler { if max > sync.highest_block.unwrap_or(0) { sync.highest_block = Some(max); } - sync.continue_sync(io); return Ok(()); } trace!(target: "sync", "{} -> NewHashes ({} entries)", peer_id, r.item_count()?); @@ -241,8 +252,7 @@ impl SyncHandler { } if last_imported_number > number && last_imported_number - number > MAX_NEW_BLOCK_AGE { trace!(target: "sync", "Ignored ancient new block hash {:?}", hash); - io.disable_peer(peer_id); - continue; + return Err(DownloaderImportError::Invalid); } match io.chain().block_status(BlockId::Hash(hash.clone())) { BlockStatus::InChain => { @@ -263,8 +273,7 @@ impl SyncHandler { }, BlockStatus::Bad => { debug!(target: "sync", "Bad new block hash {:?}", hash); - io.disable_peer(peer_id); - return Ok(()); + return Err(DownloaderImportError::Invalid); } } }; @@ -274,65 +283,46 @@ impl SyncHandler { sync.state = SyncState::NewBlocks; sync.sync_peer(io, peer_id, true); } - sync.continue_sync(io); Ok(()) } /// Called by peer once it has new block bodies - fn on_peer_block_bodies(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_peer_block_bodies(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { sync.clear_peer_download(peer_id); - let block_set = sync.peers.get(&peer_id).and_then(|p| p.block_set).unwrap_or(BlockSet::NewBlocks); + let block_set = sync.peers.get(&peer_id) + .and_then(|p| p.block_set) + .unwrap_or(BlockSet::NewBlocks); if !sync.reset_peer_asking(peer_id, PeerAsking::BlockBodies) { trace!(target: "sync", "{}: Ignored unexpected bodies", peer_id); - sync.continue_sync(io); return Ok(()); } let item_count = r.item_count()?; trace!(target: "sync", "{} -> BlockBodies ({} entries), set = {:?}", peer_id, item_count, block_set); if item_count == 0 { - sync.deactivate_peer(io, peer_id); - } - else if sync.state == SyncState::Waiting { + Err(DownloaderImportError::Useless) + } else if sync.state == SyncState::Waiting { trace!(target: "sync", "Ignored block bodies while waiting"); - } - else - { - let result = { + Ok(()) + } else { + { let downloader = match block_set { BlockSet::NewBlocks => &mut sync.new_blocks, BlockSet::OldBlocks => match sync.old_blocks { None => { trace!(target: "sync", "Ignored block headers while block download is inactive"); - sync.continue_sync(io); return Ok(()); }, Some(ref mut blocks) => blocks, } }; - downloader.import_bodies(io, r) - }; - - match result { - Err(DownloaderImportError::Invalid) => { - io.disable_peer(peer_id); - sync.deactivate_peer(io, peer_id); - sync.continue_sync(io); - return Ok(()); - }, - Err(DownloaderImportError::Useless) => { - sync.deactivate_peer(io, peer_id); - }, - Ok(()) => (), + downloader.import_bodies(r)?; } - sync.collect_blocks(io, block_set); - sync.sync_peer(io, peer_id, false); + Ok(()) } - sync.continue_sync(io); - Ok(()) } - fn on_peer_fork_header(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_peer_fork_header(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { { let peer = sync.peers.get_mut(&peer_id).expect("Is only called when peer is present in peers"); peer.asking = PeerAsking::Nothing; @@ -347,8 +337,7 @@ impl SyncHandler { let header = r.at(0)?.as_raw(); if keccak(&header) != fork_hash { trace!(target: "sync", "{}: Fork mismatch", peer_id); - io.disable_peer(peer_id); - return Ok(()); + return Err(DownloaderImportError::Invalid); } trace!(target: "sync", "{}: Confirmed peer", peer_id); @@ -361,12 +350,11 @@ impl SyncHandler { } } - sync.sync_peer(io, peer_id, false); return Ok(()); } /// Called by peer once it has new block headers during sync - fn on_peer_block_headers(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_peer_block_headers(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { let is_fork_header_request = match sync.peers.get(&peer_id) { Some(peer) if peer.asking == PeerAsking::ForkHeader => true, _ => false, @@ -382,124 +370,83 @@ impl SyncHandler { let block_set = sync.peers.get(&peer_id).and_then(|p| p.block_set).unwrap_or(BlockSet::NewBlocks); if !sync.reset_peer_asking(peer_id, PeerAsking::BlockHeaders) || expected_hash.is_none() || !allowed { trace!(target: "sync", "{}: Ignored unexpected headers, expected_hash = {:?}", peer_id, expected_hash); - sync.continue_sync(io); return Ok(()); } let item_count = r.item_count()?; trace!(target: "sync", "{} -> BlockHeaders ({} entries), state = {:?}, set = {:?}", peer_id, item_count, sync.state, block_set); if (sync.state == SyncState::Idle || sync.state == SyncState::WaitingPeers) && sync.old_blocks.is_none() { trace!(target: "sync", "Ignored unexpected block headers"); - sync.continue_sync(io); return Ok(()); } if sync.state == SyncState::Waiting { trace!(target: "sync", "Ignored block headers while waiting"); - sync.continue_sync(io); return Ok(()); } - let result = { + let result = { let downloader = match block_set { BlockSet::NewBlocks => &mut sync.new_blocks, BlockSet::OldBlocks => { match sync.old_blocks { None => { trace!(target: "sync", "Ignored block headers while block download is inactive"); - sync.continue_sync(io); return Ok(()); }, Some(ref mut blocks) => blocks, } } }; - downloader.import_headers(io, r, expected_hash) + downloader.import_headers(io, r, expected_hash)? }; - match result { - Err(DownloaderImportError::Useless) => { - sync.deactivate_peer(io, peer_id); - }, - Err(DownloaderImportError::Invalid) => { - io.disable_peer(peer_id); - sync.deactivate_peer(io, peer_id); - sync.continue_sync(io); - return Ok(()); - }, - Ok(DownloadAction::Reset) => { - // mark all outstanding requests as expired - trace!("Resetting downloads for {:?}", block_set); - for (_, ref mut p) in sync.peers.iter_mut().filter(|&(_, ref p)| p.block_set == Some(block_set)) { - p.reset_asking(); - } - + if let DownloadAction::Reset = result { + // mark all outstanding requests as expired + trace!("Resetting downloads for {:?}", block_set); + for (_, ref mut p) in sync.peers.iter_mut().filter(|&(_, ref p)| p.block_set == Some(block_set)) { + p.reset_asking(); } - Ok(DownloadAction::None) => {}, } sync.collect_blocks(io, block_set); - // give a task to the same peer first if received valuable headers. - sync.sync_peer(io, peer_id, false); - // give tasks to other peers - sync.continue_sync(io); Ok(()) } /// Called by peer once it has new block receipts - fn on_peer_block_receipts(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_peer_block_receipts(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { sync.clear_peer_download(peer_id); let block_set = sync.peers.get(&peer_id).and_then(|p| p.block_set).unwrap_or(BlockSet::NewBlocks); if !sync.reset_peer_asking(peer_id, PeerAsking::BlockReceipts) { trace!(target: "sync", "{}: Ignored unexpected receipts", peer_id); - sync.continue_sync(io); return Ok(()); } let item_count = r.item_count()?; trace!(target: "sync", "{} -> BlockReceipts ({} entries)", peer_id, item_count); if item_count == 0 { - sync.deactivate_peer(io, peer_id); - } - else if sync.state == SyncState::Waiting { + Err(DownloaderImportError::Useless) + } else if sync.state == SyncState::Waiting { trace!(target: "sync", "Ignored block receipts while waiting"); - } - else - { - let result = { + Ok(()) + } else { + { let downloader = match block_set { BlockSet::NewBlocks => &mut sync.new_blocks, BlockSet::OldBlocks => match sync.old_blocks { None => { trace!(target: "sync", "Ignored block headers while block download is inactive"); - sync.continue_sync(io); return Ok(()); }, Some(ref mut blocks) => blocks, } }; - downloader.import_receipts(io, r) - }; - - match result { - Err(DownloaderImportError::Invalid) => { - io.disable_peer(peer_id); - sync.deactivate_peer(io, peer_id); - sync.continue_sync(io); - return Ok(()); - }, - Err(DownloaderImportError::Useless) => { - sync.deactivate_peer(io, peer_id); - }, - Ok(()) => (), + downloader.import_receipts(io, r)?; } - sync.collect_blocks(io, block_set); - sync.sync_peer(io, peer_id, false); + Ok(()) } - sync.continue_sync(io); - Ok(()) } /// Called when snapshot manifest is downloaded from a peer. - fn on_snapshot_manifest(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_snapshot_manifest(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { if !sync.peers.get(&peer_id).map_or(false, |p| p.can_sync()) { trace!(target: "sync", "Ignoring snapshot manifest from unconfirmed peer {}", peer_id); return Ok(()); @@ -507,43 +454,28 @@ impl SyncHandler { sync.clear_peer_download(peer_id); if !sync.reset_peer_asking(peer_id, PeerAsking::SnapshotManifest) || sync.state != SyncState::SnapshotManifest { trace!(target: "sync", "{}: Ignored unexpected/expired manifest", peer_id); - sync.continue_sync(io); return Ok(()); } let manifest_rlp = r.at(0)?; - let manifest = match ManifestData::from_rlp(manifest_rlp.as_raw()) { - Err(e) => { - trace!(target: "sync", "{}: Ignored bad manifest: {:?}", peer_id, e); - io.disable_peer(peer_id); - sync.continue_sync(io); - return Ok(()); - } - Ok(manifest) => manifest, - }; + let manifest = ManifestData::from_rlp(manifest_rlp.as_raw())?; let is_supported_version = io.snapshot_service().supported_versions() .map_or(false, |(l, h)| manifest.version >= l && manifest.version <= h); if !is_supported_version { trace!(target: "sync", "{}: Snapshot manifest version not supported: {}", peer_id, manifest.version); - io.disable_peer(peer_id); - sync.continue_sync(io); - return Ok(()); + return Err(DownloaderImportError::Invalid); } sync.snapshot.reset_to(&manifest, &keccak(manifest_rlp.as_raw())); io.snapshot_service().begin_restore(manifest); sync.state = SyncState::SnapshotData; - // give a task to the same peer first. - sync.sync_peer(io, peer_id, false); - // give tasks to other peers - sync.continue_sync(io); Ok(()) } /// Called when snapshot data is downloaded from a peer. - fn on_snapshot_data(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_snapshot_data(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { if !sync.peers.get(&peer_id).map_or(false, |p| p.can_sync()) { trace!(target: "sync", "Ignoring snapshot data from unconfirmed peer {}", peer_id); return Ok(()); @@ -551,7 +483,6 @@ impl SyncHandler { sync.clear_peer_download(peer_id); if !sync.reset_peer_asking(peer_id, PeerAsking::SnapshotData) || (sync.state != SyncState::SnapshotData && sync.state != SyncState::SnapshotWaiting) { trace!(target: "sync", "{}: Ignored unexpected snapshot data", peer_id); - sync.continue_sync(io); return Ok(()); } @@ -569,7 +500,6 @@ impl SyncHandler { } sync.snapshot.clear(); - sync.continue_sync(io); return Ok(()); }, RestorationStatus::Initializing { .. } => { @@ -594,7 +524,6 @@ impl SyncHandler { Err(()) => { trace!(target: "sync", "{}: Got bad snapshot chunk", peer_id); io.disconnect_peer(peer_id); - sync.continue_sync(io); return Ok(()); } } @@ -603,15 +532,12 @@ impl SyncHandler { // wait for snapshot restoration process to complete sync.state = SyncState::SnapshotWaiting; } - // give a task to the same peer first. - sync.sync_peer(io, peer_id, false); - // give tasks to other peers - sync.continue_sync(io); + Ok(()) } /// Called by peer to report status - fn on_peer_status(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_peer_status(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { sync.handshaking_peers.remove(&peer_id); let protocol_version: u8 = r.val_at(0)?; let warp_protocol = io.protocol_version(&WARP_SYNC_PROTOCOL_ID, peer_id) != 0; @@ -647,23 +573,20 @@ impl SyncHandler { } let chain_info = io.chain().chain_info(); if peer.genesis != chain_info.genesis_hash { - io.disable_peer(peer_id); trace!(target: "sync", "Peer {} genesis hash mismatch (ours: {}, theirs: {})", peer_id, chain_info.genesis_hash, peer.genesis); - return Ok(()); + return Err(DownloaderImportError::Invalid); } if peer.network_id != sync.network_id { - io.disable_peer(peer_id); trace!(target: "sync", "Peer {} network id mismatch (ours: {}, theirs: {})", peer_id, sync.network_id, peer.network_id); - return Ok(()); + return Err(DownloaderImportError::Invalid); } if false || (warp_protocol && (peer.protocol_version < PAR_PROTOCOL_VERSION_1.0 || peer.protocol_version > PAR_PROTOCOL_VERSION_3.0)) || (!warp_protocol && (peer.protocol_version < ETH_PROTOCOL_VERSION_62.0 || peer.protocol_version > ETH_PROTOCOL_VERSION_63.0)) { - io.disable_peer(peer_id); trace!(target: "sync", "Peer {} unsupported eth protocol ({})", peer_id, peer.protocol_version); - return Ok(()); + return Err(DownloaderImportError::Invalid); } if sync.sync_start_time.is_none() { @@ -676,22 +599,15 @@ impl SyncHandler { sync.active_peers.insert(peer_id.clone()); debug!(target: "sync", "Connected {}:{}", peer_id, io.peer_info(peer_id)); - match sync.fork_block { - Some((fork_block, _)) => { - SyncRequester::request_fork_header(sync, io, peer_id, fork_block); - }, - _ => { - // when there's no `fork_block` defined we initialize the peer with - // `confirmation: ForkConfirmation::Confirmed`. - sync.sync_peer(io, peer_id, false); - } + if let Some((fork_block, _)) = sync.fork_block { + SyncRequester::request_fork_header(sync, io, peer_id, fork_block); } Ok(()) } /// Called when peer sends us new transactions - fn on_peer_transactions(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_peer_transactions(sync: &mut ChainSync, io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { // Accept transactions only when fully synced if !io.is_chain_queue_empty() || (sync.state != SyncState::Idle && sync.state != SyncState::NewBlocks) { trace!(target: "sync", "{} Ignoring transactions while syncing", peer_id); @@ -715,7 +631,7 @@ impl SyncHandler { } /// Called when peer sends us signed private transaction packet - fn on_signed_private_transaction(sync: &ChainSync, _io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_signed_private_transaction(sync: &ChainSync, _io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { if !sync.peers.get(&peer_id).map_or(false, |p| p.can_sync()) { trace!(target: "sync", "{} Ignoring packet from unconfirmed/unknown peer", peer_id); return Ok(()); @@ -729,7 +645,7 @@ impl SyncHandler { } /// Called when peer sends us new private transaction packet - fn on_private_transaction(sync: &ChainSync, _io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), PacketDecodeError> { + fn on_private_transaction(sync: &ChainSync, _io: &mut SyncIo, peer_id: PeerId, r: &Rlp) -> Result<(), DownloaderImportError> { if !sync.peers.get(&peer_id).map_or(false, |p| p.can_sync()) { trace!(target: "sync", "{} Ignoring packet from unconfirmed/unknown peer", peer_id); return Ok(()); -- GitLab From 0ce04845def859c9cc999169e3121b818dbec6f0 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 19 Jul 2018 22:41:31 +0800 Subject: [PATCH 156/191] Be more graceful on Aura difficulty validation (#9164) * Be more graceful on Aura difficulty validation * test: rejects_step_backwards * test: proposer_switching * test: rejects_future_block * test: reports_skipped * test: verify_empty_seal_steps --- ethcore/src/engines/authority_round/mod.rs | 46 +++++++++++++++------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/ethcore/src/engines/authority_round/mod.rs b/ethcore/src/engines/authority_round/mod.rs index f3f4504ec6..0c4906be56 100644 --- a/ethcore/src/engines/authority_round/mod.rs +++ b/ethcore/src/engines/authority_round/mod.rs @@ -1149,9 +1149,10 @@ impl Engine for AuthorityRound { // If empty step messages are enabled we will validate the messages in the seal, missing messages are not // reported as there's no way to tell whether the empty step message was never sent or simply not included. - if header.number() >= self.empty_steps_transition { - let validate_empty_steps = || -> Result<(), Error> { + let empty_steps_len = if header.number() >= self.empty_steps_transition { + let validate_empty_steps = || -> Result { let empty_steps = header_empty_steps(header)?; + let empty_steps_len = empty_steps.len(); for empty_step in empty_steps { if empty_step.step <= parent_step || empty_step.step >= step { Err(EngineError::InsufficientProof( @@ -1168,16 +1169,27 @@ impl Engine for AuthorityRound { format!("invalid empty step proof: {:?}", empty_step)))?; } } - Ok(()) + Ok(empty_steps_len) }; - if let err @ Err(_) = validate_empty_steps() { - self.validators.report_benign(header.author(), set_number, header.number()); - return err; + match validate_empty_steps() { + Ok(len) => len, + Err(err) => { + self.validators.report_benign(header.author(), set_number, header.number()); + return Err(err); + }, } - } else { self.report_skipped(header, step, parent_step, &*validators, set_number); + + 0 + }; + + if header.number() >= self.validate_score_transition { + let expected_difficulty = calculate_score(parent_step.into(), step.into(), empty_steps_len.into()); + if header.difficulty() != &expected_difficulty { + return Err(From::from(BlockError::InvalidDifficulty(Mismatch { expected: expected_difficulty, found: header.difficulty().clone() }))); + } } Ok(()) @@ -1412,7 +1424,7 @@ mod tests { use engines::{Seal, Engine, EngineError, EthEngine}; use engines::validator_set::TestSet; use error::{Error, ErrorKind}; - use super::{AuthorityRoundParams, AuthorityRound, EmptyStep, SealedEmptyStep}; + use super::{AuthorityRoundParams, AuthorityRound, EmptyStep, SealedEmptyStep, calculate_score}; #[test] fn has_valid_metadata() { @@ -1518,12 +1530,15 @@ mod tests { let engine = Spec::new_test_round().engine; - let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); // Two validators. // Spec starts with step 2. + header.set_difficulty(calculate_score(U256::from(0), U256::from(2), U256::zero())); + let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); header.set_seal(vec![encode(&2usize).into_vec(), encode(&(&*signature as &[u8])).into_vec()]); assert!(engine.verify_block_family(&header, &parent_header).is_ok()); assert!(engine.verify_block_external(&header).is_err()); + header.set_difficulty(calculate_score(U256::from(0), U256::from(1), U256::zero())); + let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); header.set_seal(vec![encode(&1usize).into_vec(), encode(&(&*signature as &[u8])).into_vec()]); assert!(engine.verify_block_family(&header, &parent_header).is_ok()); assert!(engine.verify_block_external(&header).is_ok()); @@ -1544,9 +1559,10 @@ mod tests { let engine = Spec::new_test_round().engine; - let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); // Two validators. // Spec starts with step 2. + header.set_difficulty(calculate_score(U256::from(0), U256::from(1), U256::zero())); + let signature = tap.sign(addr, Some("0".into()), header.bare_hash()).unwrap(); header.set_seal(vec![encode(&1usize).into_vec(), encode(&(&*signature as &[u8])).into_vec()]); assert!(engine.verify_block_family(&header, &parent_header).is_ok()); assert!(engine.verify_block_external(&header).is_ok()); @@ -1573,8 +1589,10 @@ mod tests { // Two validators. // Spec starts with step 2. header.set_seal(vec![encode(&5usize).into_vec(), encode(&(&*signature as &[u8])).into_vec()]); + header.set_difficulty(calculate_score(U256::from(4), U256::from(5), U256::zero())); assert!(engine.verify_block_family(&header, &parent_header).is_ok()); header.set_seal(vec![encode(&3usize).into_vec(), encode(&(&*signature as &[u8])).into_vec()]); + header.set_difficulty(calculate_score(U256::from(4), U256::from(3), U256::zero())); assert!(engine.verify_block_family(&header, &parent_header).is_err()); } @@ -1608,6 +1626,7 @@ mod tests { parent_header.set_seal(vec![encode(&1usize).into_vec()]); parent_header.set_gas_limit("222222".parse::().unwrap()); let mut header: Header = Header::default(); + header.set_difficulty(calculate_score(U256::from(1), U256::from(3), U256::zero())); header.set_gas_limit("222222".parse::().unwrap()); header.set_seal(vec![encode(&3usize).into_vec()]); @@ -1978,16 +1997,15 @@ mod tests { let empty_step3 = sealed_empty_step(engine, 3, &parent_header.hash()); let empty_steps = vec![empty_step2, empty_step3]; + header.set_difficulty(calculate_score(U256::from(0), U256::from(4), U256::from(2))); + let signature = tap.sign(addr1, Some("1".into()), header.bare_hash()).unwrap(); header.set_seal(vec![ encode(&4usize).into_vec(), encode(&(&*signature as &[u8])).into_vec(), ::rlp::encode_list(&empty_steps).into_vec(), ]); - assert!(match engine.verify_block_family(&header, &parent_header) { - Ok(_) => true, - _ => false, - }); + assert!(engine.verify_block_family(&header, &parent_header).is_ok()); } #[test] -- GitLab From b914912c062fff8f5de62a1ab0069dff1679fc63 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 19 Jul 2018 22:43:41 +0800 Subject: [PATCH 157/191] Fix bugfix hard fork logic (#9138) * Fix bugfix hard fork logic * Remove dustProtectionTransition from bugfix category EIP-168 is not enabled by default * Remove unnecessary 'static --- ethcore/src/miner/miner.rs | 10 ++++++---- ethcore/src/spec/spec.rs | 24 ++++++++++++++++-------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 167a58d235..90d28f44ec 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1088,10 +1088,12 @@ impl miner::MinerService for Miner { // refuse to seal the first block of the chain if it contains hard forks // which should be on by default. - if block.block().header().number() == 1 && self.engine.params().contains_bugfix_hard_fork() { - warn!("Your chain specification contains one or more hard forks which are required to be \ - on by default. Please remove these forks and start your chain again."); - return; + if block.block().header().number() == 1 { + if let Some(name) = self.engine.params().nonzero_bugfix_hard_fork() { + warn!("Your chain specification contains one or more hard forks which are required to be \ + on by default. Please remove these forks and start your chain again: {}.", name); + return; + } } match self.engine.seals_internally() { diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index e8c316be5f..d88bdb8336 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -57,7 +57,7 @@ fn fmt_err(f: F) -> String { /// Parameters common to ethereum-like blockchains. /// NOTE: when adding bugfix hard-fork parameters, -/// add to `contains_bugfix_hard_fork` +/// add to `nonzero_bugfix_hard_fork` /// /// we define a "bugfix" hard fork as any hard fork which /// you would put on-by-default in a new chain. @@ -188,13 +188,21 @@ impl CommonParams { } } - /// Whether these params contain any bug-fix hard forks. - pub fn contains_bugfix_hard_fork(&self) -> bool { - self.eip98_transition != 0 && self.eip155_transition != 0 && - self.validate_receipts_transition != 0 && self.eip86_transition != 0 && - self.eip140_transition != 0 && self.eip210_transition != 0 && - self.eip211_transition != 0 && self.eip214_transition != 0 && - self.validate_chain_id_transition != 0 && self.dust_protection_transition != 0 + /// Return Some if the current parameters contain a bugfix hard fork not on block 0. + pub fn nonzero_bugfix_hard_fork(&self) -> Option<&str> { + if self.eip155_transition != 0 { + return Some("eip155Transition"); + } + + if self.validate_receipts_transition != 0 { + return Some("validateReceiptsTransition"); + } + + if self.validate_chain_id_transition != 0 { + return Some("validateChainIdTransition"); + } + + None } } -- GitLab From fb2b77e991a350943bfe9f74d4177f9cc35af1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 20 Jul 2018 14:06:11 +0100 Subject: [PATCH 158/191] ethcore: add missing builtins benchmarks (#9170) * ethcore: add modexp benchmarks * ethcore: add_bn_128_add benchmark --- ethcore/benches/evm.rs | 145 +++++++++++++++++++++++++++++++++++++++-- ethcore/src/builtin.rs | 7 +- ethcore/src/lib.rs | 2 +- 3 files changed, 147 insertions(+), 7 deletions(-) diff --git a/ethcore/benches/evm.rs b/ethcore/benches/evm.rs index 1b8bea52ca..27ae23a69a 100644 --- a/ethcore/benches/evm.rs +++ b/ethcore/benches/evm.rs @@ -17,15 +17,20 @@ #![feature(test)] extern crate bn; +extern crate ethcore; extern crate ethereum_types; extern crate ethkey; -extern crate parity_crypto; +extern crate parity_bytes as bytes; +extern crate parity_crypto as crypto; extern crate rand; extern crate rustc_hex; extern crate test; -use self::test::Bencher; use rand::StdRng; +use rustc_hex::FromHex; + +use self::test::Bencher; +use bytes::BytesRef; #[bench] fn bn_128_pairing(b: &mut Bencher) { @@ -44,6 +49,19 @@ fn bn_128_pairing(b: &mut Bencher) { }); } +#[bench] +fn bn_128_add(b: &mut Bencher) { + use bn::{AffineG1, G1, Group}; + + let mut rng = StdRng::new().unwrap(); + let p1: G1 = G1::random(&mut rng); + let p2: G1 = G1::random(&mut rng); + + b.iter(|| { + let _ = AffineG1::from_jacobian(p1 + p2); + }); +} + #[bench] fn bn_128_mul(b: &mut Bencher) { use bn::{AffineG1, G1, Fr, Group}; @@ -59,7 +77,7 @@ fn bn_128_mul(b: &mut Bencher) { #[bench] fn sha256(b: &mut Bencher) { - use parity_crypto::digest::sha256; + use crypto::digest::sha256; let input = [0_u8; 256]; @@ -70,7 +88,6 @@ fn sha256(b: &mut Bencher) { #[bench] fn ecrecover(b: &mut Bencher) { - use rustc_hex::FromHex; use ethkey::{Signature, recover as ec_recover}; use ethereum_types::H256; let input = FromHex::from_hex("47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad000000000000000000000000000000000000000000000000000000000000001b650acf9d3f5f0a2c799776a1254355d5f4061762a237396a99a0e0e3fc2bcd6729514a0dacb2e623ac4abd157cb18163ff942280db4d5caad66ddf941ba12e03").unwrap(); @@ -89,3 +106,123 @@ fn ecrecover(b: &mut Bencher) { let _ = ec_recover(&s, &hash); }); } + +fn run_modexp(input: &[u8], expected: &[u8]) { + let builtin = ethcore::builtin::ethereum_builtin("modexp"); + let mut ov = vec![]; + builtin.execute(input, &mut BytesRef::Flexible(&mut ov)).expect("Builtin should not fail"); + assert_eq!(&ov[..], &expected[..]); +} + +fn bench_modexp(b: &mut Bencher, input: &str, expected: &str) { + let input = FromHex::from_hex(input).unwrap(); + let expected = FromHex::from_hex(expected).unwrap(); + b.iter(|| { + run_modexp(&input, &expected); + }); +} + +#[bench] +fn modexp_1_square(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb502fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b"; + let expected = "60008f1614cc01dcfb6bfb09c625cf90b47d4468db81b5f8b7a39d42f332eab9b2da8f2d95311648a8f243f4bb13cfb3d8f7f2a3c014122ebb3ed41b02783adc"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_1_qube(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb503fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b"; + let expected = "4834a46ba565db27903b1c720c9d593e84e4cbd6ad2e64b31885d944f68cd801f92225a8961c952ddf2797fa4701b330c85c4b363798100b921a1a22a46a7fec"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_1_pow0x10001(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb5010001fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b"; + let expected = "c36d804180c35d4426b57b50c5bfcca5c01856d104564cd513b461d3c8b8409128a5573e416d0ebe38f5f736766d9dc27143e4da981dfa4d67f7dc474cbee6d2"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_2_square(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5102e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087"; + let expected = "981dd99c3b113fae3e3eaa9435c0dc96779a23c12a53d1084b4f67b0b053a27560f627b873e3f16ad78f28c94f14b6392def26e4d8896c5e3c984e50fa0b3aa44f1da78b913187c6128baa9340b1e9c9a0fd02cb78885e72576da4a8f7e5a113e173a7a2889fde9d407bd9f06eb05bc8fc7b4229377a32941a02bf4edcc06d70"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_2_qube(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5103e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087"; + let expected = "d89ceb68c32da4f6364978d62aaa40d7b09b59ec61eb3c0159c87ec3a91037f7dc6967594e530a69d049b64adfa39c8fa208ea970cfe4b7bcd359d345744405afe1cbf761647e32b3184c7fbe87cee8c6c7ff3b378faba6c68b83b6889cb40f1603ee68c56b4c03d48c595c826c041112dc941878f8c5be828154afd4a16311f"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_2_pow0x10001(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf51010001e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087"; + let expected = "ad85e8ef13fd1dd46eae44af8b91ad1ccae5b7a1c92944f92a19f21b0b658139e0cabe9c1f679507c2de354bf2c91ebd965d1e633978a830d517d2f6f8dd5fd58065d58559de7e2334a878f8ec6992d9b9e77430d4764e863d77c0f87beede8f2f7f2ab2e7222f85cc9d98b8467f4bb72e87ef2882423ebdb6daf02dddac6db2"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_3_square(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb02d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d"; + let expected = "affc7507ea6d84751ec6b3f0d7b99dbcc263f33330e450d1b3ff0bc3d0874320bf4edd57debd587306988157958cb3cfd369cc0c9c198706f635c9e0f15d047df5cb44d03e2727f26b083c4ad8485080e1293f171c1ed52aef5993a5815c35108e848c951cf1e334490b4a539a139e57b68f44fee583306f5b85ffa57206b3ee5660458858534e5386b9584af3c7f67806e84c189d695e5eb96e1272d06ec2df5dc5fabc6e94b793718c60c36be0a4d031fc84cd658aa72294b2e16fc240aef70cb9e591248e38bd49c5a554d1afa01f38dab72733092f7555334bbef6c8c430119840492380aa95fa025dcf699f0a39669d812b0c6946b6091e6e235337b6f8"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_3_qube(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb03d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d"; + let expected = "1b280ecd6a6bf906b806d527c2a831e23b238f89da48449003a88ac3ac7150d6a5e9e6b3be4054c7da11dd1e470ec29a606f5115801b5bf53bc1900271d7c3ff3cd5ed790d1c219a9800437a689f2388ba1a11d68f6a8e5b74e9a3b1fac6ee85fc6afbac599f93c391f5dc82a759e3c6c0ab45ce3f5d25d9b0c1bf94cf701ea6466fc9a478dacc5754e593172b5111eeba88557048bceae401337cd4c1182ad9f700852bc8c99933a193f0b94cf1aedbefc48be3bc93ef5cb276d7c2d5462ac8bb0c8fe8923a1db2afe1c6b90d59c534994a6a633f0ead1d638fdc293486bb634ff2c8ec9e7297c04241a61c37e3ae95b11d53343d4ba2b4cc33d2cfa7eb705e"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_3_pow0x10001(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb010001d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d"; + let expected = "37843d7c67920b5f177372fa56e2a09117df585f81df8b300fba245b1175f488c99476019857198ed459ed8d9799c377330e49f4180c4bf8e8f66240c64f65ede93d601f957b95b83efdee1e1bfde74169ff77002eaf078c71815a9220c80b2e3b3ff22c2f358111d816ebf83c2999026b6de50bfc711ff68705d2f40b753424aefc9f70f08d908b5a20276ad613b4ab4309a3ea72f0c17ea9df6b3367d44fb3acab11c333909e02e81ea2ed404a712d3ea96bba87461720e2d98723e7acd0520ac1a5212dbedcd8dc0c1abf61d4719e319ff4758a774790b8d463cdfe131d1b2dcfee52d002694e98e720cb6ae7ccea353bc503269ba35f0f63bf8d7b672a76"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_4_square(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8102df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f"; + let expected = "8a5aea5f50dcc03dc7a7a272b5aeebc040554dbc1ffe36753c4fc75f7ed5f6c2cc0de3a922bf96c78bf0643a73025ad21f45a4a5cadd717612c511ab2bff1190fe5f1ae05ba9f8fe3624de1de2a817da6072ddcdb933b50216811dbe6a9ca79d3a3c6b3a476b079fd0d05f04fb154e2dd3e5cb83b148a006f2bcbf0042efb2ae7b916ea81b27aac25c3bf9a8b6d35440062ad8eae34a83f3ffa2cc7b40346b62174a4422584f72f95316f6b2bee9ff232ba9739301c97c99a9ded26c45d72676eb856ad6ecc81d36a6de36d7f9dafafee11baa43a4b0d5e4ecffa7b9b7dcefd58c397dd373e6db4acd2b2c02717712e6289bed7c813b670c4a0c6735aa7f3b0f1ce556eae9fcc94b501b2c8781ba50a8c6220e8246371c3c7359fe4ef9da786ca7d98256754ca4e496be0a9174bedbecb384bdf470779186d6a833f068d2838a88d90ef3ad48ff963b67c39cc5a3ee123baf7bf3125f64e77af7f30e105d72c4b9b5b237ed251e4c122c6d8c1405e736299c3afd6db16a28c6a9cfa68241e53de4cd388271fe534a6a9b0dbea6171d170db1b89858468885d08fecbd54c8e471c3e25d48e97ba450b96d0d87e00ac732aaa0d3ce4309c1064bd8a4c0808a97e0143e43a24cfa847635125cd41c13e0574487963e9d725c01375db99c31da67b4cf65eff555f0c0ac416c727ff8d438ad7c42030551d68c2e7adda0abb1ca7c10"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_4_qube(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8103df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f"; + let expected = "5a2664252aba2d6e19d9600da582cdd1f09d7a890ac48e6b8da15ae7c6ff1856fc67a841ac2314d283ffa3ca81a0ecf7c27d89ef91a5a893297928f5da0245c99645676b481b7e20a566ee6a4f2481942bee191deec5544600bb2441fd0fb19e2ee7d801ad8911c6b7750affec367a4b29a22942c0f5f4744a4e77a8b654da2a82571037099e9c6d930794efe5cdca73c7b6c0844e386bdca8ea01b3d7807146bb81365e2cdc6475f8c23e0ff84463126189dc9789f72bbce2e3d2d114d728a272f1345122de23df54c922ec7a16e5c2a8f84da8871482bd258c20a7c09bbcd64c7a96a51029bbfe848736a6ba7bf9d931a9b7de0bcaf3635034d4958b20ae9ab3a95a147b0421dd5f7ebff46c971010ebfc4adbbe0ad94d5498c853e7142c450d8c71de4b2f84edbf8acd2e16d00c8115b150b1c30e553dbb82635e781379fe2a56360420ff7e9f70cc64c00aba7e26ed13c7c19622865ae07248daced36416080f35f8cc157a857ed70ea4f347f17d1bee80fa038abd6e39b1ba06b97264388b21364f7c56e192d4b62d9b161405f32ab1e2594e86243e56fcf2cb30d21adef15b9940f91af681da24328c883d892670c6aa47940867a81830a82b82716895db810df1b834640abefb7db2092dd92912cb9a735175bc447be40a503cf22dfe565b4ed7a3293ca0dfd63a507430b323ee248ec82e843b673c97ad730728cebc"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_4_pow0x10001(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b81010001df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f"; + let expected = "bed8b970c4a34849fc6926b08e40e20b21c15ed68d18f228904878d4370b56322d0da5789da0318768a374758e6375bfe4641fca5285ec7171828922160f48f5ca7efbfee4d5148612c38ad683ae4e3c3a053d2b7c098cf2b34f2cb19146eadd53c86b2d7ccf3d83b2c370bfb840913ee3879b1057a6b4e07e110b6bcd5e958bc71a14798c91d518cc70abee264b0d25a4110962a764b364ac0b0dd1ee8abc8426d775ec0f22b7e47b32576afaf1b5a48f64573ed1c5c29f50ab412188d9685307323d990802b81dacc06c6e05a1e901830ba9fcc67688dc29c5e27bde0a6e845ca925f5454b6fb3747edfaa2a5820838fb759eadf57f7cb5cec57fc213ddd8a4298fa079c3c0f472b07fb15aa6a7f0a3780bd296ff6a62e58ef443870b02260bd4fd2bbc98255674b8e1f1f9f8d33c7170b0ebbea4523b695911abbf26e41885344823bd0587115fdd83b721a4e8457a31c9a84b3d3520a07e0e35df7f48e5a9d534d0ec7feef1ff74de6a11e7f93eab95175b6ce22c68d78a642ad642837897ec11349205d8593ac19300207572c38d29ca5dfa03bc14cdbc32153c80e5cc3e739403d34c75915e49beb43094cc6dcafb3665b305ddec9286934ae66ec6b777ca528728c851318eb0f207b39f1caaf96db6eeead6b55ed08f451939314577d42bcc9f97c0b52d0234f88fd07e4c1d7780fdebc025cfffcb572cb27a8c33963"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_5_square(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf02e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad"; + let expected = "d61fe4e3f32ac260915b5b03b78a86d11bfc41d973fce5b0cc59035cf8289a8a2e3878ea15fa46565b0d806e2f85b53873ea20ed653869b688adf83f3ef444535bf91598ff7e80f334fb782539b92f39f55310cc4b35349ab7b278346eda9bc37c0d8acd3557fae38197f412f8d9e57ce6a76b7205c23564cab06e5615be7c6f05c3d05ec690cba91da5e89d55b152ff8dd2157dc5458190025cf94b1ad98f7cbe64e9482faba95e6b33844afc640892872b44a9932096508f4a782a4805323808f23e54b6ff9b841dbfa87db3505ae4f687972c18ea0f0d0af89d36c1c2a5b14560c153c3fee406f5cf15cfd1c0bb45d767426d465f2f14c158495069d0c5955a00150707862ecaae30624ebacdd8ac33e4e6aab3ff90b6ba445a84689386b9e945d01823a65874444316e83767290fcff630d2477f49d5d8ffdd200e08ee1274270f86ed14c687895f6caf5ce528bd970c20d2408a9ba66216324c6a011ac4999098362dbd98a038129a2d40c8da6ab88318aa3046cb660327cc44236d9e5d2163bd0959062195c51ed93d0088b6f92051fc99050ece2538749165976233697ab4b610385366e5ce0b02ad6b61c168ecfbedcdf74278a38de340fd7a5fead8e588e294795f9b011e2e60377a89e25c90e145397cdeabc60fd32444a6b7642a611a83c464d8b8976666351b4865c37b02e6dc21dbcdf5f930341707b618cc0f03c3122646b3385c9df9f2ec730eec9d49e7dfc9153b6e6289da8c4f0ebea9ccc1b751948e3bb7171c9e4d57423b0eeeb79095c030cb52677b3f7e0b45c30f645391f3f9c957afa549c4e0b2465b03c67993cd200b1af01035962edbc4c9e89b31c82ac121987d6529dafdeef67a132dc04b6dc68e77f22862040b75e2ceb9ff16da0fca534e6db7bd12fa7b7f51b6c08c1e23dfcdb7acbd2da0b51c87ffbced065a612e9b1c8bba9b7e2d8d7a2f04fcc4aaf355b60d764879a76b5e16762d5f2f55d585d0c8e82df6940960cddfb72c91dfa71f6b4e1c6ca25dfc39a878e998a663c04fe29d5e83b9586d047b4d7ff70a9f0d44f127e7d741685ca75f11629128d916a0ffef4be586a30c4b70389cc746e84ebf177c01ee8a4511cfbb9d1ecf7f7b33c7dd8177896e10bbc82f838dcd6db7ac67de62bf46b6a640fb580c5d1d2708f3862e3d2b645d0d18e49ef088053e3a220adc0e033c2afcfe61c90e32151152eb3caaf746c5e377d541cafc6cbb0cc0fa48b5caf1728f2e1957f5addfc234f1a9d89e40d49356c9172d0561a695fce6dab1d412321bbf407f63766ffd7b6b3d79bcfa07991c5a9709849c1008689e3b47c50d613980bec239fb64185249d055b30375ccb4354d71fe4d05648fbf6c80634dfc3575f2f24abb714c1e4c95e8896763bf4316e954c7ad19e5780ab7a040ca6fb9271f90a8b22ae738daf6cb"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_5_qube(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf03e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad"; + let expected = "5f9c70ec884926a89461056ad20ac4c30155e817f807e4d3f5bb743d789c83386762435c3627773fa77da5144451f2a8aad8adba88e0b669f5377c5e9bad70e45c86fe952b613f015a9953b8a5de5eaee4566acf98d41e327d93a35bd5cef4607d025e58951167957df4ff9b1627649d3943805472e5e293d3efb687cfd1e503faafeb2840a3e3b3f85d016051a58e1c9498aab72e63b748d834b31eb05d85dcde65e27834e266b85c75cc4ec0135135e0601cb93eeeb6e0010c8ceb65c4c319623c5e573a2c8c9fbbf7df68a930beb412d3f4dfd146175484f45d7afaa0d2e60684af9b34730f7c8438465ad3e1d0c3237336722f2aa51095bd5759f4b8ab4dda111b684aa3dac62a761722e7ae43495b7709933512c81c4e3c9133a51f7ce9f2b51fcec064f65779666960b4e45df3900f54311f5613e8012dd1b8efd359eda31a778264c72aa8bb419d862734d769076bce2810011989a45374e5c5d8729fec21427f0bf397eacbb4220f603cf463a4b0c94efd858ffd9768cd60d6ce68d755e0fbad007ce5c2223d70c7018345a102e4ab3c60a13a9e7794303156d4c2063e919f2153c13961fb324c80b240742f47773a7a8e25b3e3fb19b00ce839346c6eb3c732fbc6b888df0b1fe0a3d07b053a2e9402c267b2d62f794d8a2840526e3ade15ce2264496ccd7519571dfde47f7a4bb16292241c20b2be59f3f8fb4f6383f232d838c5a22d8c95b6834d9d2ca493f5a505ebe8899503b0e8f9b19e6e2dd81c1628b80016d02097e0134de51054c4e7674824d4d758760fc52377d2cad145e259aa2ffaf54139e1a66b1e0c1c191e32ac59474c6b526f5b3ba07d3e5ec286eddf531fcd5292869be58c9f22ef91026159f7cf9d05ef66b4299f4da48cc1635bf2243051d342d378a22c83390553e873713c0454ce5f3234397111ac3fe3207b86f0ed9fc025c81903e1748103692074f83824fda6341be4f95ff00b0a9a208c267e12fa01825054cc0513629bf3dbb56dc5b90d4316f87654a8be18227978ea0a8a522760cad620d0d14fd38920fb7321314062914275a5f99f677145a6979b156bd82ecd36f23f8e1273cc2759ecc0b2c69d94dad5211d1bed939dd87ed9e07b91d49713a6e16ade0a98aea789f04994e318e4ff2c8a188cd8d43aeb52c6daa3bc29b4af50ea82a247c5cd67b573b34cbadcc0a376d3bbd530d50367b42705d870f2e27a8197ef46070528bfe408360faa2ebb8bf76e9f388572842bcb119f4d84ee34ae31f5cc594f23705a49197b181fb78ed1ec99499c690f843a4d0cf2e226d118e9372271054fbabdcc5c92ae9fefaef0589cd0e722eaf30c1703ec4289c7fd81beaa8a455ccee5298e31e2080c10c366a6fcf56f7d13582ad0bcad037c612b710fc595b70fbefaaca23623b60c6c39b11beb8e5843b6b3dac60f"; + bench_modexp(b, input, expected); +} + +#[bench] +fn modexp_5_pow0x10001(b: &mut Bencher) { + let input = "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf010001e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad"; + let expected = "5a0eb2bdf0ac1cae8e586689fa16cd4b07dfdedaec8a110ea1fdb059dd5253231b6132987598dfc6e11f86780428982d50cf68f67ae452622c3b336b537ef3298ca645e8f89ee39a26758206a5a3f6409afc709582f95274b57b71fae5c6b74619ae6f089a5393c5b79235d9caf699d23d88fb873f78379690ad8405e34c19f5257d596580c7a6a7206a3712825afe630c76b31cdb4a23e7f0632e10f14f4e282c81a66451a26f8df2a352b5b9f607a7198449d1b926e27036810368e691a74b91c61afa73d9d3b99453e7c8b50fd4f09c039a2f2feb5c419206694c31b92df1d9586140cb3417b38d0c503c7b508cc2ed12e813a1c795e9829eb39ee78eeaf360a169b491a1d4e419574e712402de9d48d54c1ae5e03739b7156615e8267e1fb0a897f067afd11fb33f6e24182d7aaaaa18fe5bc1982f20d6b871e5a398f0f6f718181d31ec225cfa9a0a70124ed9a70031bdf0c1c7829f708b6e17d50419ef361cf77d99c85f44607186c8d683106b8bd38a49b5d0fb503b397a83388c5678dcfcc737499d84512690701ed621a6f0172aecf037184ddf0f2453e4053024018e5ab2e30d6d5363b56e8b41509317c99042f517247474ab3abc848e00a07f69c254f46f2a05cf6ed84e5cc906a518fdcfdf2c61ce731f24c5264f1a25fc04934dc28aec112134dd523f70115074ca34e3807aa4cb925147f3a0ce152d323bd8c675ace446d0fd1ae30c4b57f0eb2c23884bc18f0964c0114796c5b6d080c3d89175665fbf63a6381a6a9da39ad070b645c8bb1779506da14439a9f5b5d481954764ea114fac688930bc68534d403cff4210673b6a6ff7ae416b7cd41404c3d3f282fcd193b86d0f54d0006c2a503b40d5c3930da980565b8f9630e9493a79d1c03e74e5f93ac8e4dc1a901ec5e3b3e57049124c7b72ea345aa359e782285d9e6a5c144a378111dd02c40855ff9c2be9b48425cb0b2fd62dc8678fd151121cf26a65e917d65d8e0dacfae108eb5508b601fb8ffa370be1f9a8b749a2d12eeab81f41079de87e2d777994fa4d28188c579ad327f9957fb7bdecec5c680844dd43cb57cf87aeb763c003e65011f73f8c63442df39a92b946a6bd968a1c1e4d5fa7d88476a68bd8e20e5b70a99259c7d3f85fb1b65cd2e93972e6264e74ebf289b8b6979b9b68a85cd5b360c1987f87235c3c845d62489e33acf85d53fa3561fe3a3aee18924588d9c6eba4edb7a4d106b31173e42929f6f0c48c80ce6a72d54eca7c0fe870068b7a7c89c63cdda593f5b32d3cb4ea8a32c39f00ab449155757172d66763ed9527019d6de6c9f2416aa6203f4d11c9ebee1e1d3845099e55504446448027212616167eb36035726daa7698b075286f5379cd3e93cb3e0cf4f9cb8d017facbb5550ed32d5ec5400ae57e47e2bf78d1eaeff9480cc765ceff39db500"; + bench_modexp(b, input, expected); +} diff --git a/ethcore/src/builtin.rs b/ethcore/src/builtin.rs index 91477ca63f..ab02fbbcf0 100644 --- a/ethcore/src/builtin.rs +++ b/ethcore/src/builtin.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . +//! Standard built-in contracts. + use std::cmp::{max, min}; use std::io::{self, Read}; @@ -27,6 +29,7 @@ use bytes::BytesRef; use ethkey::{Signature, recover as ec_recover}; use ethjson; +/// Execution error. #[derive(Debug)] pub struct Error(pub &'static str); @@ -207,8 +210,8 @@ impl From for Builtin { } } -// Ethereum builtin creator. -fn ethereum_builtin(name: &str) -> Box { +/// Ethereum built-in factory. +pub fn ethereum_builtin(name: &str) -> Box { match name { "identity" => Box::new(Identity) as Box, "ecrecover" => Box::new(EcRecover) as Box, diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index ed5ea6dbe7..b7775702fa 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -146,6 +146,7 @@ pub mod views; pub mod account_provider; pub mod block; +pub mod builtin; pub mod client; pub mod db; pub mod encoded; @@ -168,7 +169,6 @@ pub mod verification; mod cache_manager; mod pod_account; mod account_db; -mod builtin; mod externalities; mod blockchain; mod factory; -- GitLab From 6bee9cd1e456011295dc64e228ecc243db7a9e8c Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Fri, 20 Jul 2018 19:55:17 +0200 Subject: [PATCH 159/191] ci: update version strings for snaps (#9160) --- scripts/gitlab-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gitlab-build.sh b/scripts/gitlab-build.sh index 3d7d392d81..014cab8e62 100755 --- a/scripts/gitlab-build.sh +++ b/scripts/gitlab-build.sh @@ -198,7 +198,7 @@ case $BUILD_PLATFORM in snapcraft clean echo "Prepare snapcraft.yaml for build on Gitlab CI in Docker image" sed -i 's/git/'"$VER"'/g' snap/snapcraft.yaml - if [[ "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "beta" || "$VER" == *1.10* || "$VER" == *1.11* ]]; + if [[ "$CI_BUILD_REF_NAME" = "stable" || "$CI_BUILD_REF_NAME" = "beta" || "$VER" == *1.11* || "$VER" == *2.0* ]]; then sed -i -e 's/grade: devel/grade: stable/' snap/snapcraft.yaml; fi -- GitLab From 7e6a571cbaa164a7d17824a1a40dc357e8dbcf13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 20 Jul 2018 18:57:48 +0100 Subject: [PATCH 160/191] docker: update hub dockerfile (#9173) * update Dockerfile for hub update to Ubuntu Xenial 16.04 fix cmake version * docker: fix tab indentation in hub dockerfile --- docker/hub/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index c6d812446b..49615850b3 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:14.04 +FROM ubuntu:xenial MAINTAINER Parity Technologies WORKDIR /build #ENV for build TAG @@ -41,7 +41,6 @@ cd /build&&git clone https://github.com/paritytech/parity && \ git pull&& \ git checkout $BUILD_TAG && \ cargo build --verbose --release --features final && \ - #ls /build/parity/target/release/parity && \ strip /build/parity/target/release/parity && \ file /build/parity/target/release/parity&&mkdir -p /parity&& cp /build/parity/target/release/parity /parity&&\ #cleanup Docker image @@ -52,6 +51,7 @@ cd /build&&git clone https://github.com/paritytech/parity && \ # add-apt-repository software-properties-common \ make \ + cmake \ curl \ wget \ git \ -- GitLab From faf8e9ec6ab3357b3d7911a48168ba8f96e54427 Mon Sep 17 00:00:00 2001 From: Max Kaye Date: Mon, 23 Jul 2018 18:18:49 +1000 Subject: [PATCH 161/191] Update "This is a bug. Please report it at:" link (#9191) --- util/panic_hook/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/panic_hook/src/lib.rs b/util/panic_hook/src/lib.rs index eb355b7d36..cc7ed7deda 100644 --- a/util/panic_hook/src/lib.rs +++ b/util/panic_hook/src/lib.rs @@ -40,7 +40,7 @@ pub fn set_with(f: F) { static ABOUT_PANIC: &str = " This is a bug. Please report it at: - https://github.com/paritytech/parity/issues/new + https://github.com/paritytech/parity-ethereum/issues/new "; fn panic_hook(info: &PanicInfo) { -- GitLab From d436eddc6a7a9656e24f21c7fa1bc33720d4f3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 23 Jul 2018 12:57:50 +0100 Subject: [PATCH 162/191] parity: fix UserDefaults json parser (#9189) * parity: fix UserDefaults json parser * parity: use serde_derive for UserDefaults * parity: support deserialization of old UserDefault json format * parity: make UserDefaults serde backwards compatible * parity: tabify indentation in UserDefaults --- Cargo.lock | 60 +++++++------- parity/params.rs | 2 +- parity/run.rs | 4 +- parity/user_defaults.rs | 179 +++++++++++++++++++++++----------------- 4 files changed, 134 insertions(+), 111 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf965ba42e..2192318166 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,7 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -357,7 +357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -428,7 +428,7 @@ dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -472,7 +472,7 @@ dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -602,7 +602,7 @@ dependencies = [ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", "rlp_derive 0.1.0", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", @@ -698,7 +698,7 @@ dependencies = [ "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -736,7 +736,7 @@ dependencies = [ "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", "rlp_derive 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -769,7 +769,7 @@ dependencies = [ "parity-crypto 0.1.0 (git+https://github.com/paritytech/parity-common)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -877,7 +877,7 @@ dependencies = [ "ethereum-types-serialize 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fixed-hash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "uint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -886,7 +886,7 @@ name = "ethereum-types-serialize" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -895,7 +895,7 @@ version = "0.1.0" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -916,7 +916,7 @@ dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -931,7 +931,7 @@ dependencies = [ "panic_hook 0.1.0", "parity-wordlist 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -952,7 +952,7 @@ dependencies = [ "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -972,7 +972,7 @@ dependencies = [ "panic_hook 0.1.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1007,7 +1007,7 @@ dependencies = [ "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "pretty_assertions 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", @@ -1330,7 +1330,7 @@ source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972 dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1367,7 +1367,7 @@ source = "git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11#6b972 dependencies = [ "jsonrpc-core 8.0.1 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", "jsonrpc-pubsub 8.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.11)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1993,7 +1993,7 @@ dependencies = [ "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2055,7 +2055,7 @@ dependencies = [ "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2127,7 +2127,7 @@ dependencies = [ "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "stats 0.1.0", @@ -2151,7 +2151,7 @@ dependencies = [ "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rpc 1.12.0", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2238,7 +2238,7 @@ dependencies = [ "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.2.1 (git+https://github.com/paritytech/parity-common)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2464,7 +2464,7 @@ dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "vm 0.1.0", @@ -2759,7 +2759,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.37" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2787,7 +2787,7 @@ name = "serde_ignored" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2798,7 +2798,7 @@ dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3236,7 +3236,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3501,7 +3501,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "panic_hook 0.1.0", "parity-whisper 0.1.0", - "serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3777,7 +3777,7 @@ dependencies = [ "checksum sct 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1137b767bbe1c4d30656993bdd97422ed41255d9400b105d735f8c7d9e800632" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "d3bcee660dcde8f52c3765dd9ca5ee36b4bf35470a738eb0bd5a8752b0389645" +"checksum serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "0c3adf19c07af6d186d91dae8927b83b0553d07ca56cbf7f2f32560455c91920" "checksum serde_derive 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "f1711ab8b208541fa8de00425f6a577d90f27bb60724d2bb5fd911314af9668f" "checksum serde_derive_internals 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "89b340a48245bc03ddba31d0ff1709c118df90edc6adabaca4aac77aea181cce" "checksum serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142" diff --git a/parity/params.rs b/parity/params.rs index 2227af3e9d..2d1514a02d 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -334,7 +334,7 @@ pub fn fatdb_switch_to_bool(switch: Switch, user_defaults: &UserDefaults, _algor } pub fn mode_switch_to_bool(switch: Option, user_defaults: &UserDefaults) -> Result { - Ok(switch.unwrap_or(user_defaults.mode.clone())) + Ok(switch.unwrap_or(user_defaults.mode().clone())) } #[cfg(test)] diff --git a/parity/run.rs b/parity/run.rs index 8d738b493b..f9ff961111 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -766,13 +766,13 @@ fn execute_impl(cmd: RunCmd, logger: Arc, on_client_rq: user_defaults.pruning = algorithm; user_defaults.tracing = tracing; user_defaults.fat_db = fat_db; - user_defaults.mode = mode; + user_defaults.set_mode(mode); user_defaults.save(&user_defaults_path)?; // tell client how to save the default mode if it gets changed. client.on_user_defaults_change(move |mode: Option| { if let Some(mode) = mode { - user_defaults.mode = mode; + user_defaults.set_mode(mode); } let _ = user_defaults.save(&user_defaults_path); // discard failures - there's nothing we can do }); diff --git a/parity/user_defaults.rs b/parity/user_defaults.rs index 5031886f29..5df50dd99d 100644 --- a/parity/user_defaults.rs +++ b/parity/user_defaults.rs @@ -14,107 +14,130 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -use std::fmt; use std::fs::File; use std::io::Write; use std::path::Path; -use std::collections::BTreeMap; use std::time::Duration; -use serde::{Serialize, Serializer, Deserialize, Deserializer}; -use serde::de::{Error, Visitor, MapAccess}; -use serde::de::value::MapAccessDeserializer; -use serde_json::Value; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde_json::de::from_reader; use serde_json::ser::to_string; use journaldb::Algorithm; -use ethcore::client::Mode; +use ethcore::client::{Mode as ClientMode}; +#[derive(Clone)] +pub struct Seconds(Duration); + +impl Seconds { + pub fn value(&self) -> u64 { + self.0.as_secs() + } +} + +impl From for Seconds { + fn from(s: u64) -> Seconds { + Seconds(Duration::from_secs(s)) + } +} + +impl From for Seconds { + fn from(d: Duration) -> Seconds { + Seconds(d) + } +} + +impl Into for Seconds { + fn into(self) -> Duration { + self.0 + } +} + +impl Serialize for Seconds { + fn serialize(&self, serializer: S) -> Result { + serializer.serialize_u64(self.value()) + } +} + +impl<'de> Deserialize<'de> for Seconds { + fn deserialize>(deserializer: D) -> Result { + let secs = u64::deserialize(deserializer)?; + Ok(Seconds::from(secs)) + } +} + +#[derive(Clone, Serialize, Deserialize)] +#[serde(rename_all = "lowercase", tag = "mode")] +pub enum Mode { + Active, + Passive { + #[serde(rename = "mode.timeout")] + timeout: Seconds, + #[serde(rename = "mode.alarm")] + alarm: Seconds, + }, + Dark { + #[serde(rename = "mode.timeout")] + timeout: Seconds, + }, + Offline, +} + +impl Into for Mode { + fn into(self) -> ClientMode { + match self { + Mode::Active => ClientMode::Active, + Mode::Passive { timeout, alarm } => ClientMode::Passive(timeout.into(), alarm.into()), + Mode::Dark { timeout } => ClientMode::Dark(timeout.into()), + Mode::Offline => ClientMode::Off, + } + } +} + +impl From for Mode { + fn from(mode: ClientMode) -> Mode { + match mode { + ClientMode::Active => Mode::Active, + ClientMode::Passive(timeout, alarm) => Mode::Passive { timeout: timeout.into(), alarm: alarm.into() }, + ClientMode::Dark(timeout) => Mode::Dark { timeout: timeout.into() }, + ClientMode::Off => Mode::Offline, + } + } +} + +#[derive(Serialize, Deserialize)] pub struct UserDefaults { pub is_first_launch: bool, + #[serde(with = "algorithm_serde")] pub pruning: Algorithm, pub tracing: bool, pub fat_db: bool, - pub mode: Mode, + #[serde(flatten)] + mode: Mode, } -impl Serialize for UserDefaults { - fn serialize(&self, serializer: S) -> Result - where S: Serializer { - let mut map: BTreeMap = BTreeMap::new(); - map.insert("is_first_launch".into(), Value::Bool(self.is_first_launch)); - map.insert("pruning".into(), Value::String(self.pruning.as_str().into())); - map.insert("tracing".into(), Value::Bool(self.tracing)); - map.insert("fat_db".into(), Value::Bool(self.fat_db)); - let mode_str = match self.mode { - Mode::Off => "offline", - Mode::Dark(timeout) => { - map.insert("mode.timeout".into(), Value::Number(timeout.as_secs().into())); - "dark" - }, - Mode::Passive(timeout, alarm) => { - map.insert("mode.timeout".into(), Value::Number(timeout.as_secs().into())); - map.insert("mode.alarm".into(), Value::Number(alarm.as_secs().into())); - "passive" - }, - Mode::Active => "active", - }; - map.insert("mode".into(), Value::String(mode_str.into())); - - map.serialize(serializer) +impl UserDefaults { + pub fn mode(&self) -> ClientMode { + self.mode.clone().into() } -} -struct UserDefaultsVisitor; - -impl<'a> Deserialize<'a> for UserDefaults { - fn deserialize(deserializer: D) -> Result - where D: Deserializer<'a> { - deserializer.deserialize_any(UserDefaultsVisitor) + pub fn set_mode(&mut self, mode: ClientMode) { + self.mode = mode.into(); } } -impl<'a> Visitor<'a> for UserDefaultsVisitor { - type Value = UserDefaults; +mod algorithm_serde { + use serde::{Deserialize, Deserializer, Serialize, Serializer}; + use serde::de::Error; + use journaldb::Algorithm; - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - write!(formatter, "a valid UserDefaults object") + pub fn serialize(algorithm: &Algorithm, serializer: S) -> Result + where S: Serializer { + algorithm.as_str().serialize(serializer) } - fn visit_map(self, visitor: V) -> Result where V: MapAccess<'a> { - let mut map: BTreeMap = Deserialize::deserialize(MapAccessDeserializer::new(visitor))?; - let pruning: Value = map.remove("pruning").ok_or_else(|| Error::custom("missing pruning"))?; - let pruning = pruning.as_str().ok_or_else(|| Error::custom("invalid pruning value"))?; - let pruning = pruning.parse().map_err(|_| Error::custom("invalid pruning method"))?; - let tracing: Value = map.remove("tracing").ok_or_else(|| Error::custom("missing tracing"))?; - let tracing = tracing.as_bool().ok_or_else(|| Error::custom("invalid tracing value"))?; - let fat_db: Value = map.remove("fat_db").unwrap_or_else(|| Value::Bool(false)); - let fat_db = fat_db.as_bool().ok_or_else(|| Error::custom("invalid fat_db value"))?; - - let mode: Value = map.remove("mode").unwrap_or_else(|| Value::String("active".to_owned())); - let mode = match mode.as_str().ok_or_else(|| Error::custom("invalid mode value"))? { - "offline" => Mode::Off, - "dark" => { - let timeout = map.remove("mode.timeout").and_then(|v| v.as_u64()).ok_or_else(|| Error::custom("invalid/missing mode.timeout value"))?; - Mode::Dark(Duration::from_secs(timeout)) - }, - "passive" => { - let timeout = map.remove("mode.timeout").and_then(|v| v.as_u64()).ok_or_else(|| Error::custom("invalid/missing mode.timeout value"))?; - let alarm = map.remove("mode.alarm").and_then(|v| v.as_u64()).ok_or_else(|| Error::custom("invalid/missing mode.alarm value"))?; - Mode::Passive(Duration::from_secs(timeout), Duration::from_secs(alarm)) - }, - "active" => Mode::Active, - _ => { return Err(Error::custom("invalid mode value")); }, - }; - - let user_defaults = UserDefaults { - is_first_launch: false, - pruning: pruning, - tracing: tracing, - fat_db: fat_db, - mode: mode, - }; - - Ok(user_defaults) + pub fn deserialize<'de, D>(deserializer: D) -> Result + where D: Deserializer<'de> { + let pruning = String::deserialize(deserializer)?; + pruning.parse().map_err(|_| Error::custom("invalid pruning method")) } } -- GitLab From 8dd4db5d85e34e9c66be5db1d7664e51f915a38b Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Mon, 23 Jul 2018 13:58:50 +0200 Subject: [PATCH 163/191] docs: update repository links (#9159) * docs: update repository links * docs: update repository links in contribution guide --- .cargo/config | 2 +- .github/CONTRIBUTING.md | 8 +- CHANGELOG.md | 546 +++++++++++------------ README.md | 6 +- docker/hub/Dockerfile | 2 +- ethcore/light/src/net/request_credits.rs | 2 +- ethcore/light/src/types/request/mod.rs | 4 +- ethcore/src/lib.rs | 4 +- ethcore/src/snapshot/mod.rs | 2 +- ethcore/src/spec/spec.rs | 2 +- ethcore/types/src/blockchain_info.rs | 2 +- 11 files changed, 290 insertions(+), 290 deletions(-) diff --git a/.cargo/config b/.cargo/config index 72652ad2f1..3f07816e3c 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,3 +1,3 @@ [target.x86_64-pc-windows-msvc] -# Link the C runtime statically ; https://github.com/paritytech/parity/issues/6643 +# Link the C runtime statically ; https://github.com/paritytech/parity-ethereum/issues/6643 rustflags = ["-Ctarget-feature=+crt-static"] diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e3438f10a2..fc187a534f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Do you have a question? -Check out our [Basic Usage](https://github.com/paritytech/parity/wiki/Basic-Usage), [Configuration](https://github.com/paritytech/parity/wiki/Configuring-Parity), and [FAQ](https://github.com/paritytech/parity/wiki/FAQ) articles on our [wiki](https://github.com/paritytech/parity/wiki)! +Check out our [Basic Usage](https://wiki.parity.io/Basic-Usage), [Configuration](https://wiki.parity.io/Configuring-Parity-Ethereum), and [FAQ](https://wiki.parity.io/FAQ) articles on our [wiki](https://wiki.parity.io/)! See also frequently asked questions [tagged with `parity`](https://ethereum.stackexchange.com/questions/tagged/parity?sort=votes&pageSize=50) on Stack Exchange. @@ -10,7 +10,7 @@ See also frequently asked questions [tagged with `parity`](https://ethereum.stac Do **not** open an issue on Github if you think your discovered bug could be a **security-relevant vulnerability**. Please, read our [security policy](../SECURITY.md) instead. -Otherwise, just create a [new issue](https://github.com/paritytech/parity/issues/new) in our repository and state: +Otherwise, just create a [new issue](https://github.com/paritytech/parity-ethereum/issues/new) in our repository and state: - What's your Parity version? - What's your operating system and version? @@ -22,9 +22,9 @@ Also, try to include **steps to reproduce** the issue and expand on the **actual ## Contribute! -If you would like to contribute to Parity, please **fork it**, fix bugs or implement features, and [propose a pull request](https://github.com/paritytech/parity/compare). +If you would like to contribute to Parity, please **fork it**, fix bugs or implement features, and [propose a pull request](https://github.com/paritytech/parity-ethereum/compare). -Please, refer to the [Coding Guide](https://github.com/paritytech/parity/wiki/Coding-guide) in our wiki for more details about hacking on Parity. +Please, refer to the [Coding Guide](https://wiki.parity.io/Coding-guide) in our wiki for more details about hacking on Parity. ## License. diff --git a/CHANGELOG.md b/CHANGELOG.md index 62317341a1..b92c3f0ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,33 +1,33 @@ -## Parity-Ethereum [v2.0.0](https://github.com/paritytech/parity/releases/tag/v2.0.0) "Ethereum" (2018-07-18) +## Parity-Ethereum [v2.0.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.0.0) "Ethereum" (2018-07-18) This is the Parity-Ethereum//v2.0.0-beta release, code-named "Ethereum", **YOLO!** Please note, Parity-Ethereum//v2.0.0 comes with some breaking changes that might be interrupting your usual workflows. Please mind them before upgrading: -- The Parity client is now called _Parity-Ethereum_ to distinguish it from other software we provide, such as [_Parity-Bitcoin_](https://github.com/paritytech/parity-bitcoin/) and [_Parity-Polkadot_](https://github.com/paritytech/polkadot) ([#9052](https://github.com/paritytech/parity/pull/9052)). -- The public node and the user interface (a.k.a. _"Parity Wallet"_) are completely removed from the Parity-Ethereum//v2.0.0 client ([#8758](https://github.com/paritytech/parity/pull/8758), [#8783](https://github.com/paritytech/parity/pull/8783), [#8641](https://github.com/paritytech/parity/pull/8641)). Users interested running a Parity Wallet, check out [the stand-alone UI application](https://github.com/Parity-JS/shell/releases). -- The DApps subsystem was completely removed from the client ([#9017](https://github.com/paritytech/parity/pull/9017), [#9107](https://github.com/paritytech/parity/pull/9107)). Again, use the standalone wallet if you wish to continue working with them. -- Windows and MacOS versions are not available as installer anymore and the system trays were removed ([#8778](https://github.com/paritytech/parity/pull/8778)). If you desire to run Parity-Ethereum on Windows or MacOS, you still can get the binaries from our mirrors. Furthermore, MacOS users are encouraged [to use our homebrew tap](https://github.com/paritytech/homebrew-paritytech/). -- Linux versions are not available as deb-/rpm-packages anymore ([#8887](https://github.com/paritytech/parity/pull/8887)). Communities are encouraged to provide their own packages or maintain their own repositories, such as [Arch Linux does](https://www.archlinux.org/packages/community/x86_64/parity/) for instance. -- MD5-checksums are completely replaced by SHA256-checksums ([#8884](https://github.com/paritytech/parity/pull/8884)). This is also reflected on our homepage by now. -- Deprecated, removed, or replaced CLI-options are hidden from client `--help` to further discourage their usage ([#8967](https://github.com/paritytech/parity/pull/8967)). +- The Parity client is now called _Parity-Ethereum_ to distinguish it from other software we provide, such as [_Parity-Bitcoin_](https://github.com/paritytech/parity-bitcoin/) and [_Parity-Polkadot_](https://github.com/paritytech/polkadot) ([#9052](https://github.com/paritytech/parity-ethereum/pull/9052)). +- The public node and the user interface (a.k.a. _"Parity Wallet"_) are completely removed from the Parity-Ethereum//v2.0.0 client ([#8758](https://github.com/paritytech/parity-ethereum/pull/8758), [#8783](https://github.com/paritytech/parity-ethereum/pull/8783), [#8641](https://github.com/paritytech/parity-ethereum/pull/8641)). Users interested running a Parity Wallet, check out [the stand-alone UI application](https://github.com/Parity-JS/shell/releases). +- The DApps subsystem was completely removed from the client ([#9017](https://github.com/paritytech/parity-ethereum/pull/9017), [#9107](https://github.com/paritytech/parity-ethereum/pull/9107)). Again, use the standalone wallet if you wish to continue working with them. +- Windows and MacOS versions are not available as installer anymore and the system trays were removed ([#8778](https://github.com/paritytech/parity-ethereum/pull/8778)). If you desire to run Parity-Ethereum on Windows or MacOS, you still can get the binaries from our mirrors. Furthermore, MacOS users are encouraged [to use our homebrew tap](https://github.com/paritytech/homebrew-paritytech/). +- Linux versions are not available as deb-/rpm-packages anymore ([#8887](https://github.com/paritytech/parity-ethereum/pull/8887)). Communities are encouraged to provide their own packages or maintain their own repositories, such as [Arch Linux does](https://www.archlinux.org/packages/community/x86_64/parity/) for instance. +- MD5-checksums are completely replaced by SHA256-checksums ([#8884](https://github.com/paritytech/parity-ethereum/pull/8884)). This is also reflected on our homepage by now. +- Deprecated, removed, or replaced CLI-options are hidden from client `--help` to further discourage their usage ([#8967](https://github.com/paritytech/parity-ethereum/pull/8967)). Additional noteworthy changes to the client: -- Tracing of precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486)) -- _Parity-Ethereum_ as a library now provides APIs for running full and light nodes and a C interface ([#8412](https://github.com/paritytech/parity/pull/8412)). Shared crates are now available in [_Parity-Common_](https://github.com/paritytech/parity-common) ([#9083](https://github.com/paritytech/parity/pull/9083)). -- The Morden database and keys are now moved to a `./Morden` subdirectory instead of `./test` which is by default used by Ropsten ([#8621](https://github.com/paritytech/parity/pull/8621)). -- Adding support for having an on-chain contract calculating the block rewards ([#8419](https://github.com/paritytech/parity/pull/8419)). -- Enforcing warp-only synchronization with `--warp-barrier [blocknumber]` flag ([#8228](https://github.com/paritytech/parity/pull/8228)). -- Adding a fork-choice and meta-data framework suitable for implementing Casper ([#8401](https://github.com/paritytech/parity/pull/8401)). -- Returning an error if RLP-size of a transaction exceeds a 300kB limit ([#8473](https://github.com/paritytech/parity/pull/8473)). -- Warp-sync is now resumable by keeping the downloaded chunks between client restarts. Also, it seeds downloaded snapshots for other nodes ([#8544](https://github.com/paritytech/parity/pull/8544)). -- The developer chain `--chain dev` now contains Byzantium features, this breaks existing developer chains ([#8717](https://github.com/paritytech/parity/pull/8717)). -- The EIP150, EIP160 and EIP161 forks are now to be specified in common params section of a chain-spec file instead of the Ethash params to enable these features on non-proof-of-work chains ([#8614](https://github.com/paritytech/parity/pull/8614)). Please update your chain specs. -- Allowing to disable local-by-default for transactions with new configurations ([#8882](https://github.com/paritytech/parity/pull/8882)). -- Never drop local transactions from different senders ([#9002](https://github.com/paritytech/parity/pull/9002)). -- Optimize pending transactions filter and fix ethstats reporting of pending transactions ([#9026](https://github.com/paritytech/parity/pull/9026)). -- Add separate database directory for light client allowing to run full and light nodes at the same time ([#9064](https://github.com/paritytech/parity/pull/9064)). +- Tracing of precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity-ethereum/pull/8486)) +- _Parity-Ethereum_ as a library now provides APIs for running full and light nodes and a C interface ([#8412](https://github.com/paritytech/parity-ethereum/pull/8412)). Shared crates are now available in [_Parity-Common_](https://github.com/paritytech/parity-common) ([#9083](https://github.com/paritytech/parity-ethereum/pull/9083)). +- The Morden database and keys are now moved to a `./Morden` subdirectory instead of `./test` which is by default used by Ropsten ([#8621](https://github.com/paritytech/parity-ethereum/pull/8621)). +- Adding support for having an on-chain contract calculating the block rewards ([#8419](https://github.com/paritytech/parity-ethereum/pull/8419)). +- Enforcing warp-only synchronization with `--warp-barrier [blocknumber]` flag ([#8228](https://github.com/paritytech/parity-ethereum/pull/8228)). +- Adding a fork-choice and meta-data framework suitable for implementing Casper ([#8401](https://github.com/paritytech/parity-ethereum/pull/8401)). +- Returning an error if RLP-size of a transaction exceeds a 300kB limit ([#8473](https://github.com/paritytech/parity-ethereum/pull/8473)). +- Warp-sync is now resumable by keeping the downloaded chunks between client restarts. Also, it seeds downloaded snapshots for other nodes ([#8544](https://github.com/paritytech/parity-ethereum/pull/8544)). +- The developer chain `--chain dev` now contains Byzantium features, this breaks existing developer chains ([#8717](https://github.com/paritytech/parity-ethereum/pull/8717)). +- The EIP150, EIP160 and EIP161 forks are now to be specified in common params section of a chain-spec file instead of the Ethash params to enable these features on non-proof-of-work chains ([#8614](https://github.com/paritytech/parity-ethereum/pull/8614)). Please update your chain specs. +- Allowing to disable local-by-default for transactions with new configurations ([#8882](https://github.com/paritytech/parity-ethereum/pull/8882)). +- Never drop local transactions from different senders ([#9002](https://github.com/paritytech/parity-ethereum/pull/9002)). +- Optimize pending transactions filter and fix ethstats reporting of pending transactions ([#9026](https://github.com/paritytech/parity-ethereum/pull/9026)). +- Add separate database directory for light client allowing to run full and light nodes at the same time ([#9064](https://github.com/paritytech/parity-ethereum/pull/9064)). If you are upgrading directly from versions 1.10.9 or earlier, please note important changes to our transaction-queue implementation, namely: @@ -36,9 +36,9 @@ If you are upgrading directly from versions 1.10.9 or earlier, please note impor The full list of included changes: -- Backports to 2.0.0-beta ([#9094](https://github.com/paritytech/parity/pull/9094)) +- Backports to 2.0.0-beta ([#9094](https://github.com/paritytech/parity-ethereum/pull/9094)) - Parity-version: betalize 2.0 - - Multiple improvements to discovery ping handling ([#8771](https://github.com/paritytech/parity/pull/8771)) + - Multiple improvements to discovery ping handling ([#8771](https://github.com/paritytech/parity-ethereum/pull/8771)) - Discovery: Only add nodes to routing table after receiving pong. - Discovery: Refactor packet creation into its own function. - Discovery: Additional testing for new add_node behavior. @@ -47,268 +47,268 @@ The full list of included changes: - Discovery: Track timeouts on FIND_NODE requests. - Discovery: Retry failed pings with exponential backoff. - !fixup Use slice instead of Vec for request_backoff. - - Add separate database directory for light client ([#9064](https://github.com/paritytech/parity/pull/9064)) - - Add separate default DB path for light client ([#8927](https://github.com/paritytech/parity/pull/8927)) + - Add separate database directory for light client ([#9064](https://github.com/paritytech/parity-ethereum/pull/9064)) + - Add separate default DB path for light client ([#8927](https://github.com/paritytech/parity-ethereum/pull/8927)) - Improve readability - - Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity/pull/9077))" ([#9097](https://github.com/paritytech/parity/pull/9097)) - - Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity/pull/9077))" + - Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity-ethereum/pull/9077))" ([#9097](https://github.com/paritytech/parity-ethereum/pull/9097)) + - Revert "Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity-ethereum/pull/9077))" - This reverts commit 7e77932. - Restore some of the changes - Update parity-common - - Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity/pull/9099)) - - Fix work-notify. ([#9104](https://github.com/paritytech/parity/pull/9104)) - - Update hidapi, fixes #7542 ([#9108](https://github.com/paritytech/parity/pull/9108)) - - Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity/pull/9111)) - - Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity/pull/9098)) + - Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity-ethereum/pull/9099)) + - Fix work-notify. ([#9104](https://github.com/paritytech/parity-ethereum/pull/9104)) + - Update hidapi, fixes #7542 ([#9108](https://github.com/paritytech/parity-ethereum/pull/9108)) + - Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity-ethereum/pull/9111)) + - Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity-ethereum/pull/9098)) - Insert Kovan hardcoded headers until 7690241 - Insert Kovan hardcoded headers until block 7690241 - Insert Ropsten hardcoded headers until 3612673 - Insert Mainnet hardcoded headers until block 5941249 - - Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115)) - - Insert ETC (classic) hardcoded headers until block 6170625 ([#9121](https://github.com/paritytech/parity/pull/9121)) - - Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity/pull/9135)) - - Completely remove all dapps struct from rpc ([#9107](https://github.com/paritytech/parity/pull/9107)) + - Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity-ethereum/pull/9115)) + - Insert ETC (classic) hardcoded headers until block 6170625 ([#9121](https://github.com/paritytech/parity-ethereum/pull/9121)) + - Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity-ethereum/pull/9135)) + - Completely remove all dapps struct from rpc ([#9107](https://github.com/paritytech/parity-ethereum/pull/9107)) - Completely remove all dapps struct from rpc - Remove unused pub use - - `evm bench` fix broken dependencies ([#9134](https://github.com/paritytech/parity/pull/9134)) + - `evm bench` fix broken dependencies ([#9134](https://github.com/paritytech/parity-ethereum/pull/9134)) - `evm bench` use valid dependencies - Benchmarks of the `evm` used stale versions of a couple a crates that this commit fixes! - Fix warnings - - Update snapcraft.yaml ([#9132](https://github.com/paritytech/parity/pull/9132)) -- Parity Ethereum 2.0.0 ([#9052](https://github.com/paritytech/parity/pull/9052)) -- Don't fetch snapshot chunks at random ([#9088](https://github.com/paritytech/parity/pull/9088)) -- Remove the dapps system ([#9017](https://github.com/paritytech/parity/pull/9017)) -- Fix nightly warnings ([#9080](https://github.com/paritytech/parity/pull/9080)) -- Db: remove wal disabling / fast-and-loose option. ([#8963](https://github.com/paritytech/parity/pull/8963)) -- Transactions hashes missing in trace_replayBlockTransactions method result [#8725](https://github.com/paritytech/parity/issues/8725) ([#8883](https://github.com/paritytech/parity/pull/8883)) -- Delete crates from parity-ethereum and fetch them from parity-common instead ([#9083](https://github.com/paritytech/parity/pull/9083)) -- Updater verification ([#8787](https://github.com/paritytech/parity/pull/8787)) -- Phrasing, precisions and typos in CLI help ([#9060](https://github.com/paritytech/parity/pull/9060)) -- Some work towards iOS build ([#9045](https://github.com/paritytech/parity/pull/9045)) -- Clean up deprecated options and add CHECK macro ([#9036](https://github.com/paritytech/parity/pull/9036)) -- Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity/pull/9077)) -- Fix warning in secret-store test ([#9074](https://github.com/paritytech/parity/pull/9074)) -- Seedhashcompute remove needless `new` impl ([#9063](https://github.com/paritytech/parity/pull/9063)) -- Remove trait bounds from several structs ([#9055](https://github.com/paritytech/parity/pull/9055)) -- Docs: add changelog for 1.10.9 stable and 1.11.6 beta ([#9069](https://github.com/paritytech/parity/pull/9069)) -- Enable test in `miner/pool/test` ([#9072](https://github.com/paritytech/parity/pull/9072)) -- Fetch: replace futures-timer with tokio-timer ([#9066](https://github.com/paritytech/parity/pull/9066)) -- Remove util-error ([#9054](https://github.com/paritytech/parity/pull/9054)) -- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity/pull/8998)) -- A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity/pull/9024)) -- Reduce number of constraints for triedb types ([#9043](https://github.com/paritytech/parity/pull/9043)) -- Bump fs-swap to 0.2.3 so it is compatible with osx 10.11 again ([#9050](https://github.com/paritytech/parity/pull/9050)) -- Recursive test ([#9042](https://github.com/paritytech/parity/pull/9042)) -- Introduce more optional features in ethcore ([#9020](https://github.com/paritytech/parity/pull/9020)) -- Update ETSC bootnodes ([#9038](https://github.com/paritytech/parity/pull/9038)) -- Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity/pull/9026)) -- Eip160/eip161 spec: u64 -> BlockNumber ([#9044](https://github.com/paritytech/parity/pull/9044)) -- Move the C/C++ example to another directory ([#9032](https://github.com/paritytech/parity/pull/9032)) -- Bump parking_lot to 0.6 ([#9013](https://github.com/paritytech/parity/pull/9013)) -- Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity/pull/9002)) -- Precise HTTP or WebSockets for JSON-RPC options ([#9027](https://github.com/paritytech/parity/pull/9027)) -- Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity/pull/9005)) -- Make HashDB generic ([#8739](https://github.com/paritytech/parity/pull/8739)) -- Only return error log for rustls ([#9025](https://github.com/paritytech/parity/pull/9025)) -- Update Changelogs for 1.10.8 and 1.11.5 ([#9012](https://github.com/paritytech/parity/pull/9012)) -- Attempt to graceful shutdown in case of panics ([#8999](https://github.com/paritytech/parity/pull/8999)) -- Simplify kvdb error types ([#8924](https://github.com/paritytech/parity/pull/8924)) -- Add option for user to set max size limit for RPC requests ([#9010](https://github.com/paritytech/parity/pull/9010)) -- Bump ntp to 0.5.0 ([#9009](https://github.com/paritytech/parity/pull/9009)) -- Removed duplicate dependency ([#9021](https://github.com/paritytech/parity/pull/9021)) -- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity/pull/8934)) -- Parity: fix db path when migrating to blooms db ([#8975](https://github.com/paritytech/parity/pull/8975)) -- Preserve the current abort behavior ([#8995](https://github.com/paritytech/parity/pull/8995)) -- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity/pull/8980)) -- Tentative fix for missing dependency error ([#8973](https://github.com/paritytech/parity/pull/8973)) -- Refactor evm Instruction to be a c-like enum ([#8914](https://github.com/paritytech/parity/pull/8914)) -- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity/pull/8977)) -- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity/pull/8984)) -- Use local parity-dapps-glue instead of crate published at crates.io ([#8983](https://github.com/paritytech/parity/pull/8983)) -- Parity: omit redundant last imported block number in light sync informant ([#8962](https://github.com/paritytech/parity/pull/8962)) -- Disable hardware-wallets on platforms that don't support `libusb` ([#8464](https://github.com/paritytech/parity/pull/8464)) -- Bump error-chain and quick_error versions ([#8972](https://github.com/paritytech/parity/pull/8972)) -- Evm benchmark utilities ([#8944](https://github.com/paritytech/parity/pull/8944)) -- Parity: hide legacy options from cli --help ([#8967](https://github.com/paritytech/parity/pull/8967)) -- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity/pull/8952)) -- Add type for passwords. ([#8920](https://github.com/paritytech/parity/pull/8920)) -- Deps: bump fs-swap ([#8953](https://github.com/paritytech/parity/pull/8953)) -- Eliminate some more `transmute()` ([#8879](https://github.com/paritytech/parity/pull/8879)) -- Restrict vault.json permssion to owner and using random suffix for temp vault.json file ([#8932](https://github.com/paritytech/parity/pull/8932)) -- Print SS.self_public when starting SS node ([#8949](https://github.com/paritytech/parity/pull/8949)) -- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity/pull/8930)) -- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity/pull/8943)) -- Docs: update changelogs ([#8931](https://github.com/paritytech/parity/pull/8931)) -- Ethcore: fix compilation when using slow-blocks or evm-debug features ([#8936](https://github.com/paritytech/parity/pull/8936)) -- Fixed blooms dir creation ([#8941](https://github.com/paritytech/parity/pull/8941)) -- Update hardcoded headers ([#8925](https://github.com/paritytech/parity/pull/8925)) -- New blooms database ([#8712](https://github.com/paritytech/parity/pull/8712)) -- Ethstore: retry deduplication of wallet file names until success ([#8910](https://github.com/paritytech/parity/pull/8910)) -- Update ropsten.json ([#8926](https://github.com/paritytech/parity/pull/8926)) -- Include node identity in the P2P advertised client version. ([#8830](https://github.com/paritytech/parity/pull/8830)) -- Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity/pull/8882)) -- Allow Poll Lifetime to be configured via CLI ([#8885](https://github.com/paritytech/parity/pull/8885)) -- Cleanup nibbleslice ([#8915](https://github.com/paritytech/parity/pull/8915)) -- Hardware-wallets `Clean up things I missed in the latest PR` ([#8890](https://github.com/paritytech/parity/pull/8890)) -- Remove debian/.deb and centos/.rpm packaging scripts ([#8887](https://github.com/paritytech/parity/pull/8887)) -- Remove a weird emoji in new_social docs ([#8913](https://github.com/paritytech/parity/pull/8913)) -- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity/pull/8906)) -- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity/pull/8891)) -- Fixed osx permissions ([#8901](https://github.com/paritytech/parity/pull/8901)) -- Atomic create new files with permissions to owner in ethstore ([#8896](https://github.com/paritytech/parity/pull/8896)) -- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity/pull/8892)) -- Add support for --chain tobalaba ([#8870](https://github.com/paritytech/parity/pull/8870)) -- Fix some warns on nightly ([#8889](https://github.com/paritytech/parity/pull/8889)) -- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity/pull/8886)) -- Secretstore: service pack 1 ([#8435](https://github.com/paritytech/parity/pull/8435)) -- Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity/pull/8796)) -- Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity/issues/8774) ([#8876](https://github.com/paritytech/parity/pull/8876)) -- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity/pull/8884)) -- Hardware_wallet/Ledger `Sign messages` + some refactoring ([#8868](https://github.com/paritytech/parity/pull/8868)) -- Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity/pull/8853)) -- Docker: Fix alpine build ([#8878](https://github.com/paritytech/parity/pull/8878)) -- Remove mac os installers etc ([#8875](https://github.com/paritytech/parity/pull/8875)) -- Readme.md: update the list of dependencies ([#8864](https://github.com/paritytech/parity/pull/8864)) -- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity/pull/8854)) -- Tx permission contract improvement ([#8400](https://github.com/paritytech/parity/pull/8400)) -- Limit the number of transactions in pending set ([#8777](https://github.com/paritytech/parity/pull/8777)) -- Use sealing.enabled to emit eth_mining information ([#8844](https://github.com/paritytech/parity/pull/8844)) -- Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity/pull/8867)) -- Fix Cli Return Code on --help for ethkey, ethstore & whisper ([#8863](https://github.com/paritytech/parity/pull/8863)) -- Fix subcrate test compile ([#8862](https://github.com/paritytech/parity/pull/8862)) -- Network-devp2p: downgrade logging to debug, add target ([#8784](https://github.com/paritytech/parity/pull/8784)) -- Clearing up a comment about the prefix for signing ([#8828](https://github.com/paritytech/parity/pull/8828)) -- Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity/pull/8834)) -- Devp2p: Move UDP socket handling from Discovery to Host. ([#8790](https://github.com/paritytech/parity/pull/8790)) -- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity/issues/8088) ([#8803](https://github.com/paritytech/parity/pull/8803)) -- Specify critical release flag per network ([#8821](https://github.com/paritytech/parity/pull/8821)) -- Fix `deadlock_detection` feature branch compilation ([#8824](https://github.com/paritytech/parity/pull/8824)) -- Use system allocator when profiling memory ([#8831](https://github.com/paritytech/parity/pull/8831)) -- Added from and to to Receipt ([#8756](https://github.com/paritytech/parity/pull/8756)) -- Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity/pull/8832)) -- Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity/pull/8822)) -- Parity: fix indentation in sync logging ([#8794](https://github.com/paritytech/parity/pull/8794)) -- Removed obsolete IpcMode enum ([#8819](https://github.com/paritytech/parity/pull/8819)) -- Remove UI related settings from CLI ([#8783](https://github.com/paritytech/parity/pull/8783)) -- Remove windows tray and installer ([#8778](https://github.com/paritytech/parity/pull/8778)) -- Docs: add changelogs for 1.10.6 and 1.11.3 ([#8810](https://github.com/paritytech/parity/pull/8810)) -- Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity/pull/8751)) -- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity/pull/8802)) -- Fix evmbin compilation ([#8795](https://github.com/paritytech/parity/pull/8795)) -- Have space between feature cfg flag ([#8791](https://github.com/paritytech/parity/pull/8791)) -- Rpc: fix address formatting in TransactionRequest Display ([#8786](https://github.com/paritytech/parity/pull/8786)) -- Conditionally compile ethcore public test helpers ([#8743](https://github.com/paritytech/parity/pull/8743)) -- Remove Result wrapper from AccountProvider in RPC impls ([#8763](https://github.com/paritytech/parity/pull/8763)) -- Update `license header` and `scripts` ([#8666](https://github.com/paritytech/parity/pull/8666)) -- Remove HostTrait altogether ([#8681](https://github.com/paritytech/parity/pull/8681)) -- Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity/pull/8710)) -- Remove public node settings from cli ([#8758](https://github.com/paritytech/parity/pull/8758)) -- Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity/pull/8744)) -- Ci: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity/pull/8745)) -- Remove NetworkService::config() ([#8653](https://github.com/paritytech/parity/pull/8653)) -- Fix XOR distance calculation in discovery Kademlia impl ([#8589](https://github.com/paritytech/parity/pull/8589)) -- Print warnings when fetching pending blocks ([#8711](https://github.com/paritytech/parity/pull/8711)) -- Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity/pull/8656)) -- Remove -k/--insecure option from curl installer ([#8719](https://github.com/paritytech/parity/pull/8719)) -- Ease tiny-keccak version requirements (1.4.1 -> 1.4) ([#8726](https://github.com/paritytech/parity/pull/8726)) -- Bump tinykeccak to 1.4 ([#8728](https://github.com/paritytech/parity/pull/8728)) -- Remove a couple of unnecessary `transmute()` ([#8736](https://github.com/paritytech/parity/pull/8736)) -- Fix some nits using clippy ([#8731](https://github.com/paritytech/parity/pull/8731)) -- Add 'interface' option to cli ([#8699](https://github.com/paritytech/parity/pull/8699)) -- Remove unused function new_pow_test_spec ([#8735](https://github.com/paritytech/parity/pull/8735)) -- Add a deadlock detection thread ([#8727](https://github.com/paritytech/parity/pull/8727)) -- Fix local transactions policy. ([#8691](https://github.com/paritytech/parity/pull/8691)) -- Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity/pull/8658)) -- Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity/pull/8686)) -- Fix compilation error on nightly rust ([#8707](https://github.com/paritytech/parity/pull/8707)) -- Add a test for decoding corrupt data ([#8713](https://github.com/paritytech/parity/pull/8713)) -- Update dev chain ([#8717](https://github.com/paritytech/parity/pull/8717)) -- Remove unused imports ([#8722](https://github.com/paritytech/parity/pull/8722)) -- Implement recursive Debug for Nodes in patrica_trie::TrieDB ([#8697](https://github.com/paritytech/parity/pull/8697)) -- Parity: trim whitespace when parsing duration strings ([#8692](https://github.com/paritytech/parity/pull/8692)) -- Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity/pull/8683)) -- Remove empty file ([#8705](https://github.com/paritytech/parity/pull/8705)) -- Update mod.rs ([#8695](https://github.com/paritytech/parity/pull/8695)) -- Use impl Future in the light client RPC helpers ([#8628](https://github.com/paritytech/parity/pull/8628)) -- Fix cli signer ([#8682](https://github.com/paritytech/parity/pull/8682)) -- Allow making direct RPC queries from the C API ([#8588](https://github.com/paritytech/parity/pull/8588)) -- Remove the error when stopping the network ([#8671](https://github.com/paritytech/parity/pull/8671)) -- Move connection_filter to the network crate ([#8674](https://github.com/paritytech/parity/pull/8674)) -- Remove HostInfo::client_version() and secret() ([#8677](https://github.com/paritytech/parity/pull/8677)) -- Refactor EIP150, EIP160 and EIP161 forks to be specified in CommonParams ([#8614](https://github.com/paritytech/parity/pull/8614)) -- Parity: improve cli help and logging ([#8665](https://github.com/paritytech/parity/pull/8665)) -- Updated tiny-keccak to 1.4.2 ([#8669](https://github.com/paritytech/parity/pull/8669)) -- Remove the Keccak C library and use the pure Rust impl ([#8657](https://github.com/paritytech/parity/pull/8657)) -- Remove HostInfo::next_nonce ([#8644](https://github.com/paritytech/parity/pull/8644)) -- Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity/pull/8642)) -- Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544)) -- Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity/pull/8641)) -- Changelog for 1.10.4-stable and 1.11.1-beta ([#8637](https://github.com/paritytech/parity/pull/8637)) -- Typo ([#8640](https://github.com/paritytech/parity/pull/8640)) -- Fork choice and metadata framework for Engine ([#8401](https://github.com/paritytech/parity/pull/8401)) -- Check that the Android build doesn't dep on c++_shared ([#8538](https://github.com/paritytech/parity/pull/8538)) -- Remove NetworkContext::io_channel() ([#8625](https://github.com/paritytech/parity/pull/8625)) -- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) -- Store morden db and keys in "path/to/parity/data/Morden" (ropsten uses "test", like before) ([#8621](https://github.com/paritytech/parity/pull/8621)) -- ´main.rs´ typo ([#8629](https://github.com/paritytech/parity/pull/8629)) -- Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity/pull/8611)) -- Gitlab test script fixes ([#8573](https://github.com/paritytech/parity/pull/8573)) -- Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity/pull/8595)) -- Fix account list double 0x display ([#8596](https://github.com/paritytech/parity/pull/8596)) -- Typo: wrong indentation in kovan config ([#8610](https://github.com/paritytech/parity/pull/8610)) -- Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity/pull/8555)) -- Use full qualified syntax for itertools::Itertools::flatten ([#8606](https://github.com/paritytech/parity/pull/8606)) -- 2 tiny modification on snapshot ([#8601](https://github.com/paritytech/parity/pull/8601)) -- Fix the mio test again ([#8602](https://github.com/paritytech/parity/pull/8602)) -- Remove inject.js server-side injection for dapps ([#8539](https://github.com/paritytech/parity/pull/8539)) -- Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity/pull/8581)) -- Block::decode() returns Result ([#8586](https://github.com/paritytech/parity/pull/8586)) -- Fix compiler warning ([#8590](https://github.com/paritytech/parity/pull/8590)) -- Fix Parity UI link ([#8600](https://github.com/paritytech/parity/pull/8600)) -- Make mio optional in ethcore-io ([#8537](https://github.com/paritytech/parity/pull/8537)) -- Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity/pull/8584)) -- Changelog and Readme ([#8591](https://github.com/paritytech/parity/pull/8591)) -- Added Dockerfile for alpine linux by @andresilva, closes [#3565](https://github.com/paritytech/parity/issues/3565) ([#8587](https://github.com/paritytech/parity/pull/8587)) -- Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity/pull/8578)) -- Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity/pull/8579)) -- Changelog nit ([#8585](https://github.com/paritytech/parity/pull/8585)) -- Remove unnecessary cloning in overwrite_with ([#8580](https://github.com/paritytech/parity/pull/8580)) -- Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity/pull/8545)) -- Update CHANGELOG for 1.9, 1.10, and 1.11 ([#8556](https://github.com/paritytech/parity/pull/8556)) -- Decoding headers can fail ([#8570](https://github.com/paritytech/parity/pull/8570)) -- Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity/pull/8543)) -- Remove State::replace_backend ([#8569](https://github.com/paritytech/parity/pull/8569)) -- Make trace-time publishable. ([#8568](https://github.com/paritytech/parity/pull/8568)) -- Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity/pull/8530)) -- Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity/pull/8486)) -- Parity as a library ([#8412](https://github.com/paritytech/parity/pull/8412)) -- Rlp decode returns Result ([#8527](https://github.com/paritytech/parity/pull/8527)) -- Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity/pull/8541)) -- Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity/pull/8524)) -- Ethcore, rpc, machine: refactor block reward application and tracing ([#8490](https://github.com/paritytech/parity/pull/8490)) -- Consolidate crypto functionality in `ethcore-crypto`. ([#8432](https://github.com/paritytech/parity/pull/8432)) -- Eip 145: Bitwise shifting instructions in EVM ([#8451](https://github.com/paritytech/parity/pull/8451)) -- Remove expect ([#8536](https://github.com/paritytech/parity/pull/8536)) -- Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity/pull/8522)) -- Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity/pull/8491)) -- Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity/pull/8463)) -- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity/pull/8470)) -- More changes for Android ([#8421](https://github.com/paritytech/parity/pull/8421)) -- Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity/pull/8520)) -- Secretstore: merge two types of errors into single one + Error::is_non_fatal ([#8357](https://github.com/paritytech/parity/pull/8357)) -- Hardware Wallet trait ([#8071](https://github.com/paritytech/parity/pull/8071)) -- Directly return None if tracing is disabled ([#8504](https://github.com/paritytech/parity/pull/8504)) -- Show imported messages for light client ([#8517](https://github.com/paritytech/parity/pull/8517)) -- Remove unused dependency `bigint` ([#8505](https://github.com/paritytech/parity/pull/8505)) -- `duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity/pull/8457)) -- Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity/pull/8473)) -- Remove three old warp boot nodes. ([#8497](https://github.com/paritytech/parity/pull/8497)) -- Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity/pull/8493)) -- Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity/pull/8489)) -- Fix snap builds ([#8483](https://github.com/paritytech/parity/pull/8483)) -- Bump master to 1.12 ([#8477](https://github.com/paritytech/parity/pull/8477)) -- Don't require write lock when fetching status. ([#8481](https://github.com/paritytech/parity/pull/8481)) -- Use rename_all for RichBlock and RichHeader serialization ([#8471](https://github.com/paritytech/parity/pull/8471)) + - Update snapcraft.yaml ([#9132](https://github.com/paritytech/parity-ethereum/pull/9132)) +- Parity Ethereum 2.0.0 ([#9052](https://github.com/paritytech/parity-ethereum/pull/9052)) +- Don't fetch snapshot chunks at random ([#9088](https://github.com/paritytech/parity-ethereum/pull/9088)) +- Remove the dapps system ([#9017](https://github.com/paritytech/parity-ethereum/pull/9017)) +- Fix nightly warnings ([#9080](https://github.com/paritytech/parity-ethereum/pull/9080)) +- Db: remove wal disabling / fast-and-loose option. ([#8963](https://github.com/paritytech/parity-ethereum/pull/8963)) +- Transactions hashes missing in trace_replayBlockTransactions method result [#8725](https://github.com/paritytech/parity-ethereum/issues/8725) ([#8883](https://github.com/paritytech/parity-ethereum/pull/8883)) +- Delete crates from parity-ethereum and fetch them from parity-common instead ([#9083](https://github.com/paritytech/parity-ethereum/pull/9083)) +- Updater verification ([#8787](https://github.com/paritytech/parity-ethereum/pull/8787)) +- Phrasing, precisions and typos in CLI help ([#9060](https://github.com/paritytech/parity-ethereum/pull/9060)) +- Some work towards iOS build ([#9045](https://github.com/paritytech/parity-ethereum/pull/9045)) +- Clean up deprecated options and add CHECK macro ([#9036](https://github.com/paritytech/parity-ethereum/pull/9036)) +- Replace `std::env::home_dir` with `dirs::home_dir` ([#9077](https://github.com/paritytech/parity-ethereum/pull/9077)) +- Fix warning in secret-store test ([#9074](https://github.com/paritytech/parity-ethereum/pull/9074)) +- Seedhashcompute remove needless `new` impl ([#9063](https://github.com/paritytech/parity-ethereum/pull/9063)) +- Remove trait bounds from several structs ([#9055](https://github.com/paritytech/parity-ethereum/pull/9055)) +- Docs: add changelog for 1.10.9 stable and 1.11.6 beta ([#9069](https://github.com/paritytech/parity-ethereum/pull/9069)) +- Enable test in `miner/pool/test` ([#9072](https://github.com/paritytech/parity-ethereum/pull/9072)) +- Fetch: replace futures-timer with tokio-timer ([#9066](https://github.com/paritytech/parity-ethereum/pull/9066)) +- Remove util-error ([#9054](https://github.com/paritytech/parity-ethereum/pull/9054)) +- Fixes for misbehavior reporting in AuthorityRound ([#8998](https://github.com/paritytech/parity-ethereum/pull/8998)) +- A last bunch of txqueue performance optimizations ([#9024](https://github.com/paritytech/parity-ethereum/pull/9024)) +- Reduce number of constraints for triedb types ([#9043](https://github.com/paritytech/parity-ethereum/pull/9043)) +- Bump fs-swap to 0.2.3 so it is compatible with osx 10.11 again ([#9050](https://github.com/paritytech/parity-ethereum/pull/9050)) +- Recursive test ([#9042](https://github.com/paritytech/parity-ethereum/pull/9042)) +- Introduce more optional features in ethcore ([#9020](https://github.com/paritytech/parity-ethereum/pull/9020)) +- Update ETSC bootnodes ([#9038](https://github.com/paritytech/parity-ethereum/pull/9038)) +- Optimize pending transactions filter ([#9026](https://github.com/paritytech/parity-ethereum/pull/9026)) +- Eip160/eip161 spec: u64 -> BlockNumber ([#9044](https://github.com/paritytech/parity-ethereum/pull/9044)) +- Move the C/C++ example to another directory ([#9032](https://github.com/paritytech/parity-ethereum/pull/9032)) +- Bump parking_lot to 0.6 ([#9013](https://github.com/paritytech/parity-ethereum/pull/9013)) +- Never drop local transactions from different senders. ([#9002](https://github.com/paritytech/parity-ethereum/pull/9002)) +- Precise HTTP or WebSockets for JSON-RPC options ([#9027](https://github.com/paritytech/parity-ethereum/pull/9027)) +- Recently rejected cache for transaction queue ([#9005](https://github.com/paritytech/parity-ethereum/pull/9005)) +- Make HashDB generic ([#8739](https://github.com/paritytech/parity-ethereum/pull/8739)) +- Only return error log for rustls ([#9025](https://github.com/paritytech/parity-ethereum/pull/9025)) +- Update Changelogs for 1.10.8 and 1.11.5 ([#9012](https://github.com/paritytech/parity-ethereum/pull/9012)) +- Attempt to graceful shutdown in case of panics ([#8999](https://github.com/paritytech/parity-ethereum/pull/8999)) +- Simplify kvdb error types ([#8924](https://github.com/paritytech/parity-ethereum/pull/8924)) +- Add option for user to set max size limit for RPC requests ([#9010](https://github.com/paritytech/parity-ethereum/pull/9010)) +- Bump ntp to 0.5.0 ([#9009](https://github.com/paritytech/parity-ethereum/pull/9009)) +- Removed duplicate dependency ([#9021](https://github.com/paritytech/parity-ethereum/pull/9021)) +- Minimal effective gas price in the queue ([#8934](https://github.com/paritytech/parity-ethereum/pull/8934)) +- Parity: fix db path when migrating to blooms db ([#8975](https://github.com/paritytech/parity-ethereum/pull/8975)) +- Preserve the current abort behavior ([#8995](https://github.com/paritytech/parity-ethereum/pull/8995)) +- Improve should_replace on NonceAndGasPrice ([#8980](https://github.com/paritytech/parity-ethereum/pull/8980)) +- Tentative fix for missing dependency error ([#8973](https://github.com/paritytech/parity-ethereum/pull/8973)) +- Refactor evm Instruction to be a c-like enum ([#8914](https://github.com/paritytech/parity-ethereum/pull/8914)) +- Fix deadlock in blockchain. ([#8977](https://github.com/paritytech/parity-ethereum/pull/8977)) +- Snap: downgrade rust to revision 1.26.2, ref snapcraft/+bug/1778530 ([#8984](https://github.com/paritytech/parity-ethereum/pull/8984)) +- Use local parity-dapps-glue instead of crate published at crates.io ([#8983](https://github.com/paritytech/parity-ethereum/pull/8983)) +- Parity: omit redundant last imported block number in light sync informant ([#8962](https://github.com/paritytech/parity-ethereum/pull/8962)) +- Disable hardware-wallets on platforms that don't support `libusb` ([#8464](https://github.com/paritytech/parity-ethereum/pull/8464)) +- Bump error-chain and quick_error versions ([#8972](https://github.com/paritytech/parity-ethereum/pull/8972)) +- Evm benchmark utilities ([#8944](https://github.com/paritytech/parity-ethereum/pull/8944)) +- Parity: hide legacy options from cli --help ([#8967](https://github.com/paritytech/parity-ethereum/pull/8967)) +- Scripts: fix docker build tag on latest using master ([#8952](https://github.com/paritytech/parity-ethereum/pull/8952)) +- Add type for passwords. ([#8920](https://github.com/paritytech/parity-ethereum/pull/8920)) +- Deps: bump fs-swap ([#8953](https://github.com/paritytech/parity-ethereum/pull/8953)) +- Eliminate some more `transmute()` ([#8879](https://github.com/paritytech/parity-ethereum/pull/8879)) +- Restrict vault.json permssion to owner and using random suffix for temp vault.json file ([#8932](https://github.com/paritytech/parity-ethereum/pull/8932)) +- Print SS.self_public when starting SS node ([#8949](https://github.com/paritytech/parity-ethereum/pull/8949)) +- Scripts: minor improvements ([#8930](https://github.com/paritytech/parity-ethereum/pull/8930)) +- Rpc: cap gas limit of local calls ([#8943](https://github.com/paritytech/parity-ethereum/pull/8943)) +- Docs: update changelogs ([#8931](https://github.com/paritytech/parity-ethereum/pull/8931)) +- Ethcore: fix compilation when using slow-blocks or evm-debug features ([#8936](https://github.com/paritytech/parity-ethereum/pull/8936)) +- Fixed blooms dir creation ([#8941](https://github.com/paritytech/parity-ethereum/pull/8941)) +- Update hardcoded headers ([#8925](https://github.com/paritytech/parity-ethereum/pull/8925)) +- New blooms database ([#8712](https://github.com/paritytech/parity-ethereum/pull/8712)) +- Ethstore: retry deduplication of wallet file names until success ([#8910](https://github.com/paritytech/parity-ethereum/pull/8910)) +- Update ropsten.json ([#8926](https://github.com/paritytech/parity-ethereum/pull/8926)) +- Include node identity in the P2P advertised client version. ([#8830](https://github.com/paritytech/parity-ethereum/pull/8830)) +- Allow disabling local-by-default for transactions with new config entry ([#8882](https://github.com/paritytech/parity-ethereum/pull/8882)) +- Allow Poll Lifetime to be configured via CLI ([#8885](https://github.com/paritytech/parity-ethereum/pull/8885)) +- Cleanup nibbleslice ([#8915](https://github.com/paritytech/parity-ethereum/pull/8915)) +- Hardware-wallets `Clean up things I missed in the latest PR` ([#8890](https://github.com/paritytech/parity-ethereum/pull/8890)) +- Remove debian/.deb and centos/.rpm packaging scripts ([#8887](https://github.com/paritytech/parity-ethereum/pull/8887)) +- Remove a weird emoji in new_social docs ([#8913](https://github.com/paritytech/parity-ethereum/pull/8913)) +- Minor fix in chain supplier and light provider ([#8906](https://github.com/paritytech/parity-ethereum/pull/8906)) +- Block 0 is valid in queries ([#8891](https://github.com/paritytech/parity-ethereum/pull/8891)) +- Fixed osx permissions ([#8901](https://github.com/paritytech/parity-ethereum/pull/8901)) +- Atomic create new files with permissions to owner in ethstore ([#8896](https://github.com/paritytech/parity-ethereum/pull/8896)) +- Add ETC Cooperative-run load balanced parity node ([#8892](https://github.com/paritytech/parity-ethereum/pull/8892)) +- Add support for --chain tobalaba ([#8870](https://github.com/paritytech/parity-ethereum/pull/8870)) +- Fix some warns on nightly ([#8889](https://github.com/paritytech/parity-ethereum/pull/8889)) +- Add new ovh bootnodes and fix port for foundation bootnode 3.2 ([#8886](https://github.com/paritytech/parity-ethereum/pull/8886)) +- Secretstore: service pack 1 ([#8435](https://github.com/paritytech/parity-ethereum/pull/8435)) +- Handle removed logs in filter changes and add geth compatibility field ([#8796](https://github.com/paritytech/parity-ethereum/pull/8796)) +- Fixed ipc leak, closes [#8774](https://github.com/paritytech/parity-ethereum/issues/8774) ([#8876](https://github.com/paritytech/parity-ethereum/pull/8876)) +- Scripts: remove md5 checksums ([#8884](https://github.com/paritytech/parity-ethereum/pull/8884)) +- Hardware_wallet/Ledger `Sign messages` + some refactoring ([#8868](https://github.com/paritytech/parity-ethereum/pull/8868)) +- Check whether we need resealing in miner and unwrap has_account in account_provider ([#8853](https://github.com/paritytech/parity-ethereum/pull/8853)) +- Docker: Fix alpine build ([#8878](https://github.com/paritytech/parity-ethereum/pull/8878)) +- Remove mac os installers etc ([#8875](https://github.com/paritytech/parity-ethereum/pull/8875)) +- Readme.md: update the list of dependencies ([#8864](https://github.com/paritytech/parity-ethereum/pull/8864)) +- Fix concurrent access to signer queue ([#8854](https://github.com/paritytech/parity-ethereum/pull/8854)) +- Tx permission contract improvement ([#8400](https://github.com/paritytech/parity-ethereum/pull/8400)) +- Limit the number of transactions in pending set ([#8777](https://github.com/paritytech/parity-ethereum/pull/8777)) +- Use sealing.enabled to emit eth_mining information ([#8844](https://github.com/paritytech/parity-ethereum/pull/8844)) +- Don't allocate in expect_valid_rlp unless necessary ([#8867](https://github.com/paritytech/parity-ethereum/pull/8867)) +- Fix Cli Return Code on --help for ethkey, ethstore & whisper ([#8863](https://github.com/paritytech/parity-ethereum/pull/8863)) +- Fix subcrate test compile ([#8862](https://github.com/paritytech/parity-ethereum/pull/8862)) +- Network-devp2p: downgrade logging to debug, add target ([#8784](https://github.com/paritytech/parity-ethereum/pull/8784)) +- Clearing up a comment about the prefix for signing ([#8828](https://github.com/paritytech/parity-ethereum/pull/8828)) +- Disable parallel verification and skip verifiying already imported txs. ([#8834](https://github.com/paritytech/parity-ethereum/pull/8834)) +- Devp2p: Move UDP socket handling from Discovery to Host. ([#8790](https://github.com/paritytech/parity-ethereum/pull/8790)) +- Fixed AuthorityRound deadlock on shutdown, closes [#8088](https://github.com/paritytech/parity-ethereum/issues/8088) ([#8803](https://github.com/paritytech/parity-ethereum/pull/8803)) +- Specify critical release flag per network ([#8821](https://github.com/paritytech/parity-ethereum/pull/8821)) +- Fix `deadlock_detection` feature branch compilation ([#8824](https://github.com/paritytech/parity-ethereum/pull/8824)) +- Use system allocator when profiling memory ([#8831](https://github.com/paritytech/parity-ethereum/pull/8831)) +- Added from and to to Receipt ([#8756](https://github.com/paritytech/parity-ethereum/pull/8756)) +- Ethcore: fix ancient block error msg handling ([#8832](https://github.com/paritytech/parity-ethereum/pull/8832)) +- Ci: Fix docker tags ([#8822](https://github.com/paritytech/parity-ethereum/pull/8822)) +- Parity: fix indentation in sync logging ([#8794](https://github.com/paritytech/parity-ethereum/pull/8794)) +- Removed obsolete IpcMode enum ([#8819](https://github.com/paritytech/parity-ethereum/pull/8819)) +- Remove UI related settings from CLI ([#8783](https://github.com/paritytech/parity-ethereum/pull/8783)) +- Remove windows tray and installer ([#8778](https://github.com/paritytech/parity-ethereum/pull/8778)) +- Docs: add changelogs for 1.10.6 and 1.11.3 ([#8810](https://github.com/paritytech/parity-ethereum/pull/8810)) +- Fix ancient blocks queue deadlock ([#8751](https://github.com/paritytech/parity-ethereum/pull/8751)) +- Disallow unsigned transactions in case EIP-86 is disabled ([#8802](https://github.com/paritytech/parity-ethereum/pull/8802)) +- Fix evmbin compilation ([#8795](https://github.com/paritytech/parity-ethereum/pull/8795)) +- Have space between feature cfg flag ([#8791](https://github.com/paritytech/parity-ethereum/pull/8791)) +- Rpc: fix address formatting in TransactionRequest Display ([#8786](https://github.com/paritytech/parity-ethereum/pull/8786)) +- Conditionally compile ethcore public test helpers ([#8743](https://github.com/paritytech/parity-ethereum/pull/8743)) +- Remove Result wrapper from AccountProvider in RPC impls ([#8763](https://github.com/paritytech/parity-ethereum/pull/8763)) +- Update `license header` and `scripts` ([#8666](https://github.com/paritytech/parity-ethereum/pull/8666)) +- Remove HostTrait altogether ([#8681](https://github.com/paritytech/parity-ethereum/pull/8681)) +- Ethcore-sync: fix connection to peers behind chain fork block ([#8710](https://github.com/paritytech/parity-ethereum/pull/8710)) +- Remove public node settings from cli ([#8758](https://github.com/paritytech/parity-ethereum/pull/8758)) +- Custom Error Messages on ENFILE and EMFILE IO Errors ([#8744](https://github.com/paritytech/parity-ethereum/pull/8744)) +- Ci: Fixes for Android Pipeline ([#8745](https://github.com/paritytech/parity-ethereum/pull/8745)) +- Remove NetworkService::config() ([#8653](https://github.com/paritytech/parity-ethereum/pull/8653)) +- Fix XOR distance calculation in discovery Kademlia impl ([#8589](https://github.com/paritytech/parity-ethereum/pull/8589)) +- Print warnings when fetching pending blocks ([#8711](https://github.com/paritytech/parity-ethereum/pull/8711)) +- Fix PoW blockchains sealing notifications in chain_new_blocks ([#8656](https://github.com/paritytech/parity-ethereum/pull/8656)) +- Remove -k/--insecure option from curl installer ([#8719](https://github.com/paritytech/parity-ethereum/pull/8719)) +- Ease tiny-keccak version requirements (1.4.1 -> 1.4) ([#8726](https://github.com/paritytech/parity-ethereum/pull/8726)) +- Bump tinykeccak to 1.4 ([#8728](https://github.com/paritytech/parity-ethereum/pull/8728)) +- Remove a couple of unnecessary `transmute()` ([#8736](https://github.com/paritytech/parity-ethereum/pull/8736)) +- Fix some nits using clippy ([#8731](https://github.com/paritytech/parity-ethereum/pull/8731)) +- Add 'interface' option to cli ([#8699](https://github.com/paritytech/parity-ethereum/pull/8699)) +- Remove unused function new_pow_test_spec ([#8735](https://github.com/paritytech/parity-ethereum/pull/8735)) +- Add a deadlock detection thread ([#8727](https://github.com/paritytech/parity-ethereum/pull/8727)) +- Fix local transactions policy. ([#8691](https://github.com/paritytech/parity-ethereum/pull/8691)) +- Shutdown the Snapshot Service early ([#8658](https://github.com/paritytech/parity-ethereum/pull/8658)) +- Network-devp2p: handle UselessPeer disconnect ([#8686](https://github.com/paritytech/parity-ethereum/pull/8686)) +- Fix compilation error on nightly rust ([#8707](https://github.com/paritytech/parity-ethereum/pull/8707)) +- Add a test for decoding corrupt data ([#8713](https://github.com/paritytech/parity-ethereum/pull/8713)) +- Update dev chain ([#8717](https://github.com/paritytech/parity-ethereum/pull/8717)) +- Remove unused imports ([#8722](https://github.com/paritytech/parity-ethereum/pull/8722)) +- Implement recursive Debug for Nodes in patrica_trie::TrieDB ([#8697](https://github.com/paritytech/parity-ethereum/pull/8697)) +- Parity: trim whitespace when parsing duration strings ([#8692](https://github.com/paritytech/parity-ethereum/pull/8692)) +- Set the request index to that of the current request ([#8683](https://github.com/paritytech/parity-ethereum/pull/8683)) +- Remove empty file ([#8705](https://github.com/paritytech/parity-ethereum/pull/8705)) +- Update mod.rs ([#8695](https://github.com/paritytech/parity-ethereum/pull/8695)) +- Use impl Future in the light client RPC helpers ([#8628](https://github.com/paritytech/parity-ethereum/pull/8628)) +- Fix cli signer ([#8682](https://github.com/paritytech/parity-ethereum/pull/8682)) +- Allow making direct RPC queries from the C API ([#8588](https://github.com/paritytech/parity-ethereum/pull/8588)) +- Remove the error when stopping the network ([#8671](https://github.com/paritytech/parity-ethereum/pull/8671)) +- Move connection_filter to the network crate ([#8674](https://github.com/paritytech/parity-ethereum/pull/8674)) +- Remove HostInfo::client_version() and secret() ([#8677](https://github.com/paritytech/parity-ethereum/pull/8677)) +- Refactor EIP150, EIP160 and EIP161 forks to be specified in CommonParams ([#8614](https://github.com/paritytech/parity-ethereum/pull/8614)) +- Parity: improve cli help and logging ([#8665](https://github.com/paritytech/parity-ethereum/pull/8665)) +- Updated tiny-keccak to 1.4.2 ([#8669](https://github.com/paritytech/parity-ethereum/pull/8669)) +- Remove the Keccak C library and use the pure Rust impl ([#8657](https://github.com/paritytech/parity-ethereum/pull/8657)) +- Remove HostInfo::next_nonce ([#8644](https://github.com/paritytech/parity-ethereum/pull/8644)) +- Fix not downloading old blocks ([#8642](https://github.com/paritytech/parity-ethereum/pull/8642)) +- Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity-ethereum/pull/8544)) +- Don't open Browser post-install on Mac ([#8641](https://github.com/paritytech/parity-ethereum/pull/8641)) +- Changelog for 1.10.4-stable and 1.11.1-beta ([#8637](https://github.com/paritytech/parity-ethereum/pull/8637)) +- Typo ([#8640](https://github.com/paritytech/parity-ethereum/pull/8640)) +- Fork choice and metadata framework for Engine ([#8401](https://github.com/paritytech/parity-ethereum/pull/8401)) +- Check that the Android build doesn't dep on c++_shared ([#8538](https://github.com/paritytech/parity-ethereum/pull/8538)) +- Remove NetworkContext::io_channel() ([#8625](https://github.com/paritytech/parity-ethereum/pull/8625)) +- Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity-ethereum/pull/8528)) +- Store morden db and keys in "path/to/parity/data/Morden" (ropsten uses "test", like before) ([#8621](https://github.com/paritytech/parity-ethereum/pull/8621)) +- ´main.rs´ typo ([#8629](https://github.com/paritytech/parity-ethereum/pull/8629)) +- Fix BlockReward contract "arithmetic operation overflow" ([#8611](https://github.com/paritytech/parity-ethereum/pull/8611)) +- Gitlab test script fixes ([#8573](https://github.com/paritytech/parity-ethereum/pull/8573)) +- Remove manually added text to the errors ([#8595](https://github.com/paritytech/parity-ethereum/pull/8595)) +- Fix account list double 0x display ([#8596](https://github.com/paritytech/parity-ethereum/pull/8596)) +- Typo: wrong indentation in kovan config ([#8610](https://github.com/paritytech/parity-ethereum/pull/8610)) +- Fix packet count when talking with PAR2 peers ([#8555](https://github.com/paritytech/parity-ethereum/pull/8555)) +- Use full qualified syntax for itertools::Itertools::flatten ([#8606](https://github.com/paritytech/parity-ethereum/pull/8606)) +- 2 tiny modification on snapshot ([#8601](https://github.com/paritytech/parity-ethereum/pull/8601)) +- Fix the mio test again ([#8602](https://github.com/paritytech/parity-ethereum/pull/8602)) +- Remove inject.js server-side injection for dapps ([#8539](https://github.com/paritytech/parity-ethereum/pull/8539)) +- Block_header can fail so return Result ([#8581](https://github.com/paritytech/parity-ethereum/pull/8581)) +- Block::decode() returns Result ([#8586](https://github.com/paritytech/parity-ethereum/pull/8586)) +- Fix compiler warning ([#8590](https://github.com/paritytech/parity-ethereum/pull/8590)) +- Fix Parity UI link ([#8600](https://github.com/paritytech/parity-ethereum/pull/8600)) +- Make mio optional in ethcore-io ([#8537](https://github.com/paritytech/parity-ethereum/pull/8537)) +- Attempt to fix intermittent test failures ([#8584](https://github.com/paritytech/parity-ethereum/pull/8584)) +- Changelog and Readme ([#8591](https://github.com/paritytech/parity-ethereum/pull/8591)) +- Added Dockerfile for alpine linux by @andresilva, closes [#3565](https://github.com/paritytech/parity-ethereum/issues/3565) ([#8587](https://github.com/paritytech/parity-ethereum/pull/8587)) +- Add whisper CLI to the pipelines ([#8578](https://github.com/paritytech/parity-ethereum/pull/8578)) +- Rename `whisper-cli binary` to `whisper` ([#8579](https://github.com/paritytech/parity-ethereum/pull/8579)) +- Changelog nit ([#8585](https://github.com/paritytech/parity-ethereum/pull/8585)) +- Remove unnecessary cloning in overwrite_with ([#8580](https://github.com/paritytech/parity-ethereum/pull/8580)) +- Handle socket address parsing errors ([#8545](https://github.com/paritytech/parity-ethereum/pull/8545)) +- Update CHANGELOG for 1.9, 1.10, and 1.11 ([#8556](https://github.com/paritytech/parity-ethereum/pull/8556)) +- Decoding headers can fail ([#8570](https://github.com/paritytech/parity-ethereum/pull/8570)) +- Refactoring `ethcore-sync` - Fixing warp-sync barrier ([#8543](https://github.com/paritytech/parity-ethereum/pull/8543)) +- Remove State::replace_backend ([#8569](https://github.com/paritytech/parity-ethereum/pull/8569)) +- Make trace-time publishable. ([#8568](https://github.com/paritytech/parity-ethereum/pull/8568)) +- Don't block sync when importing old blocks ([#8530](https://github.com/paritytech/parity-ethereum/pull/8530)) +- Trace precompiled contracts when the transfer value is not zero ([#8486](https://github.com/paritytech/parity-ethereum/pull/8486)) +- Parity as a library ([#8412](https://github.com/paritytech/parity-ethereum/pull/8412)) +- Rlp decode returns Result ([#8527](https://github.com/paritytech/parity-ethereum/pull/8527)) +- Node table sorting according to last contact data ([#8541](https://github.com/paritytech/parity-ethereum/pull/8541)) +- Keep all enacted blocks notify in order ([#8524](https://github.com/paritytech/parity-ethereum/pull/8524)) +- Ethcore, rpc, machine: refactor block reward application and tracing ([#8490](https://github.com/paritytech/parity-ethereum/pull/8490)) +- Consolidate crypto functionality in `ethcore-crypto`. ([#8432](https://github.com/paritytech/parity-ethereum/pull/8432)) +- Eip 145: Bitwise shifting instructions in EVM ([#8451](https://github.com/paritytech/parity-ethereum/pull/8451)) +- Remove expect ([#8536](https://github.com/paritytech/parity-ethereum/pull/8536)) +- Don't panic in import_block if invalid rlp ([#8522](https://github.com/paritytech/parity-ethereum/pull/8522)) +- Pass on storage keys tracing to handle the case when it is not modified ([#8491](https://github.com/paritytech/parity-ethereum/pull/8491)) +- Fetching logs by hash in blockchain database ([#8463](https://github.com/paritytech/parity-ethereum/pull/8463)) +- Transaction Pool improvements ([#8470](https://github.com/paritytech/parity-ethereum/pull/8470)) +- More changes for Android ([#8421](https://github.com/paritytech/parity-ethereum/pull/8421)) +- Enable WebAssembly and Byzantium for Ellaism ([#8520](https://github.com/paritytech/parity-ethereum/pull/8520)) +- Secretstore: merge two types of errors into single one + Error::is_non_fatal ([#8357](https://github.com/paritytech/parity-ethereum/pull/8357)) +- Hardware Wallet trait ([#8071](https://github.com/paritytech/parity-ethereum/pull/8071)) +- Directly return None if tracing is disabled ([#8504](https://github.com/paritytech/parity-ethereum/pull/8504)) +- Show imported messages for light client ([#8517](https://github.com/paritytech/parity-ethereum/pull/8517)) +- Remove unused dependency `bigint` ([#8505](https://github.com/paritytech/parity-ethereum/pull/8505)) +- `duration_ns: u64 -> duration: Duration` ([#8457](https://github.com/paritytech/parity-ethereum/pull/8457)) +- Return error if RLP size of transaction exceeds the limit ([#8473](https://github.com/paritytech/parity-ethereum/pull/8473)) +- Remove three old warp boot nodes. ([#8497](https://github.com/paritytech/parity-ethereum/pull/8497)) +- Update wasmi and pwasm-utils ([#8493](https://github.com/paritytech/parity-ethereum/pull/8493)) +- Update hardcodedSync for Ethereum, Kovan, and Ropsten ([#8489](https://github.com/paritytech/parity-ethereum/pull/8489)) +- Fix snap builds ([#8483](https://github.com/paritytech/parity-ethereum/pull/8483)) +- Bump master to 1.12 ([#8477](https://github.com/paritytech/parity-ethereum/pull/8477)) +- Don't require write lock when fetching status. ([#8481](https://github.com/paritytech/parity-ethereum/pull/8481)) +- Use rename_all for RichBlock and RichHeader serialization ([#8471](https://github.com/paritytech/parity-ethereum/pull/8471)) ## Previous releases diff --git a/README.md b/README.md index 49a5f23389..2e49addc97 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Parity-Ethereum - a fast, light, and robust EVM and WASM blockchain client -### [» Download the latest release «](https://github.com/paritytech/parity/releases/latest) +### [» Download the latest release «](https://github.com/paritytech/parity-ethereum/releases/latest) [![build status](https://gitlab.parity.io/parity/parity/badges/master/build.svg)](https://gitlab.parity.io/parity/parity/commits/master) [![codecov](https://codecov.io/gh/paritytech/parity/branch/master/graph/badge.svg)](https://codecov.io/gh/paritytech/parity) @@ -31,7 +31,7 @@ By default, Parity-Ethereum will run a JSON-RPC HTTP server on `127.0.0.1:8545` If you run into problems while using Parity-Ethereum, feel free to file an issue in this repository or hop on our [Gitter](https://gitter.im/paritytech/parity) or [Riot](https://riot.im/app/#/group/+parity:matrix.parity.io) chat room to ask a question. We are glad to help! **For security-critical issues**, please refer to the security policy outlined in [SECURITY.md](SECURITY.md). -Parity-Ethereum's current beta-release is 2.0. You can download it at [the releases page](https://github.com/paritytech/parity/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions. +Parity-Ethereum's current beta-release is 2.0. You can download it at [the releases page](https://github.com/paritytech/parity-ethereum/releases) or follow the instructions below to build from source. Please, mind the [CHANGELOG.md](CHANGELOG.md) for a list of all changes between different versions. ---- @@ -96,7 +96,7 @@ sudo snap install parity --edge ```bash # download Parity-Ethereum code -$ git clone https://github.com/paritytech/parity +$ git clone https://github.com/paritytech/parity-ethereum $ cd parity # build in release mode diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index 49615850b3..e70434af4b 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -36,7 +36,7 @@ RUN apt-get update && \ # show backtraces RUST_BACKTRACE=1 && \ # build parity -cd /build&&git clone https://github.com/paritytech/parity && \ +cd /build&&git clone https://github.com/paritytech/parity-ethereum && \ cd parity && \ git pull&& \ git checkout $BUILD_TAG && \ diff --git a/ethcore/light/src/net/request_credits.rs b/ethcore/light/src/net/request_credits.rs index e97e1aad58..af507b849b 100644 --- a/ethcore/light/src/net/request_credits.rs +++ b/ethcore/light/src/net/request_credits.rs @@ -141,7 +141,7 @@ impl Encodable for CostTable { fn append_cost(s: &mut RlpStream, cost: &Option, kind: request::Kind) { if let Some(ref cost) = *cost { s.begin_list(2); - // hack around https://github.com/paritytech/parity/issues/4356 + // hack around https://github.com/paritytech/parity-ethereum/issues/4356 Encodable::rlp_append(&kind, s); s.append(cost); } diff --git a/ethcore/light/src/types/request/mod.rs b/ethcore/light/src/types/request/mod.rs index 538aa0c6bf..37341e6ffa 100644 --- a/ethcore/light/src/types/request/mod.rs +++ b/ethcore/light/src/types/request/mod.rs @@ -349,7 +349,7 @@ impl Encodable for Request { fn rlp_append(&self, s: &mut RlpStream) { s.begin_list(2); - // hack around https://github.com/paritytech/parity/issues/4356 + // hack around https://github.com/paritytech/parity-ethereum/issues/4356 Encodable::rlp_append(&self.kind(), s); match *self { @@ -596,7 +596,7 @@ impl Encodable for Response { fn rlp_append(&self, s: &mut RlpStream) { s.begin_list(2); - // hack around https://github.com/paritytech/parity/issues/4356 + // hack around https://github.com/paritytech/parity-ethereum/issues/4356 Encodable::rlp_append(&self.kind(), s); match *self { diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index b7775702fa..db0aee3bcd 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -36,7 +36,7 @@ //! curl https://sh.rustup.rs -sSf | sh //! //! # download and build parity -//! git clone https://github.com/paritytech/parity +//! git clone https://github.com/paritytech/parity-ethereum //! cd parity //! cargo build --release //! ``` @@ -49,7 +49,7 @@ //! curl https://sh.rustup.rs -sSf | sh //! //! # download and build parity -//! git clone https://github.com/paritytech/parity +//! git clone https://github.com/paritytech/parity-ethereum //! cd parity //! cargo build --release //! ``` diff --git a/ethcore/src/snapshot/mod.rs b/ethcore/src/snapshot/mod.rs index f4b9bf6997..03f2eebfbf 100644 --- a/ethcore/src/snapshot/mod.rs +++ b/ethcore/src/snapshot/mod.rs @@ -17,7 +17,7 @@ //! Snapshot creation, restoration, and network service. //! //! Documentation of the format can be found at -//! https://github.com/paritytech/parity/wiki/Warp-Sync-Snapshot-Format +//! https://wiki.parity.io/Warp-Sync-Snapshot-Format use std::collections::{HashMap, HashSet}; use std::sync::Arc; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index d88bdb8336..2b3e1e2656 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -952,7 +952,7 @@ mod tests { use views::BlockView; use tempdir::TempDir; - // https://github.com/paritytech/parity/issues/1840 + // https://github.com/paritytech/parity-ethereum/issues/1840 #[test] fn test_load_empty() { let tempdir = TempDir::new("").unwrap(); diff --git a/ethcore/types/src/blockchain_info.rs b/ethcore/types/src/blockchain_info.rs index ddd91623d1..b82582bda0 100644 --- a/ethcore/types/src/blockchain_info.rs +++ b/ethcore/types/src/blockchain_info.rs @@ -50,7 +50,7 @@ pub struct BlockChainInfo { impl BlockChainInfo { /// Determine the security model for the current state. pub fn security_level(&self) -> SecurityLevel { - // TODO: Detect SecurityLevel::FullState : https://github.com/paritytech/parity/issues/3834 + // TODO: Detect SecurityLevel::FullState : https://github.com/paritytech/parity-ethereum/issues/3834 if self.ancient_block_number.is_none() || self.first_block_number.is_none() { SecurityLevel::FullProofOfWork } else { -- GitLab From e6acbc5a5885a5a0bfc3ef91b2f3732e2e8a7d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 23 Jul 2018 14:42:08 +0100 Subject: [PATCH 164/191] rpc: fix is_major_importing sync state condition (#9112) * rpc: fix is_major_importing sync state condition * rpc: fix informant printout when waiting for peers --- parity/informant.rs | 14 +++++++------- rpc/src/lib.rs | 2 +- rpc/src/v1/helpers/block_import.rs | 13 ++++++++++--- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/parity/informant.rs b/parity/informant.rs index 6f1227592f..d3489a52f3 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -35,7 +35,7 @@ use io::{TimerToken, IoContext, IoHandler}; use light::Cache as LightDataCache; use light::client::{LightChainClient, LightChainNotify}; use number_prefix::{binary_prefix, Standalone, Prefixed}; -use parity_rpc::{is_major_importing}; +use parity_rpc::is_major_importing_or_waiting; use parity_rpc::informant::RpcStats; use ethereum_types::H256; use bytes::Bytes; @@ -128,7 +128,7 @@ impl InformantData for FullNodeInformantData { fn is_major_importing(&self) -> bool { let state = self.sync.as_ref().map(|sync| sync.status().state); - is_major_importing(state, self.client.queue_info()) + is_major_importing_or_waiting(state, self.client.queue_info(), false) } fn report(&self) -> Report { @@ -142,7 +142,8 @@ impl InformantData for FullNodeInformantData { cache_sizes.insert("queue", queue_info.mem_used); cache_sizes.insert("chain", blockchain_cache_info.total()); - let (importing, sync_info) = match (self.sync.as_ref(), self.net.as_ref()) { + let importing = self.is_major_importing(); + let sync_info = match (self.sync.as_ref(), self.net.as_ref()) { (Some(sync), Some(net)) => { let status = sync.status(); let num_peers_range = net.num_peers_range(); @@ -150,16 +151,15 @@ impl InformantData for FullNodeInformantData { cache_sizes.insert("sync", status.mem_used); - let importing = is_major_importing(Some(status.state), queue_info.clone()); - (importing, Some(SyncInfo { + Some(SyncInfo { last_imported_block_number: status.last_imported_block_number.unwrap_or(chain_info.best_block_number), last_imported_old_block_number: status.last_imported_old_block_number, num_peers: status.num_peers, max_peers: status.current_max_peers(num_peers_range.start, num_peers_range.end - 1), snapshot_sync: status.is_snapshot_syncing(), - })) + }) } - _ => (is_major_importing(self.sync.as_ref().map(|s| s.status().state), queue_info.clone()), None), + _ => None }; Report { diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index e748b840c0..96926700c0 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -118,7 +118,7 @@ pub use http::{ }; pub use v1::{NetworkSettings, Metadata, Origin, informant, dispatch, signer}; -pub use v1::block_import::is_major_importing; +pub use v1::block_import::{is_major_importing, is_major_importing_or_waiting}; pub use v1::extractors::{RpcExtractor, WsExtractor, WsStats, WsDispatcher}; pub use authcodes::{AuthCodes, TimeProvider}; pub use http_common::HttpMetaExtractor; diff --git a/rpc/src/v1/helpers/block_import.rs b/rpc/src/v1/helpers/block_import.rs index 9e947e5baa..50a4ed8e00 100644 --- a/rpc/src/v1/helpers/block_import.rs +++ b/rpc/src/v1/helpers/block_import.rs @@ -19,16 +19,23 @@ use ethcore::client::BlockQueueInfo; use sync::SyncState; -/// Check if client is during major sync or during block import. -pub fn is_major_importing(sync_state: Option, queue_info: BlockQueueInfo) -> bool { +/// Check if client is during major sync or during block import and allows defining whether 'waiting for peers' should +/// be considered a syncing state. +pub fn is_major_importing_or_waiting(sync_state: Option, queue_info: BlockQueueInfo, waiting_is_syncing_state: bool) -> bool { let is_syncing_state = sync_state.map_or(false, |s| match s { - SyncState::Idle | SyncState::NewBlocks | SyncState::WaitingPeers => false, + SyncState::Idle | SyncState::NewBlocks => false, + SyncState::WaitingPeers if !waiting_is_syncing_state => false, _ => true, }); let is_verifying = queue_info.unverified_queue_size + queue_info.verified_queue_size > 3; is_verifying || is_syncing_state } +/// Check if client is during major sync or during block import. +pub fn is_major_importing(sync_state: Option, queue_info: BlockQueueInfo) -> bool { + is_major_importing_or_waiting(sync_state, queue_info, true) +} + #[cfg(test)] mod tests { use ethcore::client::BlockQueueInfo; -- GitLab From d4f38d3894578751a827e7b78e3d4e21bcb1f064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Mon, 23 Jul 2018 14:46:24 +0100 Subject: [PATCH 165/191] ethcore: add builtin benchmarks based on geth (#9179) * ethcore: add geth benchmarks for all builtins * ethcore: remove old builtin benchmarks --- ethcore/benches/builtin.rs | 658 +++++++++++++++++++++++++++++++++++++ ethcore/benches/evm.rs | 228 ------------- 2 files changed, 658 insertions(+), 228 deletions(-) create mode 100644 ethcore/benches/builtin.rs delete mode 100644 ethcore/benches/evm.rs diff --git a/ethcore/benches/builtin.rs b/ethcore/benches/builtin.rs new file mode 100644 index 0000000000..11df5028df --- /dev/null +++ b/ethcore/benches/builtin.rs @@ -0,0 +1,658 @@ +// Copyright 2015-2018 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 . + +#![feature(test)] +extern crate test; + +#[macro_use] +extern crate lazy_static; + +extern crate ethcore; +extern crate ethereum_types; +extern crate parity_bytes as bytes; +extern crate rustc_hex; + +use std::collections::BTreeMap; + +use bytes::BytesRef; +use ethcore::builtin::Builtin; +use ethcore::machine::EthereumMachine; +use ethereum_types::{Address, U256}; +use ethcore::ethereum::new_byzantium_test_machine; +use rustc_hex::FromHex; +use self::test::Bencher; + +lazy_static! { + static ref BYZANTIUM_MACHINE: EthereumMachine = new_byzantium_test_machine(); +} + +struct BuiltinBenchmark<'a> { + builtin: &'a Builtin, + input: Vec, + expected: Vec, +} + +impl<'a> BuiltinBenchmark<'a> { + fn new(builtin_address: &'static str, input: &str, expected: &str) -> BuiltinBenchmark<'a> { + let builtins = BYZANTIUM_MACHINE.builtins(); + + let builtin = builtins.get(&builtin_address.into()).unwrap().clone(); + let input = FromHex::from_hex(input).unwrap(); + let expected = FromHex::from_hex(expected).unwrap(); + + BuiltinBenchmark { + builtin, input, expected + } + } + + fn gas_cost(&self) -> U256 { + self.builtin.cost(&self.input) + } + + fn run(&self, b: &mut Bencher) { + let mut output = vec![0; self.expected.len()]; + + b.iter(|| { + self.builtin.execute(&self.input, &mut BytesRef::Fixed(&mut output)).unwrap(); + }); + + assert_eq!(self.expected[..], output[..]); + } +} + +fn bench( + builtin_address: &'static str, + input: &str, + expected: &str, + b: &mut Bencher, +) { + let bench = BuiltinBenchmark::new(builtin_address, input, expected); + + println!("gas cost: {}", bench.gas_cost()); + bench.run(b); +} + +#[bench] +fn ecrecover(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000001", // ecrecover + "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02", + "000000000000000000000000ceaccac640adf55b2028469bd36ba501f28b699d", + b, + ); +} + +#[bench] +fn sha256(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000002", // sha256 + "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02", + "811c7003375852fabd0d362e40e68607a12bdabae61a7d068fe5fdd1dbbf2a5d", + b, + ); +} + +#[bench] +fn ripemd(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000003", // ripemd + "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02", + "0000000000000000000000009215b8d9882ff46f0dfde6684d78e831467f65e6", + b, + ); +} + +#[bench] +fn identity(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000004", // identity + "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02", + "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02", + b, + ); +} + +#[bench] +fn modexp_eip_example1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002003fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2efffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn modexp_eip_example2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2efffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", + "0000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn modexp_nagydani_1_square(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb502fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b", + "60008f1614cc01dcfb6bfb09c625cf90b47d4468db81b5f8b7a39d42f332eab9b2da8f2d95311648a8f243f4bb13cfb3d8f7f2a3c014122ebb3ed41b02783adc", + b, + ); +} + +#[bench] +fn modexp_nagydani_1_qube(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb503fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b", + "4834a46ba565db27903b1c720c9d593e84e4cbd6ad2e64b31885d944f68cd801f92225a8961c952ddf2797fa4701b330c85c4b363798100b921a1a22a46a7fec", + b, + ); +} + +#[bench] +fn modexp_nagydani_1_pow0x10001(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb5010001fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b", + "c36d804180c35d4426b57b50c5bfcca5c01856d104564cd513b461d3c8b8409128a5573e416d0ebe38f5f736766d9dc27143e4da981dfa4d67f7dc474cbee6d2", + b, + ); +} + +#[bench] +fn modexp_nagydani_2_square(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5102e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087", + "981dd99c3b113fae3e3eaa9435c0dc96779a23c12a53d1084b4f67b0b053a27560f627b873e3f16ad78f28c94f14b6392def26e4d8896c5e3c984e50fa0b3aa44f1da78b913187c6128baa9340b1e9c9a0fd02cb78885e72576da4a8f7e5a113e173a7a2889fde9d407bd9f06eb05bc8fc7b4229377a32941a02bf4edcc06d70", + b, + ); +} + + +#[bench] +fn modexp_nagydani_2_qube(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5103e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087", + "d89ceb68c32da4f6364978d62aaa40d7b09b59ec61eb3c0159c87ec3a91037f7dc6967594e530a69d049b64adfa39c8fa208ea970cfe4b7bcd359d345744405afe1cbf761647e32b3184c7fbe87cee8c6c7ff3b378faba6c68b83b6889cb40f1603ee68c56b4c03d48c595c826c041112dc941878f8c5be828154afd4a16311f", + b, + ); +} + +#[bench] +fn modexp_nagydani_2_pow0x10001(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf51010001e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087", + "ad85e8ef13fd1dd46eae44af8b91ad1ccae5b7a1c92944f92a19f21b0b658139e0cabe9c1f679507c2de354bf2c91ebd965d1e633978a830d517d2f6f8dd5fd58065d58559de7e2334a878f8ec6992d9b9e77430d4764e863d77c0f87beede8f2f7f2ab2e7222f85cc9d98b8467f4bb72e87ef2882423ebdb6daf02dddac6db2", + b, + ); +} + +#[bench] +fn modexp_nagydani_3_square(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb02d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d", + "affc7507ea6d84751ec6b3f0d7b99dbcc263f33330e450d1b3ff0bc3d0874320bf4edd57debd587306988157958cb3cfd369cc0c9c198706f635c9e0f15d047df5cb44d03e2727f26b083c4ad8485080e1293f171c1ed52aef5993a5815c35108e848c951cf1e334490b4a539a139e57b68f44fee583306f5b85ffa57206b3ee5660458858534e5386b9584af3c7f67806e84c189d695e5eb96e1272d06ec2df5dc5fabc6e94b793718c60c36be0a4d031fc84cd658aa72294b2e16fc240aef70cb9e591248e38bd49c5a554d1afa01f38dab72733092f7555334bbef6c8c430119840492380aa95fa025dcf699f0a39669d812b0c6946b6091e6e235337b6f8", + b, + ); +} + +#[bench] +fn modexp_nagydani_3_qube(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb03d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d", + "1b280ecd6a6bf906b806d527c2a831e23b238f89da48449003a88ac3ac7150d6a5e9e6b3be4054c7da11dd1e470ec29a606f5115801b5bf53bc1900271d7c3ff3cd5ed790d1c219a9800437a689f2388ba1a11d68f6a8e5b74e9a3b1fac6ee85fc6afbac599f93c391f5dc82a759e3c6c0ab45ce3f5d25d9b0c1bf94cf701ea6466fc9a478dacc5754e593172b5111eeba88557048bceae401337cd4c1182ad9f700852bc8c99933a193f0b94cf1aedbefc48be3bc93ef5cb276d7c2d5462ac8bb0c8fe8923a1db2afe1c6b90d59c534994a6a633f0ead1d638fdc293486bb634ff2c8ec9e7297c04241a61c37e3ae95b11d53343d4ba2b4cc33d2cfa7eb705e", + b, + ); +} + +#[bench] +fn modexp_nagydani_3_pow0x10001(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb010001d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d", + "37843d7c67920b5f177372fa56e2a09117df585f81df8b300fba245b1175f488c99476019857198ed459ed8d9799c377330e49f4180c4bf8e8f66240c64f65ede93d601f957b95b83efdee1e1bfde74169ff77002eaf078c71815a9220c80b2e3b3ff22c2f358111d816ebf83c2999026b6de50bfc711ff68705d2f40b753424aefc9f70f08d908b5a20276ad613b4ab4309a3ea72f0c17ea9df6b3367d44fb3acab11c333909e02e81ea2ed404a712d3ea96bba87461720e2d98723e7acd0520ac1a5212dbedcd8dc0c1abf61d4719e319ff4758a774790b8d463cdfe131d1b2dcfee52d002694e98e720cb6ae7ccea353bc503269ba35f0f63bf8d7b672a76", + b, + ); +} + +#[bench] +fn modexp_nagydani_4_square(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8102df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f", + "8a5aea5f50dcc03dc7a7a272b5aeebc040554dbc1ffe36753c4fc75f7ed5f6c2cc0de3a922bf96c78bf0643a73025ad21f45a4a5cadd717612c511ab2bff1190fe5f1ae05ba9f8fe3624de1de2a817da6072ddcdb933b50216811dbe6a9ca79d3a3c6b3a476b079fd0d05f04fb154e2dd3e5cb83b148a006f2bcbf0042efb2ae7b916ea81b27aac25c3bf9a8b6d35440062ad8eae34a83f3ffa2cc7b40346b62174a4422584f72f95316f6b2bee9ff232ba9739301c97c99a9ded26c45d72676eb856ad6ecc81d36a6de36d7f9dafafee11baa43a4b0d5e4ecffa7b9b7dcefd58c397dd373e6db4acd2b2c02717712e6289bed7c813b670c4a0c6735aa7f3b0f1ce556eae9fcc94b501b2c8781ba50a8c6220e8246371c3c7359fe4ef9da786ca7d98256754ca4e496be0a9174bedbecb384bdf470779186d6a833f068d2838a88d90ef3ad48ff963b67c39cc5a3ee123baf7bf3125f64e77af7f30e105d72c4b9b5b237ed251e4c122c6d8c1405e736299c3afd6db16a28c6a9cfa68241e53de4cd388271fe534a6a9b0dbea6171d170db1b89858468885d08fecbd54c8e471c3e25d48e97ba450b96d0d87e00ac732aaa0d3ce4309c1064bd8a4c0808a97e0143e43a24cfa847635125cd41c13e0574487963e9d725c01375db99c31da67b4cf65eff555f0c0ac416c727ff8d438ad7c42030551d68c2e7adda0abb1ca7c10", + b, + ); +} + +#[bench] +fn modexp_nagydani_4_qube(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8103df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f", + "5a2664252aba2d6e19d9600da582cdd1f09d7a890ac48e6b8da15ae7c6ff1856fc67a841ac2314d283ffa3ca81a0ecf7c27d89ef91a5a893297928f5da0245c99645676b481b7e20a566ee6a4f2481942bee191deec5544600bb2441fd0fb19e2ee7d801ad8911c6b7750affec367a4b29a22942c0f5f4744a4e77a8b654da2a82571037099e9c6d930794efe5cdca73c7b6c0844e386bdca8ea01b3d7807146bb81365e2cdc6475f8c23e0ff84463126189dc9789f72bbce2e3d2d114d728a272f1345122de23df54c922ec7a16e5c2a8f84da8871482bd258c20a7c09bbcd64c7a96a51029bbfe848736a6ba7bf9d931a9b7de0bcaf3635034d4958b20ae9ab3a95a147b0421dd5f7ebff46c971010ebfc4adbbe0ad94d5498c853e7142c450d8c71de4b2f84edbf8acd2e16d00c8115b150b1c30e553dbb82635e781379fe2a56360420ff7e9f70cc64c00aba7e26ed13c7c19622865ae07248daced36416080f35f8cc157a857ed70ea4f347f17d1bee80fa038abd6e39b1ba06b97264388b21364f7c56e192d4b62d9b161405f32ab1e2594e86243e56fcf2cb30d21adef15b9940f91af681da24328c883d892670c6aa47940867a81830a82b82716895db810df1b834640abefb7db2092dd92912cb9a735175bc447be40a503cf22dfe565b4ed7a3293ca0dfd63a507430b323ee248ec82e843b673c97ad730728cebc", + b, + ); +} + +#[bench] +fn modexp_nagydani_4_pow0x10001(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b81010001df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f", + "bed8b970c4a34849fc6926b08e40e20b21c15ed68d18f228904878d4370b56322d0da5789da0318768a374758e6375bfe4641fca5285ec7171828922160f48f5ca7efbfee4d5148612c38ad683ae4e3c3a053d2b7c098cf2b34f2cb19146eadd53c86b2d7ccf3d83b2c370bfb840913ee3879b1057a6b4e07e110b6bcd5e958bc71a14798c91d518cc70abee264b0d25a4110962a764b364ac0b0dd1ee8abc8426d775ec0f22b7e47b32576afaf1b5a48f64573ed1c5c29f50ab412188d9685307323d990802b81dacc06c6e05a1e901830ba9fcc67688dc29c5e27bde0a6e845ca925f5454b6fb3747edfaa2a5820838fb759eadf57f7cb5cec57fc213ddd8a4298fa079c3c0f472b07fb15aa6a7f0a3780bd296ff6a62e58ef443870b02260bd4fd2bbc98255674b8e1f1f9f8d33c7170b0ebbea4523b695911abbf26e41885344823bd0587115fdd83b721a4e8457a31c9a84b3d3520a07e0e35df7f48e5a9d534d0ec7feef1ff74de6a11e7f93eab95175b6ce22c68d78a642ad642837897ec11349205d8593ac19300207572c38d29ca5dfa03bc14cdbc32153c80e5cc3e739403d34c75915e49beb43094cc6dcafb3665b305ddec9286934ae66ec6b777ca528728c851318eb0f207b39f1caaf96db6eeead6b55ed08f451939314577d42bcc9f97c0b52d0234f88fd07e4c1d7780fdebc025cfffcb572cb27a8c33963", + b, + ); +} + +#[bench] +fn modexp_nagydani_5_square(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf02e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad", + "d61fe4e3f32ac260915b5b03b78a86d11bfc41d973fce5b0cc59035cf8289a8a2e3878ea15fa46565b0d806e2f85b53873ea20ed653869b688adf83f3ef444535bf91598ff7e80f334fb782539b92f39f55310cc4b35349ab7b278346eda9bc37c0d8acd3557fae38197f412f8d9e57ce6a76b7205c23564cab06e5615be7c6f05c3d05ec690cba91da5e89d55b152ff8dd2157dc5458190025cf94b1ad98f7cbe64e9482faba95e6b33844afc640892872b44a9932096508f4a782a4805323808f23e54b6ff9b841dbfa87db3505ae4f687972c18ea0f0d0af89d36c1c2a5b14560c153c3fee406f5cf15cfd1c0bb45d767426d465f2f14c158495069d0c5955a00150707862ecaae30624ebacdd8ac33e4e6aab3ff90b6ba445a84689386b9e945d01823a65874444316e83767290fcff630d2477f49d5d8ffdd200e08ee1274270f86ed14c687895f6caf5ce528bd970c20d2408a9ba66216324c6a011ac4999098362dbd98a038129a2d40c8da6ab88318aa3046cb660327cc44236d9e5d2163bd0959062195c51ed93d0088b6f92051fc99050ece2538749165976233697ab4b610385366e5ce0b02ad6b61c168ecfbedcdf74278a38de340fd7a5fead8e588e294795f9b011e2e60377a89e25c90e145397cdeabc60fd32444a6b7642a611a83c464d8b8976666351b4865c37b02e6dc21dbcdf5f930341707b618cc0f03c3122646b3385c9df9f2ec730eec9d49e7dfc9153b6e6289da8c4f0ebea9ccc1b751948e3bb7171c9e4d57423b0eeeb79095c030cb52677b3f7e0b45c30f645391f3f9c957afa549c4e0b2465b03c67993cd200b1af01035962edbc4c9e89b31c82ac121987d6529dafdeef67a132dc04b6dc68e77f22862040b75e2ceb9ff16da0fca534e6db7bd12fa7b7f51b6c08c1e23dfcdb7acbd2da0b51c87ffbced065a612e9b1c8bba9b7e2d8d7a2f04fcc4aaf355b60d764879a76b5e16762d5f2f55d585d0c8e82df6940960cddfb72c91dfa71f6b4e1c6ca25dfc39a878e998a663c04fe29d5e83b9586d047b4d7ff70a9f0d44f127e7d741685ca75f11629128d916a0ffef4be586a30c4b70389cc746e84ebf177c01ee8a4511cfbb9d1ecf7f7b33c7dd8177896e10bbc82f838dcd6db7ac67de62bf46b6a640fb580c5d1d2708f3862e3d2b645d0d18e49ef088053e3a220adc0e033c2afcfe61c90e32151152eb3caaf746c5e377d541cafc6cbb0cc0fa48b5caf1728f2e1957f5addfc234f1a9d89e40d49356c9172d0561a695fce6dab1d412321bbf407f63766ffd7b6b3d79bcfa07991c5a9709849c1008689e3b47c50d613980bec239fb64185249d055b30375ccb4354d71fe4d05648fbf6c80634dfc3575f2f24abb714c1e4c95e8896763bf4316e954c7ad19e5780ab7a040ca6fb9271f90a8b22ae738daf6cb", + b, + ); +} + +#[bench] +fn modexp_nagydani_5_qube(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf03e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad", + "5f9c70ec884926a89461056ad20ac4c30155e817f807e4d3f5bb743d789c83386762435c3627773fa77da5144451f2a8aad8adba88e0b669f5377c5e9bad70e45c86fe952b613f015a9953b8a5de5eaee4566acf98d41e327d93a35bd5cef4607d025e58951167957df4ff9b1627649d3943805472e5e293d3efb687cfd1e503faafeb2840a3e3b3f85d016051a58e1c9498aab72e63b748d834b31eb05d85dcde65e27834e266b85c75cc4ec0135135e0601cb93eeeb6e0010c8ceb65c4c319623c5e573a2c8c9fbbf7df68a930beb412d3f4dfd146175484f45d7afaa0d2e60684af9b34730f7c8438465ad3e1d0c3237336722f2aa51095bd5759f4b8ab4dda111b684aa3dac62a761722e7ae43495b7709933512c81c4e3c9133a51f7ce9f2b51fcec064f65779666960b4e45df3900f54311f5613e8012dd1b8efd359eda31a778264c72aa8bb419d862734d769076bce2810011989a45374e5c5d8729fec21427f0bf397eacbb4220f603cf463a4b0c94efd858ffd9768cd60d6ce68d755e0fbad007ce5c2223d70c7018345a102e4ab3c60a13a9e7794303156d4c2063e919f2153c13961fb324c80b240742f47773a7a8e25b3e3fb19b00ce839346c6eb3c732fbc6b888df0b1fe0a3d07b053a2e9402c267b2d62f794d8a2840526e3ade15ce2264496ccd7519571dfde47f7a4bb16292241c20b2be59f3f8fb4f6383f232d838c5a22d8c95b6834d9d2ca493f5a505ebe8899503b0e8f9b19e6e2dd81c1628b80016d02097e0134de51054c4e7674824d4d758760fc52377d2cad145e259aa2ffaf54139e1a66b1e0c1c191e32ac59474c6b526f5b3ba07d3e5ec286eddf531fcd5292869be58c9f22ef91026159f7cf9d05ef66b4299f4da48cc1635bf2243051d342d378a22c83390553e873713c0454ce5f3234397111ac3fe3207b86f0ed9fc025c81903e1748103692074f83824fda6341be4f95ff00b0a9a208c267e12fa01825054cc0513629bf3dbb56dc5b90d4316f87654a8be18227978ea0a8a522760cad620d0d14fd38920fb7321314062914275a5f99f677145a6979b156bd82ecd36f23f8e1273cc2759ecc0b2c69d94dad5211d1bed939dd87ed9e07b91d49713a6e16ade0a98aea789f04994e318e4ff2c8a188cd8d43aeb52c6daa3bc29b4af50ea82a247c5cd67b573b34cbadcc0a376d3bbd530d50367b42705d870f2e27a8197ef46070528bfe408360faa2ebb8bf76e9f388572842bcb119f4d84ee34ae31f5cc594f23705a49197b181fb78ed1ec99499c690f843a4d0cf2e226d118e9372271054fbabdcc5c92ae9fefaef0589cd0e722eaf30c1703ec4289c7fd81beaa8a455ccee5298e31e2080c10c366a6fcf56f7d13582ad0bcad037c612b710fc595b70fbefaaca23623b60c6c39b11beb8e5843b6b3dac60f", + b, + ); +} + + +#[bench] +fn modexp_nagydani_5_pow0x10001(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000005", // modexp + "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf010001e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad", + "5a0eb2bdf0ac1cae8e586689fa16cd4b07dfdedaec8a110ea1fdb059dd5253231b6132987598dfc6e11f86780428982d50cf68f67ae452622c3b336b537ef3298ca645e8f89ee39a26758206a5a3f6409afc709582f95274b57b71fae5c6b74619ae6f089a5393c5b79235d9caf699d23d88fb873f78379690ad8405e34c19f5257d596580c7a6a7206a3712825afe630c76b31cdb4a23e7f0632e10f14f4e282c81a66451a26f8df2a352b5b9f607a7198449d1b926e27036810368e691a74b91c61afa73d9d3b99453e7c8b50fd4f09c039a2f2feb5c419206694c31b92df1d9586140cb3417b38d0c503c7b508cc2ed12e813a1c795e9829eb39ee78eeaf360a169b491a1d4e419574e712402de9d48d54c1ae5e03739b7156615e8267e1fb0a897f067afd11fb33f6e24182d7aaaaa18fe5bc1982f20d6b871e5a398f0f6f718181d31ec225cfa9a0a70124ed9a70031bdf0c1c7829f708b6e17d50419ef361cf77d99c85f44607186c8d683106b8bd38a49b5d0fb503b397a83388c5678dcfcc737499d84512690701ed621a6f0172aecf037184ddf0f2453e4053024018e5ab2e30d6d5363b56e8b41509317c99042f517247474ab3abc848e00a07f69c254f46f2a05cf6ed84e5cc906a518fdcfdf2c61ce731f24c5264f1a25fc04934dc28aec112134dd523f70115074ca34e3807aa4cb925147f3a0ce152d323bd8c675ace446d0fd1ae30c4b57f0eb2c23884bc18f0964c0114796c5b6d080c3d89175665fbf63a6381a6a9da39ad070b645c8bb1779506da14439a9f5b5d481954764ea114fac688930bc68534d403cff4210673b6a6ff7ae416b7cd41404c3d3f282fcd193b86d0f54d0006c2a503b40d5c3930da980565b8f9630e9493a79d1c03e74e5f93ac8e4dc1a901ec5e3b3e57049124c7b72ea345aa359e782285d9e6a5c144a378111dd02c40855ff9c2be9b48425cb0b2fd62dc8678fd151121cf26a65e917d65d8e0dacfae108eb5508b601fb8ffa370be1f9a8b749a2d12eeab81f41079de87e2d777994fa4d28188c579ad327f9957fb7bdecec5c680844dd43cb57cf87aeb763c003e65011f73f8c63442df39a92b946a6bd968a1c1e4d5fa7d88476a68bd8e20e5b70a99259c7d3f85fb1b65cd2e93972e6264e74ebf289b8b6979b9b68a85cd5b360c1987f87235c3c845d62489e33acf85d53fa3561fe3a3aee18924588d9c6eba4edb7a4d106b31173e42929f6f0c48c80ce6a72d54eca7c0fe870068b7a7c89c63cdda593f5b32d3cb4ea8a32c39f00ab449155757172d66763ed9527019d6de6c9f2416aa6203f4d11c9ebee1e1d3845099e55504446448027212616167eb36035726daa7698b075286f5379cd3e93cb3e0cf4f9cb8d017facbb5550ed32d5ec5400ae57e47e2bf78d1eaeff9480cc765ceff39db500", + b, + ); +} + +#[bench] +fn alt_bn128_add_chfast1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "18b18acfb4c2c30276db5411368e7185b311dd124691610c5d3b74034e093dc9063c909c4720840cb5134cb9f59fa749755796819658d32efc0d288198f3726607c2b7f58a84bd6145f00c9c2bc0bb1a187f20ff2c92963a88019e7c6a014eed06614e20c147e940f2d70da3f74c9a17df361706a4485c742bd6788478fa17d7", + "2243525c5efd4b9c3d3c45ac0ca3fe4dd85e830a4ce6b65fa1eeaee202839703301d1d33be6da8e509df21cc35964723180eed7532537db9ae5e7d48f195c915", + b, + ); +} + +#[bench] +fn alt_bn128_add_chfast2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "2243525c5efd4b9c3d3c45ac0ca3fe4dd85e830a4ce6b65fa1eeaee202839703301d1d33be6da8e509df21cc35964723180eed7532537db9ae5e7d48f195c91518b18acfb4c2c30276db5411368e7185b311dd124691610c5d3b74034e093dc9063c909c4720840cb5134cb9f59fa749755796819658d32efc0d288198f37266", + "2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb721611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb204", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio3(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio4(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio5(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio6(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio7(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio8(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio9(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio10(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio11(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002", + "030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd315ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio12(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd315ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio13(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98", + "15bf2bb17880144b5d1cd2b1f46eff9d617bffd1ca57c37fb5a49bd84e53cf66049c797f9ce0d17083deb32b5e36f2ea2a212ee036598dd7624c168993d1355f", + b, + ); +} + +#[bench] +fn alt_bn128_add_cdetrio14(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000006", // alt_bn128_add + "17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7c17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa92e83f8d734803fc370eba25ed1f6b8768bd6d83887b87165fc2434fe11a830cb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_mul_chfast1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000007", // alt_bn128_mul + "2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb721611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb20400000000000000000000000000000000000000000000000011138ce750fa15c2", + "070a8d6a982153cae4be29d434e8faef8a47b274a053f5a4ee2a6c9c13c31e5c031b8ce914eba3a9ffb989f9cdd5b0f01943074bf4f0f315690ec3cec6981afc", + b, + ); +} + +#[bench] +fn alt_bn128_mul_chfast2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000007", // alt_bn128_mul + "070a8d6a982153cae4be29d434e8faef8a47b274a053f5a4ee2a6c9c13c31e5c031b8ce914eba3a9ffb989f9cdd5b0f01943074bf4f0f315690ec3cec6981afc30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd46", + "025a6f4181d2b4ea8b724290ffb40156eb0adb514c688556eb79cdea0752c2bb2eff3f31dea215f1eb86023a133a996eb6300b44da664d64251d05381bb8a02e", + b, + ); +} + +#[bench] +fn alt_bn128_mul_chfast3(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000007", // alt_bn128_mul + "025a6f4181d2b4ea8b724290ffb40156eb0adb514c688556eb79cdea0752c2bb2eff3f31dea215f1eb86023a133a996eb6300b44da664d64251d05381bb8a02e183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3", + "14789d0d4a730b354403b5fac948113739e276c23e0258d8596ee72f9cd9d3230af18a63153e0ec25ff9f2951dd3fa90ed0197bfef6e2a1a62b5095b9d2b4a27", + b, + ); +} + +#[bench] +fn alt_bn128_mul_cdetrio1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000007", // alt_bn128_mul + "1a87b0584ce92f4593d161480614f2989035225609f08058ccfa3d0f940febe31a2f3c951f6dadcc7ee9007dff81504b0fcd6d7cf59996efdc33d92bf7f9f8f6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "2cde5879ba6f13c0b5aa4ef627f159a3347df9722efce88a9afbb20b763b4c411aa7e43076f6aee272755a7f9b84832e71559ba0d2e0b17d5f9f01755e5b0d11", + b, + ); +} + +#[bench] +fn alt_bn128_mul_cdetrio6(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000007", // alt_bn128_mul + "17c139df0efee0f766bc0204762b774362e4ded88953a39ce849a8a7fa163fa901e0559bacb160664764a357af8a9fe70baa9258e0b959273ffc5718c6d4cc7cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "29e587aadd7c06722aabba753017c093f70ba7eb1f1c0104ec0564e7e3e21f6022b1143f6a41008e7755c71c3d00b6b915d386de21783ef590486d8afa8453b1", + b, + ); +} + +#[bench] +fn alt_bn128_mul_cdetrio11(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000007", // alt_bn128_mul + "039730ea8dff1254c0fee9c0ea777d29a9c710b7e616683f194f18c43b43b869073a5ffcc6fc7a28c30723d6e58ce577356982d65b833a5a5c15bf9024b43d98ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "00a1a234d08efaa2616607e31eca1980128b00b415c845ff25bba3afcb81dc00242077290ed33906aeb8e42fd98c41bcb9057ba03421af3f2d08cfc441186024", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_jeff1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "1c76476f4def4bb94541d57ebba1193381ffa7aa76ada664dd31c16024c43f593034dd2920f673e204fee2811c678745fc819b55d3e9d294e45c9b03a76aef41209dd15ebff5d46c4bd888e51a93cf99a7329636c63514396b4a452003a35bf704bf11ca01483bfa8b34b43561848d28905960114c8ac04049af4b6315a416782bb8324af6cfc93537a2ad1a445cfd0ca2a71acd7ac41fadbf933c2a51be344d120a2a4cf30c1bf9845f20c6fe39e07ea2cce61f0c9bb048165fe5e4de877550111e129f1cf1097710d41c4ac70fcdfa5ba2023c6ff1cbeac322de49d1b6df7c2032c61a830e3c17286de9462bf242fca2883585b93870a73853face6a6bf411198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_jeff2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "2eca0c7238bf16e83e7a1e6c5d49540685ff51380f309842a98561558019fc0203d3260361bb8451de5ff5ecd17f010ff22f5c31cdf184e9020b06fa5997db841213d2149b006137fcfb23036606f848d638d576a120ca981b5b1a5f9300b3ee2276cf730cf493cd95d64677bbb75fc42db72513a4c1e387b476d056f80aa75f21ee6226d31426322afcda621464d0611d226783262e21bb3bc86b537e986237096df1f82dff337dd5972e32a8ad43e28a78a96a823ef1cd4debe12b6552ea5f06967a1237ebfeca9aaae0d6d0bab8e28c198c5a339ef8a2407e31cdac516db922160fa257a5fd5b280642ff47b65eca77e626cb685c84fa6d3b6882a283ddd1198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_jeff3(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "0f25929bcb43d5a57391564615c9e70a992b10eafa4db109709649cf48c50dd216da2f5cb6be7a0aa72c440c53c9bbdfec6c36c7d515536431b3a865468acbba2e89718ad33c8bed92e210e81d1853435399a271913a6520736a4729cf0d51eb01a9e2ffa2e92599b68e44de5bcf354fa2642bd4f26b259daa6f7ce3ed57aeb314a9a87b789a58af499b314e13c3d65bede56c07ea2d418d6874857b70763713178fb49a2d6cd347dc58973ff49613a20757d0fcc22079f9abd10c3baee245901b9e027bd5cfc2cb5db82d4dc9677ac795ec500ecd47deee3b5da006d6d049b811d7511c78158de484232fc68daf8a45cf217d1c2fae693ff5871e8752d73b21198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_jeff4(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "2f2ea0b3da1e8ef11914acf8b2e1b32d99df51f5f4f206fc6b947eae860eddb6068134ddb33dc888ef446b648d72338684d678d2eb2371c61a50734d78da4b7225f83c8b6ab9de74e7da488ef02645c5a16a6652c3c71a15dc37fe3a5dcb7cb122acdedd6308e3bb230d226d16a105295f523a8a02bfc5e8bd2da135ac4c245d065bbad92e7c4e31bf3757f1fe7362a63fbfee50e7dc68da116e67d600d9bf6806d302580dc0661002994e7cd3a7f224e7ddc27802777486bf80f40e4ca3cfdb186bac5188a98c45e6016873d107f5cd131f3a3e339d0375e58bd6219347b008122ae2b09e539e152ec5364e7e2204b03d11d3caa038bfc7cd499f8176aacbee1f39e4e4afc4bc74790a4a028aff2c3d2538731fb755edefd8cb48d6ea589b5e283f150794b6736f670d6a1033f9b46c6f5204f50813eb85c8dc4b59db1c5d39140d97ee4d2b36d99bc49974d18ecca3e7ad51011956051b464d9e27d46cc25e0764bb98575bd466d32db7b15f582b2d5c452b36aa394b789366e5e3ca5aabd415794ab061441e51d01e94640b7e3084a07e02c78cf3103c542bc5b298669f211b88da1679b0b64a63b7e0e7bfe52aae524f73a55be7fe70c7e9bfc94b4cf0da1213d2149b006137fcfb23036606f848d638d576a120ca981b5b1a5f9300b3ee2276cf730cf493cd95d64677bbb75fc42db72513a4c1e387b476d056f80aa75f21ee6226d31426322afcda621464d0611d226783262e21bb3bc86b537e986237096df1f82dff337dd5972e32a8ad43e28a78a96a823ef1cd4debe12b6552ea5f", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_jeff5(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "20a754d2071d4d53903e3b31a7e98ad6882d58aec240ef981fdf0a9d22c5926a29c853fcea789887315916bbeb89ca37edb355b4f980c9a12a94f30deeed30211213d2149b006137fcfb23036606f848d638d576a120ca981b5b1a5f9300b3ee2276cf730cf493cd95d64677bbb75fc42db72513a4c1e387b476d056f80aa75f21ee6226d31426322afcda621464d0611d226783262e21bb3bc86b537e986237096df1f82dff337dd5972e32a8ad43e28a78a96a823ef1cd4debe12b6552ea5f1abb4a25eb9379ae96c84fff9f0540abcfc0a0d11aeda02d4f37e4baf74cb0c11073b3ff2cdbb38755f8691ea59e9606696b3ff278acfc098fa8226470d03869217cee0a9ad79a4493b5253e2e4e3a39fc2df38419f230d341f60cb064a0ac290a3d76f140db8418ba512272381446eb73958670f00cf46f1d9e64cba057b53c26f64a8ec70387a13e41430ed3ee4a7db2059cc5fc13c067194bcc0cb49a98552fd72bd9edb657346127da132e5b82ab908f5816c826acb499e22f2412d1a2d70f25929bcb43d5a57391564615c9e70a992b10eafa4db109709649cf48c50dd2198a1f162a73261f112401aa2db79c7dab1533c9935c77290a6ce3b191f2318d198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_jeff6(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "1c76476f4def4bb94541d57ebba1193381ffa7aa76ada664dd31c16024c43f593034dd2920f673e204fee2811c678745fc819b55d3e9d294e45c9b03a76aef41209dd15ebff5d46c4bd888e51a93cf99a7329636c63514396b4a452003a35bf704bf11ca01483bfa8b34b43561848d28905960114c8ac04049af4b6315a416782bb8324af6cfc93537a2ad1a445cfd0ca2a71acd7ac41fadbf933c2a51be344d120a2a4cf30c1bf9845f20c6fe39e07ea2cce61f0c9bb048165fe5e4de877550111e129f1cf1097710d41c4ac70fcdfa5ba2023c6ff1cbeac322de49d1b6df7c103188585e2364128fe25c70558f1560f4f9350baf3959e603cc91486e110936198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_empty_data(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_one_point(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000000", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_two_point_match_2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_two_point_match_3(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_two_point_match_4(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "105456a333e6d636854f987ea7bb713dfd0ae8371a72aea313ae0c32c0bf10160cf031d41b41557f3e7e3ba0c51bebe5da8e6ecd855ec50fc87efcdeac168bcc0476be093a6d2b4bbf907172049874af11e1b6267606e00804d3ff0037ec57fd3010c68cb50161b7d1d96bb71edfec9880171954e56871abf3d93cc94d745fa114c059d74e5b6c4ec14ae5864ebe23a71781d86c29fb8fb6cce94f70d3de7a2101b33461f39d9e887dbb100f170a2345dde3c07e256d1dfa2b657ba5cd030427000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000021a2c3013d2ea92e13c800cde68ef56a294b883f6ac35d25f587c09b1b3c635f7290158a80cd3d66530f74dc94c94adb88f5cdb481acca997b6e60071f08a115f2f997f3dbd66a7afe07fe7862ce239edba9e05c5afff7f8a1259c9733b2dfbb929d1691530ca701b4a106054688728c9972c8512e9789e9567aae23e302ccd75", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_ten_point_match_1(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_ten_point_match_2(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002203e205db4f19b37b60121b83a7333706db86431c6d835849957ed8c3928ad7927dc7234fd11d3e8c36c59277c3e6f149d5cd3cfa9a62aee49f8130962b4b3b9195e8aa5b7827463722b8c153931579d3505566b4edf48d498e185f0509de15204bb53b8977e5f92a0bc372742c4830944a59b4fe6b1c0466e2a6dad122b5d2e030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd31a76dae6d3272396d0cbe61fced2bc532edac647851e3ac53ce1cc9c7e645a83198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c21800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} + +#[bench] +fn alt_bn128_pairing_ten_point_match_3(b: &mut Bencher) { + bench( + "0000000000000000000000000000000000000008", // alt_bn128_pairing + "105456a333e6d636854f987ea7bb713dfd0ae8371a72aea313ae0c32c0bf10160cf031d41b41557f3e7e3ba0c51bebe5da8e6ecd855ec50fc87efcdeac168bcc0476be093a6d2b4bbf907172049874af11e1b6267606e00804d3ff0037ec57fd3010c68cb50161b7d1d96bb71edfec9880171954e56871abf3d93cc94d745fa114c059d74e5b6c4ec14ae5864ebe23a71781d86c29fb8fb6cce94f70d3de7a2101b33461f39d9e887dbb100f170a2345dde3c07e256d1dfa2b657ba5cd030427000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000021a2c3013d2ea92e13c800cde68ef56a294b883f6ac35d25f587c09b1b3c635f7290158a80cd3d66530f74dc94c94adb88f5cdb481acca997b6e60071f08a115f2f997f3dbd66a7afe07fe7862ce239edba9e05c5afff7f8a1259c9733b2dfbb929d1691530ca701b4a106054688728c9972c8512e9789e9567aae23e302ccd75", + "0000000000000000000000000000000000000000000000000000000000000001", + b, + ); +} diff --git a/ethcore/benches/evm.rs b/ethcore/benches/evm.rs deleted file mode 100644 index 27ae23a69a..0000000000 --- a/ethcore/benches/evm.rs +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2015-2018 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 . - -#![feature(test)] - -extern crate bn; -extern crate ethcore; -extern crate ethereum_types; -extern crate ethkey; -extern crate parity_bytes as bytes; -extern crate parity_crypto as crypto; -extern crate rand; -extern crate rustc_hex; -extern crate test; - -use rand::StdRng; -use rustc_hex::FromHex; - -use self::test::Bencher; -use bytes::BytesRef; - -#[bench] -fn bn_128_pairing(b: &mut Bencher) { - use bn::{pairing, G1, G2, Fr, Group}; - - let rng = &mut ::rand::thread_rng(); - - let sk0 = Fr::random(rng); - let sk1 = Fr::random(rng); - - let pk0 = G1::one() * sk0; - let pk1 = G2::one() * sk1; - - b.iter(|| { - let _ = pairing(pk0, pk1); - }); -} - -#[bench] -fn bn_128_add(b: &mut Bencher) { - use bn::{AffineG1, G1, Group}; - - let mut rng = StdRng::new().unwrap(); - let p1: G1 = G1::random(&mut rng); - let p2: G1 = G1::random(&mut rng); - - b.iter(|| { - let _ = AffineG1::from_jacobian(p1 + p2); - }); -} - -#[bench] -fn bn_128_mul(b: &mut Bencher) { - use bn::{AffineG1, G1, Fr, Group}; - - let mut rng = StdRng::new().unwrap(); - let p: G1 = G1::random(&mut rng); - let fr = Fr::random(&mut rng); - - b.iter(|| { - let _ = AffineG1::from_jacobian(p * fr); - }); -} - -#[bench] -fn sha256(b: &mut Bencher) { - use crypto::digest::sha256; - - let input = [0_u8; 256]; - - b.iter(|| { - sha256(&input); - }); -} - -#[bench] -fn ecrecover(b: &mut Bencher) { - use ethkey::{Signature, recover as ec_recover}; - use ethereum_types::H256; - let input = FromHex::from_hex("47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad000000000000000000000000000000000000000000000000000000000000001b650acf9d3f5f0a2c799776a1254355d5f4061762a237396a99a0e0e3fc2bcd6729514a0dacb2e623ac4abd157cb18163ff942280db4d5caad66ddf941ba12e03").unwrap(); - let hash = H256::from_slice(&input[0..32]); - let v = H256::from_slice(&input[32..64]); - let r = H256::from_slice(&input[64..96]); - let s = H256::from_slice(&input[96..128]); - - let bit = match v[31] { - 27 | 28 if &v.0[..31] == &[0; 31] => v[31] - 27, - _ => { return; }, - }; - - let s = Signature::from_rsv(&r, &s, bit); - b.iter(|| { - let _ = ec_recover(&s, &hash); - }); -} - -fn run_modexp(input: &[u8], expected: &[u8]) { - let builtin = ethcore::builtin::ethereum_builtin("modexp"); - let mut ov = vec![]; - builtin.execute(input, &mut BytesRef::Flexible(&mut ov)).expect("Builtin should not fail"); - assert_eq!(&ov[..], &expected[..]); -} - -fn bench_modexp(b: &mut Bencher, input: &str, expected: &str) { - let input = FromHex::from_hex(input).unwrap(); - let expected = FromHex::from_hex(expected).unwrap(); - b.iter(|| { - run_modexp(&input, &expected); - }); -} - -#[bench] -fn modexp_1_square(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb502fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b"; - let expected = "60008f1614cc01dcfb6bfb09c625cf90b47d4468db81b5f8b7a39d42f332eab9b2da8f2d95311648a8f243f4bb13cfb3d8f7f2a3c014122ebb3ed41b02783adc"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_1_qube(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb503fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b"; - let expected = "4834a46ba565db27903b1c720c9d593e84e4cbd6ad2e64b31885d944f68cd801f92225a8961c952ddf2797fa4701b330c85c4b363798100b921a1a22a46a7fec"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_1_pow0x10001(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000040e09ad9675465c53a109fac66a445c91b292d2bb2c5268addb30cd82f80fcb0033ff97c80a5fc6f39193ae969c6ede6710a6b7ac27078a06d90ef1c72e5c85fb5010001fc9e1f6beb81516545975218075ec2af118cd8798df6e08a147c60fd6095ac2bb02c2908cf4dd7c81f11c289e4bce98f3553768f392a80ce22bf5c4f4a248c6b"; - let expected = "c36d804180c35d4426b57b50c5bfcca5c01856d104564cd513b461d3c8b8409128a5573e416d0ebe38f5f736766d9dc27143e4da981dfa4d67f7dc474cbee6d2"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_2_square(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5102e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087"; - let expected = "981dd99c3b113fae3e3eaa9435c0dc96779a23c12a53d1084b4f67b0b053a27560f627b873e3f16ad78f28c94f14b6392def26e4d8896c5e3c984e50fa0b3aa44f1da78b913187c6128baa9340b1e9c9a0fd02cb78885e72576da4a8f7e5a113e173a7a2889fde9d407bd9f06eb05bc8fc7b4229377a32941a02bf4edcc06d70"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_2_qube(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf5103e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087"; - let expected = "d89ceb68c32da4f6364978d62aaa40d7b09b59ec61eb3c0159c87ec3a91037f7dc6967594e530a69d049b64adfa39c8fa208ea970cfe4b7bcd359d345744405afe1cbf761647e32b3184c7fbe87cee8c6c7ff3b378faba6c68b83b6889cb40f1603ee68c56b4c03d48c595c826c041112dc941878f8c5be828154afd4a16311f"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_2_pow0x10001(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000080cad7d991a00047dd54d3399b6b0b937c718abddef7917c75b6681f40cc15e2be0003657d8d4c34167b2f0bbbca0ccaa407c2a6a07d50f1517a8f22979ce12a81dcaf707cc0cebfc0ce2ee84ee7f77c38b9281b9822a8d3de62784c089c9b18dcb9a2a5eecbede90ea788a862a9ddd9d609c2c52972d63e289e28f6a590ffbf51010001e6d893b80aeed5e6e9ce9afa8a5d5675c93a32ac05554cb20e9951b2c140e3ef4e433068cf0fb73bc9f33af1853f64aa27a0028cbf570d7ac9048eae5dc7b28c87c31e5810f1e7fa2cda6adf9f1076dbc1ec1238560071e7efc4e9565c49be9e7656951985860a558a754594115830bcdb421f741408346dd5997bb01c287087"; - let expected = "ad85e8ef13fd1dd46eae44af8b91ad1ccae5b7a1c92944f92a19f21b0b658139e0cabe9c1f679507c2de354bf2c91ebd965d1e633978a830d517d2f6f8dd5fd58065d58559de7e2334a878f8ec6992d9b9e77430d4764e863d77c0f87beede8f2f7f2ab2e7222f85cc9d98b8467f4bb72e87ef2882423ebdb6daf02dddac6db2"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_3_square(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb02d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d"; - let expected = "affc7507ea6d84751ec6b3f0d7b99dbcc263f33330e450d1b3ff0bc3d0874320bf4edd57debd587306988157958cb3cfd369cc0c9c198706f635c9e0f15d047df5cb44d03e2727f26b083c4ad8485080e1293f171c1ed52aef5993a5815c35108e848c951cf1e334490b4a539a139e57b68f44fee583306f5b85ffa57206b3ee5660458858534e5386b9584af3c7f67806e84c189d695e5eb96e1272d06ec2df5dc5fabc6e94b793718c60c36be0a4d031fc84cd658aa72294b2e16fc240aef70cb9e591248e38bd49c5a554d1afa01f38dab72733092f7555334bbef6c8c430119840492380aa95fa025dcf699f0a39669d812b0c6946b6091e6e235337b6f8"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_3_qube(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb03d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d"; - let expected = "1b280ecd6a6bf906b806d527c2a831e23b238f89da48449003a88ac3ac7150d6a5e9e6b3be4054c7da11dd1e470ec29a606f5115801b5bf53bc1900271d7c3ff3cd5ed790d1c219a9800437a689f2388ba1a11d68f6a8e5b74e9a3b1fac6ee85fc6afbac599f93c391f5dc82a759e3c6c0ab45ce3f5d25d9b0c1bf94cf701ea6466fc9a478dacc5754e593172b5111eeba88557048bceae401337cd4c1182ad9f700852bc8c99933a193f0b94cf1aedbefc48be3bc93ef5cb276d7c2d5462ac8bb0c8fe8923a1db2afe1c6b90d59c534994a6a633f0ead1d638fdc293486bb634ff2c8ec9e7297c04241a61c37e3ae95b11d53343d4ba2b4cc33d2cfa7eb705e"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_3_pow0x10001(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000100c9130579f243e12451760976261416413742bd7c91d39ae087f46794062b8c239f2a74abf3918605a0e046a7890e049475ba7fbb78f5de6490bd22a710cc04d30088179a919d86c2da62cf37f59d8f258d2310d94c24891be2d7eeafaa32a8cb4b0cfe5f475ed778f45907dc8916a73f03635f233f7a77a00a3ec9ca6761a5bbd558a2318ecd0caa1c5016691523e7e1fa267dd35e70c66e84380bdcf7c0582f540174e572c41f81e93da0b757dff0b0fe23eb03aa19af0bdec3afb474216febaacb8d0381e631802683182b0fe72c28392539850650b70509f54980241dc175191a35d967288b532a7a8223ce2440d010615f70df269501944d4ec16fe4a3cb010001d7a85909174757835187cb52e71934e6c07ef43b4c46fc30bbcd0bc72913068267c54a4aabebb493922492820babdeb7dc9b1558fcf7bd82c37c82d3147e455b623ab0efa752fe0b3a67ca6e4d126639e645a0bf417568adbb2a6a4eef62fa1fa29b2a5a43bebea1f82193a7dd98eb483d09bb595af1fa9c97c7f41f5649d976aee3e5e59e2329b43b13bea228d4a93f16ba139ccb511de521ffe747aa2eca664f7c9e33da59075cc335afcd2bf3ae09765f01ab5a7c3e3938ec168b74724b5074247d200d9970382f683d6059b94dbc336603d1dfee714e4b447ac2fa1d99ecb4961da2854e03795ed758220312d101e1e3d87d5313a6d052aebde75110363d"; - let expected = "37843d7c67920b5f177372fa56e2a09117df585f81df8b300fba245b1175f488c99476019857198ed459ed8d9799c377330e49f4180c4bf8e8f66240c64f65ede93d601f957b95b83efdee1e1bfde74169ff77002eaf078c71815a9220c80b2e3b3ff22c2f358111d816ebf83c2999026b6de50bfc711ff68705d2f40b753424aefc9f70f08d908b5a20276ad613b4ab4309a3ea72f0c17ea9df6b3367d44fb3acab11c333909e02e81ea2ed404a712d3ea96bba87461720e2d98723e7acd0520ac1a5212dbedcd8dc0c1abf61d4719e319ff4758a774790b8d463cdfe131d1b2dcfee52d002694e98e720cb6ae7ccea353bc503269ba35f0f63bf8d7b672a76"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_4_square(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8102df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f"; - let expected = "8a5aea5f50dcc03dc7a7a272b5aeebc040554dbc1ffe36753c4fc75f7ed5f6c2cc0de3a922bf96c78bf0643a73025ad21f45a4a5cadd717612c511ab2bff1190fe5f1ae05ba9f8fe3624de1de2a817da6072ddcdb933b50216811dbe6a9ca79d3a3c6b3a476b079fd0d05f04fb154e2dd3e5cb83b148a006f2bcbf0042efb2ae7b916ea81b27aac25c3bf9a8b6d35440062ad8eae34a83f3ffa2cc7b40346b62174a4422584f72f95316f6b2bee9ff232ba9739301c97c99a9ded26c45d72676eb856ad6ecc81d36a6de36d7f9dafafee11baa43a4b0d5e4ecffa7b9b7dcefd58c397dd373e6db4acd2b2c02717712e6289bed7c813b670c4a0c6735aa7f3b0f1ce556eae9fcc94b501b2c8781ba50a8c6220e8246371c3c7359fe4ef9da786ca7d98256754ca4e496be0a9174bedbecb384bdf470779186d6a833f068d2838a88d90ef3ad48ff963b67c39cc5a3ee123baf7bf3125f64e77af7f30e105d72c4b9b5b237ed251e4c122c6d8c1405e736299c3afd6db16a28c6a9cfa68241e53de4cd388271fe534a6a9b0dbea6171d170db1b89858468885d08fecbd54c8e471c3e25d48e97ba450b96d0d87e00ac732aaa0d3ce4309c1064bd8a4c0808a97e0143e43a24cfa847635125cd41c13e0574487963e9d725c01375db99c31da67b4cf65eff555f0c0ac416c727ff8d438ad7c42030551d68c2e7adda0abb1ca7c10"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_4_qube(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b8103df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f"; - let expected = "5a2664252aba2d6e19d9600da582cdd1f09d7a890ac48e6b8da15ae7c6ff1856fc67a841ac2314d283ffa3ca81a0ecf7c27d89ef91a5a893297928f5da0245c99645676b481b7e20a566ee6a4f2481942bee191deec5544600bb2441fd0fb19e2ee7d801ad8911c6b7750affec367a4b29a22942c0f5f4744a4e77a8b654da2a82571037099e9c6d930794efe5cdca73c7b6c0844e386bdca8ea01b3d7807146bb81365e2cdc6475f8c23e0ff84463126189dc9789f72bbce2e3d2d114d728a272f1345122de23df54c922ec7a16e5c2a8f84da8871482bd258c20a7c09bbcd64c7a96a51029bbfe848736a6ba7bf9d931a9b7de0bcaf3635034d4958b20ae9ab3a95a147b0421dd5f7ebff46c971010ebfc4adbbe0ad94d5498c853e7142c450d8c71de4b2f84edbf8acd2e16d00c8115b150b1c30e553dbb82635e781379fe2a56360420ff7e9f70cc64c00aba7e26ed13c7c19622865ae07248daced36416080f35f8cc157a857ed70ea4f347f17d1bee80fa038abd6e39b1ba06b97264388b21364f7c56e192d4b62d9b161405f32ab1e2594e86243e56fcf2cb30d21adef15b9940f91af681da24328c883d892670c6aa47940867a81830a82b82716895db810df1b834640abefb7db2092dd92912cb9a735175bc447be40a503cf22dfe565b4ed7a3293ca0dfd63a507430b323ee248ec82e843b673c97ad730728cebc"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_4_pow0x10001(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000200db34d0e438249c0ed685c949cc28776a05094e1c48691dc3f2dca5fc3356d2a0663bd376e4712839917eb9a19c670407e2c377a2de385a3ff3b52104f7f1f4e0c7bf7717fb913896693dc5edbb65b760ef1b00e42e9d8f9af17352385e1cd742c9b006c0f669995cb0bb21d28c0aced2892267637b6470d8cee0ab27fc5d42658f6e88240c31d6774aa60a7ebd25cd48b56d0da11209f1928e61005c6eb709f3e8e0aaf8d9b10f7d7e296d772264dc76897ccdddadc91efa91c1903b7232a9e4c3b941917b99a3bc0c26497dedc897c25750af60237aa67934a26a2bc491db3dcc677491944bc1f51d3e5d76b8d846a62db03dedd61ff508f91a56d71028125035c3a44cbb041497c83bf3e4ae2a9613a401cc721c547a2afa3b16a2969933d3626ed6d8a7428648f74122fd3f2a02a20758f7f693892c8fd798b39abac01d18506c45e71432639e9f9505719ee822f62ccbf47f6850f096ff77b5afaf4be7d772025791717dbe5abf9b3f40cff7d7aab6f67e38f62faf510747276e20a42127e7500c444f9ed92baf65ade9e836845e39c4316d9dce5f8e2c8083e2c0acbb95296e05e51aab13b6b8f53f06c9c4276e12b0671133218cc3ea907da3bd9a367096d9202128d14846cc2e20d56fc8473ecb07cecbfb8086919f3971926e7045b853d85a69d026195c70f9f7a823536e2a8f4b3e12e94d9b53a934353451094b81010001df3143a0057457d75e8c708b6337a6f5a4fd1a06727acf9fb93e2993c62f3378b37d56c85e7b1e00f0145ebf8e4095bd723166293c60b6ac1252291ef65823c9e040ddad14969b3b340a4ef714db093a587c37766d68b8d6b5016e741587e7e6bf7e763b44f0247e64bae30f994d248bfd20541a333e5b225ef6a61199e301738b1e688f70ec1d7fb892c183c95dc543c3e12adf8a5e8b9ca9d04f9445cced3ab256f29e998e69efaa633a7b60e1db5a867924ccab0a171d9d6e1098dfa15acde9553de599eaa56490c8f411e4985111f3d40bddfc5e301edb01547b01a886550a61158f7e2033c59707789bf7c854181d0c2e2a42a93cf09209747d7082e147eb8544de25c3eb14f2e35559ea0c0f5877f2f3fc92132c0ae9da4e45b2f6c866a224ea6d1f28c05320e287750fbc647368d41116e528014cc1852e5531d53e4af938374daba6cee4baa821ed07117253bb3601ddd00d59a3d7fb2ef1f5a2fbba7c429f0cf9a5b3462410fd833a69118f8be9c559b1000cc608fd877fb43f8e65c2d1302622b944462579056874b387208d90623fcdaf93920ca7a9e4ba64ea208758222ad868501cc2c345e2d3a5ea2a17e5069248138c8a79c0251185d29ee73e5afab5354769142d2bf0cb6712727aa6bf84a6245fcdae66e4938d84d1b9dd09a884818622080ff5f98942fb20acd7e0c916c2d5ea7ce6f7e173315384518f"; - let expected = "bed8b970c4a34849fc6926b08e40e20b21c15ed68d18f228904878d4370b56322d0da5789da0318768a374758e6375bfe4641fca5285ec7171828922160f48f5ca7efbfee4d5148612c38ad683ae4e3c3a053d2b7c098cf2b34f2cb19146eadd53c86b2d7ccf3d83b2c370bfb840913ee3879b1057a6b4e07e110b6bcd5e958bc71a14798c91d518cc70abee264b0d25a4110962a764b364ac0b0dd1ee8abc8426d775ec0f22b7e47b32576afaf1b5a48f64573ed1c5c29f50ab412188d9685307323d990802b81dacc06c6e05a1e901830ba9fcc67688dc29c5e27bde0a6e845ca925f5454b6fb3747edfaa2a5820838fb759eadf57f7cb5cec57fc213ddd8a4298fa079c3c0f472b07fb15aa6a7f0a3780bd296ff6a62e58ef443870b02260bd4fd2bbc98255674b8e1f1f9f8d33c7170b0ebbea4523b695911abbf26e41885344823bd0587115fdd83b721a4e8457a31c9a84b3d3520a07e0e35df7f48e5a9d534d0ec7feef1ff74de6a11e7f93eab95175b6ce22c68d78a642ad642837897ec11349205d8593ac19300207572c38d29ca5dfa03bc14cdbc32153c80e5cc3e739403d34c75915e49beb43094cc6dcafb3665b305ddec9286934ae66ec6b777ca528728c851318eb0f207b39f1caaf96db6eeead6b55ed08f451939314577d42bcc9f97c0b52d0234f88fd07e4c1d7780fdebc025cfffcb572cb27a8c33963"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_5_square(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf02e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad"; - let expected = "d61fe4e3f32ac260915b5b03b78a86d11bfc41d973fce5b0cc59035cf8289a8a2e3878ea15fa46565b0d806e2f85b53873ea20ed653869b688adf83f3ef444535bf91598ff7e80f334fb782539b92f39f55310cc4b35349ab7b278346eda9bc37c0d8acd3557fae38197f412f8d9e57ce6a76b7205c23564cab06e5615be7c6f05c3d05ec690cba91da5e89d55b152ff8dd2157dc5458190025cf94b1ad98f7cbe64e9482faba95e6b33844afc640892872b44a9932096508f4a782a4805323808f23e54b6ff9b841dbfa87db3505ae4f687972c18ea0f0d0af89d36c1c2a5b14560c153c3fee406f5cf15cfd1c0bb45d767426d465f2f14c158495069d0c5955a00150707862ecaae30624ebacdd8ac33e4e6aab3ff90b6ba445a84689386b9e945d01823a65874444316e83767290fcff630d2477f49d5d8ffdd200e08ee1274270f86ed14c687895f6caf5ce528bd970c20d2408a9ba66216324c6a011ac4999098362dbd98a038129a2d40c8da6ab88318aa3046cb660327cc44236d9e5d2163bd0959062195c51ed93d0088b6f92051fc99050ece2538749165976233697ab4b610385366e5ce0b02ad6b61c168ecfbedcdf74278a38de340fd7a5fead8e588e294795f9b011e2e60377a89e25c90e145397cdeabc60fd32444a6b7642a611a83c464d8b8976666351b4865c37b02e6dc21dbcdf5f930341707b618cc0f03c3122646b3385c9df9f2ec730eec9d49e7dfc9153b6e6289da8c4f0ebea9ccc1b751948e3bb7171c9e4d57423b0eeeb79095c030cb52677b3f7e0b45c30f645391f3f9c957afa549c4e0b2465b03c67993cd200b1af01035962edbc4c9e89b31c82ac121987d6529dafdeef67a132dc04b6dc68e77f22862040b75e2ceb9ff16da0fca534e6db7bd12fa7b7f51b6c08c1e23dfcdb7acbd2da0b51c87ffbced065a612e9b1c8bba9b7e2d8d7a2f04fcc4aaf355b60d764879a76b5e16762d5f2f55d585d0c8e82df6940960cddfb72c91dfa71f6b4e1c6ca25dfc39a878e998a663c04fe29d5e83b9586d047b4d7ff70a9f0d44f127e7d741685ca75f11629128d916a0ffef4be586a30c4b70389cc746e84ebf177c01ee8a4511cfbb9d1ecf7f7b33c7dd8177896e10bbc82f838dcd6db7ac67de62bf46b6a640fb580c5d1d2708f3862e3d2b645d0d18e49ef088053e3a220adc0e033c2afcfe61c90e32151152eb3caaf746c5e377d541cafc6cbb0cc0fa48b5caf1728f2e1957f5addfc234f1a9d89e40d49356c9172d0561a695fce6dab1d412321bbf407f63766ffd7b6b3d79bcfa07991c5a9709849c1008689e3b47c50d613980bec239fb64185249d055b30375ccb4354d71fe4d05648fbf6c80634dfc3575f2f24abb714c1e4c95e8896763bf4316e954c7ad19e5780ab7a040ca6fb9271f90a8b22ae738daf6cb"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_5_qube(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf03e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad"; - let expected = "5f9c70ec884926a89461056ad20ac4c30155e817f807e4d3f5bb743d789c83386762435c3627773fa77da5144451f2a8aad8adba88e0b669f5377c5e9bad70e45c86fe952b613f015a9953b8a5de5eaee4566acf98d41e327d93a35bd5cef4607d025e58951167957df4ff9b1627649d3943805472e5e293d3efb687cfd1e503faafeb2840a3e3b3f85d016051a58e1c9498aab72e63b748d834b31eb05d85dcde65e27834e266b85c75cc4ec0135135e0601cb93eeeb6e0010c8ceb65c4c319623c5e573a2c8c9fbbf7df68a930beb412d3f4dfd146175484f45d7afaa0d2e60684af9b34730f7c8438465ad3e1d0c3237336722f2aa51095bd5759f4b8ab4dda111b684aa3dac62a761722e7ae43495b7709933512c81c4e3c9133a51f7ce9f2b51fcec064f65779666960b4e45df3900f54311f5613e8012dd1b8efd359eda31a778264c72aa8bb419d862734d769076bce2810011989a45374e5c5d8729fec21427f0bf397eacbb4220f603cf463a4b0c94efd858ffd9768cd60d6ce68d755e0fbad007ce5c2223d70c7018345a102e4ab3c60a13a9e7794303156d4c2063e919f2153c13961fb324c80b240742f47773a7a8e25b3e3fb19b00ce839346c6eb3c732fbc6b888df0b1fe0a3d07b053a2e9402c267b2d62f794d8a2840526e3ade15ce2264496ccd7519571dfde47f7a4bb16292241c20b2be59f3f8fb4f6383f232d838c5a22d8c95b6834d9d2ca493f5a505ebe8899503b0e8f9b19e6e2dd81c1628b80016d02097e0134de51054c4e7674824d4d758760fc52377d2cad145e259aa2ffaf54139e1a66b1e0c1c191e32ac59474c6b526f5b3ba07d3e5ec286eddf531fcd5292869be58c9f22ef91026159f7cf9d05ef66b4299f4da48cc1635bf2243051d342d378a22c83390553e873713c0454ce5f3234397111ac3fe3207b86f0ed9fc025c81903e1748103692074f83824fda6341be4f95ff00b0a9a208c267e12fa01825054cc0513629bf3dbb56dc5b90d4316f87654a8be18227978ea0a8a522760cad620d0d14fd38920fb7321314062914275a5f99f677145a6979b156bd82ecd36f23f8e1273cc2759ecc0b2c69d94dad5211d1bed939dd87ed9e07b91d49713a6e16ade0a98aea789f04994e318e4ff2c8a188cd8d43aeb52c6daa3bc29b4af50ea82a247c5cd67b573b34cbadcc0a376d3bbd530d50367b42705d870f2e27a8197ef46070528bfe408360faa2ebb8bf76e9f388572842bcb119f4d84ee34ae31f5cc594f23705a49197b181fb78ed1ec99499c690f843a4d0cf2e226d118e9372271054fbabdcc5c92ae9fefaef0589cd0e722eaf30c1703ec4289c7fd81beaa8a455ccee5298e31e2080c10c366a6fcf56f7d13582ad0bcad037c612b710fc595b70fbefaaca23623b60c6c39b11beb8e5843b6b3dac60f"; - bench_modexp(b, input, expected); -} - -#[bench] -fn modexp_5_pow0x10001(b: &mut Bencher) { - let input = "000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000400c5a1611f8be90071a43db23cc2fe01871cc4c0e8ab5743f6378e4fef77f7f6db0095c0727e20225beb665645403453e325ad5f9aeb9ba99bf3c148f63f9c07cf4fe8847ad5242d6b7d4499f93bd47056ddab8f7dee878fc2314f344dbee2a7c41a5d3db91eff372c730c2fdd3a141a4b61999e36d549b9870cf2f4e632c4d5df5f024f81c028000073a0ed8847cfb0593d36a47142f578f05ccbe28c0c06aeb1b1da027794c48db880278f79ba78ae64eedfea3c07d10e0562668d839749dc95f40467d15cf65b9cfc52c7c4bcef1cda3596dd52631aac942f146c7cebd46065131699ce8385b0db1874336747ee020a5698a3d1a1082665721e769567f579830f9d259cec1a836845109c21cf6b25da572512bf3c42fd4b96e43895589042ab60dd41f497db96aec102087fe784165bb45f942859268fd2ff6c012d9d00c02ba83eace047cc5f7b2c392c2955c58a49f0338d6fc58749c9db2155522ac17914ec216ad87f12e0ee95574613942fa615898c4d9e8a3be68cd6afa4e7a003dedbdf8edfee31162b174f965b20ae752ad89c967b3068b6f722c16b354456ba8e280f987c08e0a52d40a2e8f3a59b94d590aeef01879eb7a90b3ee7d772c839c85519cbeaddc0c193ec4874a463b53fcaea3271d80ebfb39b33489365fc039ae549a17a9ff898eea2f4cb27b8dbee4c17b998438575b2b8d107e4a0d66ba7fca85b41a58a8d51f191a35c856dfbe8aef2b00048a694bbccff832d23c8ca7a7ff0b6c0b3011d00b97c86c0628444d267c951d9e4fb8f83e154b8f74fb51aa16535e498235c5597dac9606ed0be3173a3836baa4e7d756ffe1e2879b415d3846bccd538c05b847785699aefde3e305decb600cd8fb0e7d8de5efc26971a6ad4e6d7a2d91474f1023a0ac4b78dc937da0ce607a45974d2cac1c33a2631ff7fe6144a3b2e5cf98b531a9627dea92c1dc82204d09db0439b6a11dd64b484e1263aa45fd9539b6020b55e3baece3986a8bffc1003406348f5c61265099ed43a766ee4f93f5f9c5abbc32a0fd3ac2b35b87f9ec26037d88275bd7dd0a54474995ee34ed3727f3f97c48db544b1980193a4b76a8a3ddab3591ce527f16d91882e67f0103b5cda53f7da54d489fc4ac08b6ab358a5a04aa9daa16219d50bd672a7cb804ed769d218807544e5993f1c27427104b349906a0b654df0bf69328afd3013fbe430155339c39f236df5557bf92f1ded7ff609a8502f49064ec3d1dbfb6c15d3a4c11a4f8acd12278cbf68acd5709463d12e3338a6eddb8c112f199645e23154a8e60879d2a654e3ed9296aa28f134168619691cd2c6b9e2eba4438381676173fc63c2588a3c5910dc149cf3760f0aa9fa9c3f5faa9162b0bf1aac9dd32b706a60ef53cbdb394b6b40222b5bc80eea82ba8958386672564cae3794f977871ab62337cf010001e30049201ec12937e7ce79d0f55d9c810e20acf52212aca1d3888949e0e4830aad88d804161230eb89d4d329cc83570fe257217d2119134048dd2ed167646975fc7d77136919a049ea74cf08ddd2b896890bb24a0ba18094a22baa351bf29ad96c66bbb1a598f2ca391749620e62d61c3561a7d3653ccc8892c7b99baaf76bf836e2991cb06d6bc0514568ff0d1ec8bb4b3d6984f5eaefb17d3ea2893722375d3ddb8e389a8eef7d7d198f8e687d6a513983df906099f9a2d23f4f9dec6f8ef2f11fc0a21fac45353b94e00486f5e17d386af42502d09db33cf0cf28310e049c07e88682aeeb00cb833c5174266e62407a57583f1f88b304b7c6e0c84bbe1c0fd423072d37a5bd0aacf764229e5c7cd02473460ba3645cd8e8ae144065bf02d0dd238593d8e230354f67e0b2f23012c23274f80e3ee31e35e2606a4a3f31d94ab755e6d163cff52cbb36b6d0cc67ffc512aeed1dce4d7a0d70ce82f2baba12e8d514dc92a056f994adfb17b5b9712bd5186f27a2fda1f7039c5df2c8587fdc62f5627580c13234b55be4df3056050e2d1ef3218f0dd66cb05265fe1acfb0989d8213f2c19d1735a7cf3fa65d88dad5af52dc2bba22b7abf46c3bc77b5091baab9e8f0ddc4d5e581037de91a9f8dcbc69309be29cc815cf19a20a7585b8b3073edf51fc9baeb3e509b97fa4ecfd621e0fd57bd61cac1b895c03248ff12bdbc57509250df3517e8a3fe1d776836b34ab352b973d932ef708b14f7418f9eceb1d87667e61e3e758649cb083f01b133d37ab2f5afa96d6c84bcacf4efc3851ad308c1e7d9113624fce29fab460ab9d2a48d92cdb281103a5250ad44cb2ff6e67ac670c02fdafb3e0f1353953d6d7d5646ca1568dea55275a050ec501b7c6250444f7219f1ba7521ba3b93d089727ca5f3bbe0d6c1300b423377004954c5628fdb65770b18ced5c9b23a4a5a6d6ef25fe01b4ce278de0bcc4ed86e28a0a68818ffa40970128cf2c38740e80037984428c1bd5113f40ff47512ee6f4e4d8f9b8e8e1b3040d2928d003bd1c1329dc885302fbce9fa81c23b4dc49c7c82d29b52957847898676c89aa5d32b5b0e1c0d5a2b79a19d67562f407f19425687971a957375879d90c5f57c857136c17106c9ab1b99d80e69c8c954ed386493368884b55c939b8d64d26f643e800c56f90c01079d7c534e3b2b7ae352cefd3016da55f6a85eb803b85e2304915fd2001f77c74e28746293c46e4f5f0fd49cf988aafd0026b8e7a3bab2da5cdce1ea26c2e29ec03f4807fac432662b2d6c060be1c7be0e5489de69d0a6e03a4b9117f9244b34a0f1ecba89884f781c6320412413a00c4980287409a2a78c2cd7e65cecebbe4ec1c28cac4dd95f6998e78fc6f1392384331c9436aa10e10e2bf8ad2c4eafbcf276aa7bae64b74428911b3269c749338b0fc5075ad"; - let expected = "5a0eb2bdf0ac1cae8e586689fa16cd4b07dfdedaec8a110ea1fdb059dd5253231b6132987598dfc6e11f86780428982d50cf68f67ae452622c3b336b537ef3298ca645e8f89ee39a26758206a5a3f6409afc709582f95274b57b71fae5c6b74619ae6f089a5393c5b79235d9caf699d23d88fb873f78379690ad8405e34c19f5257d596580c7a6a7206a3712825afe630c76b31cdb4a23e7f0632e10f14f4e282c81a66451a26f8df2a352b5b9f607a7198449d1b926e27036810368e691a74b91c61afa73d9d3b99453e7c8b50fd4f09c039a2f2feb5c419206694c31b92df1d9586140cb3417b38d0c503c7b508cc2ed12e813a1c795e9829eb39ee78eeaf360a169b491a1d4e419574e712402de9d48d54c1ae5e03739b7156615e8267e1fb0a897f067afd11fb33f6e24182d7aaaaa18fe5bc1982f20d6b871e5a398f0f6f718181d31ec225cfa9a0a70124ed9a70031bdf0c1c7829f708b6e17d50419ef361cf77d99c85f44607186c8d683106b8bd38a49b5d0fb503b397a83388c5678dcfcc737499d84512690701ed621a6f0172aecf037184ddf0f2453e4053024018e5ab2e30d6d5363b56e8b41509317c99042f517247474ab3abc848e00a07f69c254f46f2a05cf6ed84e5cc906a518fdcfdf2c61ce731f24c5264f1a25fc04934dc28aec112134dd523f70115074ca34e3807aa4cb925147f3a0ce152d323bd8c675ace446d0fd1ae30c4b57f0eb2c23884bc18f0964c0114796c5b6d080c3d89175665fbf63a6381a6a9da39ad070b645c8bb1779506da14439a9f5b5d481954764ea114fac688930bc68534d403cff4210673b6a6ff7ae416b7cd41404c3d3f282fcd193b86d0f54d0006c2a503b40d5c3930da980565b8f9630e9493a79d1c03e74e5f93ac8e4dc1a901ec5e3b3e57049124c7b72ea345aa359e782285d9e6a5c144a378111dd02c40855ff9c2be9b48425cb0b2fd62dc8678fd151121cf26a65e917d65d8e0dacfae108eb5508b601fb8ffa370be1f9a8b749a2d12eeab81f41079de87e2d777994fa4d28188c579ad327f9957fb7bdecec5c680844dd43cb57cf87aeb763c003e65011f73f8c63442df39a92b946a6bd968a1c1e4d5fa7d88476a68bd8e20e5b70a99259c7d3f85fb1b65cd2e93972e6264e74ebf289b8b6979b9b68a85cd5b360c1987f87235c3c845d62489e33acf85d53fa3561fe3a3aee18924588d9c6eba4edb7a4d106b31173e42929f6f0c48c80ce6a72d54eca7c0fe870068b7a7c89c63cdda593f5b32d3cb4ea8a32c39f00ab449155757172d66763ed9527019d6de6c9f2416aa6203f4d11c9ebee1e1d3845099e55504446448027212616167eb36035726daa7698b075286f5379cd3e93cb3e0cf4f9cb8d017facbb5550ed32d5ec5400ae57e47e2bf78d1eaeff9480cc765ceff39db500"; - bench_modexp(b, input, expected); -} -- GitLab From 4848c384cd22f35b89690b2b427f2ad9b1db189e Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Mon, 23 Jul 2018 21:48:01 +0800 Subject: [PATCH 166/191] Avoid schedule copying in nested call/create (#9190) * Avoid schedule copying in nested call/create * Fix tests * fix test: wrong Schedule used * Fix private-tx test * Fix jsontests compilation --- ethcore/private-tx/src/lib.rs | 4 +- ethcore/src/client/client.rs | 11 +++- ethcore/src/client/evm_test_client.rs | 4 +- ethcore/src/executive.rs | 90 +++++++++++++++++---------- ethcore/src/externalities.rs | 39 +++++++----- ethcore/src/factory.rs | 6 +- ethcore/src/json_tests/executive.rs | 9 ++- ethcore/src/machine.rs | 3 +- ethcore/src/spec/spec.rs | 4 +- ethcore/src/state/mod.rs | 3 +- ethcore/src/tests/client.rs | 5 +- ethcore/src/tests/evm.rs | 6 +- 12 files changed, 117 insertions(+), 67 deletions(-) diff --git a/ethcore/private-tx/src/lib.rs b/ethcore/private-tx/src/lib.rs index 0700a428ba..a661197dad 100644 --- a/ethcore/private-tx/src/lib.rs +++ b/ethcore/private-tx/src/lib.rs @@ -435,7 +435,9 @@ impl Provider where { let (new_address, _) = ethcore_contract_address(engine.create_address_scheme(env_info.number), &sender, &nonce, &transaction.data); Some(new_address) }); - let result = Executive::new(&mut state, &env_info, engine.machine()).transact_virtual(transaction, options)?; + let machine = engine.machine(); + let schedule = machine.schedule(env_info.number); + let result = Executive::new(&mut state, &env_info, &machine, &schedule).transact_virtual(transaction, options)?; let (encrypted_code, encrypted_storage) = match contract_address { None => bail!(ErrorKind::ContractDoesNotExist), Some(address) => { diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 56c71a86ec..f8990e9c7f 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -616,7 +616,9 @@ impl Importer { ).expect("state known to be available for just-imported block; qed"); let options = TransactOptions::with_no_tracing().dont_check_nonce(); - let res = Executive::new(&mut state, &env_info, self.engine.machine()) + let machine = self.engine.machine(); + let schedule = machine.schedule(env_info.number); + let res = Executive::new(&mut state, &env_info, &machine, &schedule) .transact(&transaction, options); let res = match res { @@ -1232,8 +1234,9 @@ impl Client { .dont_check_nonce() .save_output_from_contract(); let original_state = if state_diff { Some(state.clone()) } else { None }; + let schedule = machine.schedule(env_info.number); - let mut ret = Executive::new(state, env_info, machine).transact_virtual(transaction, options)?; + let mut ret = Executive::new(state, env_info, &machine, &schedule).transact_virtual(transaction, options)?; if let Some(original) = original_state { ret.state_diff = Some(state.diff_from(original).map_err(ExecutionError::from)?); @@ -1486,7 +1489,9 @@ impl Call for Client { let tx = tx.fake_sign(sender); let mut clone = state.clone(); - Ok(Executive::new(&mut clone, &env_info, self.engine.machine()) + let machine = self.engine.machine(); + let schedule = machine.schedule(env_info.number); + Ok(Executive::new(&mut clone, &env_info, &machine, &schedule) .transact_virtual(&tx, options()) .map(|r| r.exception.is_none()) .unwrap_or(false)) diff --git a/ethcore/src/client/evm_test_client.rs b/ethcore/src/client/evm_test_client.rs index f11cae3b0d..ace7617235 100644 --- a/ethcore/src/client/evm_test_client.rs +++ b/ethcore/src/client/evm_test_client.rs @@ -184,7 +184,9 @@ impl<'a> EvmTestClient<'a> { }; let mut substate = state::Substate::new(); let mut output = vec![]; - let mut executive = executive::Executive::new(&mut self.state, &info, self.spec.engine.machine()); + let machine = self.spec.engine.machine(); + let schedule = machine.schedule(info.number); + let mut executive = executive::Executive::new(&mut self.state, &info, &machine, &schedule); executive.call( params, &mut substate, diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index 37dc03dee2..1243eeea3e 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -21,11 +21,11 @@ use hash::keccak; use ethereum_types::{H256, U256, U512, Address}; use bytes::{Bytes, BytesRef}; use state::{Backend as StateBackend, State, Substate, CleanupMode}; -use machine::EthereumMachine as Machine; use error::ExecutionError; +use machine::EthereumMachine as Machine; use evm::{CallType, Finalize, FinalizationResult}; use vm::{ - self, Ext, EnvInfo, CreateContractAddress, ReturnData, CleanDustMode, ActionParams, + self, EnvInfo, CreateContractAddress, ReturnData, CleanDustMode, ActionParams, ActionValue, Schedule, }; use externalities::*; @@ -167,28 +167,31 @@ pub struct Executive<'a, B: 'a> { state: &'a mut State, info: &'a EnvInfo, machine: &'a Machine, + schedule: &'a Schedule, depth: usize, static_flag: bool, } impl<'a, B: 'a + StateBackend> Executive<'a, B> { /// Basic constructor. - pub fn new(state: &'a mut State, info: &'a EnvInfo, machine: &'a Machine) -> Self { + pub fn new(state: &'a mut State, info: &'a EnvInfo, machine: &'a Machine, schedule: &'a Schedule) -> Self { Executive { state: state, info: info, machine: machine, + schedule: schedule, depth: 0, static_flag: false, } } /// Populates executive from parent properties. Increments executive depth. - pub fn from_parent(state: &'a mut State, info: &'a EnvInfo, machine: &'a Machine, parent_depth: usize, static_flag: bool) -> Self { + pub fn from_parent(state: &'a mut State, info: &'a EnvInfo, machine: &'a Machine, schedule: &'a Schedule, parent_depth: usize, static_flag: bool) -> Self { Executive { state: state, info: info, machine: machine, + schedule: schedule, depth: parent_depth + 1, static_flag: static_flag, } @@ -205,7 +208,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { static_call: bool, ) -> Externalities<'any, T, V, B> where T: Tracer, V: VMTracer { let is_static = self.static_flag || static_call; - Externalities::new(self.state, self.info, self.machine, self.depth, origin_info, substate, output, tracer, vm_tracer, is_static) + Externalities::new(self.state, self.info, self.machine, self.schedule, self.depth, origin_info, substate, output, tracer, vm_tracer, is_static) } /// This function should be used to execute transaction. @@ -244,7 +247,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { let sender = t.sender(); let nonce = self.state.nonce(&sender)?; - let schedule = self.machine.schedule(self.info.number); + let schedule = self.schedule; let base_gas_required = U256::from(t.gas_required(&schedule)); if t.gas < base_gas_required { @@ -336,7 +339,6 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { fn exec_vm( &mut self, - schedule: Schedule, params: ActionParams, unconfirmed_substate: &mut Substate, output_policy: OutputPolicy, @@ -350,19 +352,22 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { // Ordinary execution - keep VM in same thread if self.depth != depth_threshold { let vm_factory = self.state.vm_factory(); + let wasm = self.schedule.wasm.is_some(); + trace!(target: "executive", "ext.schedule.have_delegate_call: {}", self.schedule.have_delegate_call); let mut ext = self.as_externalities(OriginInfo::from(¶ms), unconfirmed_substate, output_policy, tracer, vm_tracer, static_call); - trace!(target: "executive", "ext.schedule.have_delegate_call: {}", ext.schedule().have_delegate_call); - let mut vm = vm_factory.create(¶ms, &schedule); + let mut vm = vm_factory.create(¶ms, wasm); return vm.exec(params, &mut ext).finalize(ext); } // Start in new thread with stack size needed up to max depth crossbeam::scope(|scope| { let vm_factory = self.state.vm_factory(); + let max_depth = self.schedule.max_depth; + let wasm = self.schedule.wasm.is_some(); let mut ext = self.as_externalities(OriginInfo::from(¶ms), unconfirmed_substate, output_policy, tracer, vm_tracer, static_call); - scope.builder().stack_size(::std::cmp::max(schedule.max_depth.saturating_sub(depth_threshold) * STACK_SIZE_PER_DEPTH, local_stack_size)).spawn(move || { - let mut vm = vm_factory.create(¶ms, &schedule); + scope.builder().stack_size(::std::cmp::max(max_depth.saturating_sub(depth_threshold) * STACK_SIZE_PER_DEPTH, local_stack_size)).spawn(move || { + let mut vm = vm_factory.create(¶ms, wasm); vm.exec(params, &mut ext).finalize(ext) }).expect("Sub-thread creation cannot fail; the host might run out of resources; qed") }).join() @@ -392,7 +397,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { // backup used in case of running out of gas self.state.checkpoint(); - let schedule = self.machine.schedule(self.info.number); + let schedule = self.schedule; // at first, transfer value to destination if let ActionValue::Transfer(val) = params.value { @@ -479,7 +484,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { let mut subvmtracer = vm_tracer.prepare_subtrace(params.code.as_ref().expect("scope is conditional on params.code.is_some(); qed")); let res = { - self.exec_vm(schedule, params, &mut unconfirmed_substate, OutputPolicy::Return(output, trace_output.as_mut()), &mut subtracer, &mut subvmtracer) + self.exec_vm(params, &mut unconfirmed_substate, OutputPolicy::Return(output, trace_output.as_mut()), &mut subtracer, &mut subvmtracer) }; vm_tracer.done_subtrace(subvmtracer); @@ -552,7 +557,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { let mut unconfirmed_substate = Substate::new(); // create contract and transfer value to it if necessary - let schedule = self.machine.schedule(self.info.number); + let schedule = self.schedule; let nonce_offset = if schedule.no_empty {1} else {0}.into(); let prev_bal = self.state.balance(¶ms.address)?; if let ActionValue::Transfer(val) = params.value { @@ -571,7 +576,6 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { let mut subvmtracer = vm_tracer.prepare_subtrace(params.code.as_ref().expect("two ways into create (Externalities::create and Executive::transact_with_tracer); both place `Some(...)` `code` in `params`; qed")); let res = self.exec_vm( - schedule, params, &mut unconfirmed_substate, OutputPolicy::InitContract(output.as_mut().or(trace_output.as_mut())), @@ -607,7 +611,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { trace: Vec, vm_trace: Option ) -> Result, ExecutionError> { - let schedule = self.machine.schedule(self.info.number); + let schedule = self.schedule; // refunds from SSTORE nonzero -> zero let sstore_refunds = U256::from(schedule.sstore_refund_gas) * substate.sstore_clears_count; @@ -756,10 +760,11 @@ mod tests { state.add_balance(&sender, &U256::from(0x100u64), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.create(params, &mut substate, &mut None, &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -813,10 +818,11 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.create(params, &mut substate, &mut None, &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -855,11 +861,12 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_byzantium_machine(5); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let mut tracer = ExecutiveTracer::default(); let mut vm_tracer = ExecutiveVMTracer::toplevel(); - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let output = BytesRef::Fixed(&mut[0u8;0]); ex.call(params, &mut substate, output, &mut tracer, &mut vm_tracer).unwrap(); @@ -939,12 +946,13 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(5); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let mut tracer = ExecutiveTracer::default(); let mut vm_tracer = ExecutiveVMTracer::toplevel(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let output = BytesRef::Fixed(&mut[0u8;0]); ex.call(params, &mut substate, output, &mut tracer, &mut vm_tracer).unwrap() }; @@ -1055,12 +1063,13 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = ::ethereum::new_byzantium_test_machine(); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let mut tracer = ExecutiveTracer::default(); let mut vm_tracer = ExecutiveVMTracer::toplevel(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let output = BytesRef::Fixed(&mut[0u8;0]); ex.call(params, &mut substate, output, &mut tracer, &mut vm_tracer).unwrap() }; @@ -1127,12 +1136,13 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(5); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let mut tracer = ExecutiveTracer::default(); let mut vm_tracer = ExecutiveVMTracer::toplevel(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.create(params.clone(), &mut substate, &mut None, &mut tracer, &mut vm_tracer).unwrap() }; @@ -1214,10 +1224,11 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.create(params, &mut substate, &mut None, &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -1265,10 +1276,11 @@ mod tests { state.add_balance(&sender, &U256::from(100), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(1024); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.create(params, &mut substate, &mut None, &mut NoopTracer, &mut NoopVMTracer).unwrap(); } @@ -1325,10 +1337,11 @@ mod tests { let info = EnvInfo::default(); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.call(params, &mut substate, BytesRef::Fixed(&mut []), &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -1369,10 +1382,11 @@ mod tests { state.init_code(&address, code).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let FinalizationResult { gas_left, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.call(params, &mut substate, BytesRef::Fixed(&mut []), &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -1402,9 +1416,10 @@ mod tests { let mut info = EnvInfo::default(); info.gas_limit = U256::from(100_000); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let executed = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let opts = TransactOptions::with_no_tracing(); ex.transact(&t, opts).unwrap() }; @@ -1439,9 +1454,10 @@ mod tests { let mut info = EnvInfo::default(); info.gas_limit = U256::from(100_000); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let res = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let opts = TransactOptions::with_no_tracing(); ex.transact(&t, opts) }; @@ -1472,9 +1488,10 @@ mod tests { info.gas_used = U256::from(20_000); info.gas_limit = U256::from(100_000); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let res = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let opts = TransactOptions::with_no_tracing(); ex.transact(&t, opts) }; @@ -1505,9 +1522,10 @@ mod tests { let mut info = EnvInfo::default(); info.gas_limit = U256::from(100_000); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let res = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); let opts = TransactOptions::with_no_tracing(); ex.transact(&t, opts) }; @@ -1538,10 +1556,11 @@ mod tests { state.add_balance(&sender, &U256::from_str("152d02c7e14af6800000").unwrap(), CleanupMode::NoEmpty).unwrap(); let info = EnvInfo::default(); let machine = make_frontier_machine(0); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let result = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.create(params, &mut substate, &mut None, &mut NoopTracer, &mut NoopVMTracer) }; @@ -1571,11 +1590,12 @@ mod tests { params.value = ActionValue::Transfer(U256::zero()); let info = EnvInfo::default(); let machine = ::ethereum::new_byzantium_test_machine(); + let schedule = machine.schedule(info.number); let mut substate = Substate::new(); let mut output = [0u8; 14]; let FinalizationResult { gas_left: result, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.call(params, &mut substate, BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -1618,7 +1638,8 @@ mod tests { let mut output = [0u8; 20]; let FinalizationResult { gas_left: result, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let schedule = machine.schedule(info.number); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.call(params.clone(), &mut Substate::new(), BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer).unwrap() }; @@ -1631,7 +1652,8 @@ mod tests { let mut output = [0u8; 20]; let FinalizationResult { gas_left: result, .. } = { - let mut ex = Executive::new(&mut state, &info, &machine); + let schedule = machine.schedule(info.number); + let mut ex = Executive::new(&mut state, &info, &machine, &schedule); ex.call(params, &mut Substate::new(), BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer).unwrap() }; diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index d315122d56..9aa308a230 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -66,11 +66,11 @@ impl OriginInfo { pub struct Externalities<'a, T: 'a, V: 'a, B: 'a> { state: &'a mut State, env_info: &'a EnvInfo, - machine: &'a Machine, depth: usize, origin_info: OriginInfo, substate: &'a mut Substate, - schedule: Schedule, + machine: &'a Machine, + schedule: &'a Schedule, output: OutputPolicy<'a, 'a>, tracer: &'a mut T, vm_tracer: &'a mut V, @@ -81,9 +81,11 @@ impl<'a, T: 'a, V: 'a, B: 'a> Externalities<'a, T, V, B> where T: Tracer, V: VMTracer, B: StateBackend { /// Basic `Externalities` constructor. - pub fn new(state: &'a mut State, + pub fn new( + state: &'a mut State, env_info: &'a EnvInfo, machine: &'a Machine, + schedule: &'a Schedule, depth: usize, origin_info: OriginInfo, substate: &'a mut Substate, @@ -95,11 +97,11 @@ impl<'a, T: 'a, V: 'a, B: 'a> Externalities<'a, T, V, B> Externalities { state: state, env_info: env_info, - machine: machine, depth: depth, origin_info: origin_info, substate: substate, - schedule: machine.schedule(env_info.number), + machine: machine, + schedule: schedule, output: output, tracer: tracer, vm_tracer: vm_tracer, @@ -170,7 +172,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> }; let mut output = H256::new(); - let mut ex = Executive::new(self.state, self.env_info, self.machine); + let mut ex = Executive::new(self.state, self.env_info, self.machine, self.schedule); let r = ex.call(params, self.substate, BytesRef::Fixed(&mut output), self.tracer, self.vm_tracer); trace!("ext: blockhash contract({}) -> {:?}({}) self.env_info.number={}\n", number, r, output, self.env_info.number); output @@ -226,7 +228,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> } } } - let mut ex = Executive::from_parent(self.state, self.env_info, self.machine, self.depth, self.static_flag); + let mut ex = Executive::from_parent(self.state, self.env_info, self.machine, self.schedule, self.depth, self.static_flag); // TODO: handle internal error separately match ex.create(params, self.substate, &mut None, self.tracer, self.vm_tracer) { @@ -280,7 +282,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> params.value = ActionValue::Transfer(value); } - let mut ex = Executive::from_parent(self.state, self.env_info, self.machine, self.depth, self.static_flag); + let mut ex = Executive::from_parent(self.state, self.env_info, self.machine, self.schedule, self.depth, self.static_flag); match ex.call(params, self.substate, BytesRef::Fixed(output), self.tracer, self.vm_tracer) { Ok(FinalizationResult{ gas_left, return_data, apply_state: true }) => MessageCallResult::Success(gas_left, return_data), @@ -440,6 +442,7 @@ mod tests { struct TestSetup { state: State<::state_db::StateDB>, machine: ::machine::EthereumMachine, + schedule: Schedule, sub_state: Substate, env_info: EnvInfo } @@ -452,11 +455,15 @@ mod tests { impl TestSetup { fn new() -> Self { + let machine = ::spec::Spec::new_test_machine(); + let env_info = get_test_env_info(); + let schedule = machine.schedule(env_info.number); TestSetup { state: get_temp_state(), - machine: ::spec::Spec::new_test_machine(), + schedule: schedule, + machine: machine, sub_state: Substate::new(), - env_info: get_test_env_info() + env_info: env_info, } } } @@ -468,7 +475,7 @@ mod tests { let mut tracer = NoopTracer; let mut vm_tracer = NoopVMTracer; - let ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); assert_eq!(ext.env_info().number, 100); } @@ -480,7 +487,7 @@ mod tests { let mut tracer = NoopTracer; let mut vm_tracer = NoopVMTracer; - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); let hash = ext.blockhash(&"0000000000000000000000000000000000000000000000000000000000120000".parse::().unwrap()); @@ -504,7 +511,7 @@ mod tests { let mut tracer = NoopTracer; let mut vm_tracer = NoopVMTracer; - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); let hash = ext.blockhash(&"0000000000000000000000000000000000000000000000000000000000120000".parse::().unwrap()); @@ -519,7 +526,7 @@ mod tests { let mut tracer = NoopTracer; let mut vm_tracer = NoopVMTracer; - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); let mut output = vec![]; @@ -547,7 +554,7 @@ mod tests { let mut vm_tracer = NoopVMTracer; { - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); ext.log(log_topics, &log_data).unwrap(); } @@ -564,7 +571,7 @@ mod tests { let mut vm_tracer = NoopVMTracer; { - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); ext.suicide(refund_account).unwrap(); } diff --git a/ethcore/src/factory.rs b/ethcore/src/factory.rs index 2eff7d7605..c6b9b0f6dd 100644 --- a/ethcore/src/factory.rs +++ b/ethcore/src/factory.rs @@ -18,7 +18,7 @@ use trie::TrieFactory; use ethtrie::RlpCodec; use account_db::Factory as AccountFactory; use evm::{Factory as EvmFactory, VMType}; -use vm::{Vm, ActionParams, Schedule}; +use vm::{Vm, ActionParams}; use wasm::WasmInterpreter; use keccak_hasher::KeccakHasher; @@ -31,8 +31,8 @@ pub struct VmFactory { } impl VmFactory { - pub fn create(&self, params: &ActionParams, schedule: &Schedule) -> Box { - if schedule.wasm.is_some() && params.code.as_ref().map_or(false, |code| code.len() > 4 && &code[0..4] == WASM_MAGIC_NUMBER) { + pub fn create(&self, params: &ActionParams, wasm: bool) -> Box { + if wasm && params.code.as_ref().map_or(false, |code| code.len() > 4 && &code[0..4] == WASM_MAGIC_NUMBER) { Box::new(WasmInterpreter) } else { self.evm.create(¶ms.gas) diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index daeed18ebf..3fc14be2ad 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -86,6 +86,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> TestExt<'a, T, V, B> state: &'a mut State, info: &'a EnvInfo, machine: &'a Machine, + schedule: &'a Schedule, depth: usize, origin_info: OriginInfo, substate: &'a mut Substate, @@ -97,7 +98,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> TestExt<'a, T, V, B> let static_call = false; Ok(TestExt { nonce: state.nonce(&address)?, - ext: Externalities::new(state, info, machine, depth, origin_info, substate, output, tracer, vm_tracer, static_call), + ext: Externalities::new(state, info, machine, schedule, depth, origin_info, substate, output, tracer, vm_tracer, static_call), callcreates: vec![], sender: address, }) @@ -245,7 +246,7 @@ fn do_json_test_for(vm_type: &VMType, json_data: &[u8] let out_of_gas = vm.out_of_gas(); let mut state = get_temp_state(); state.populate_from(From::from(vm.pre_state.clone())); - let info = From::from(vm.env); + let info: EnvInfo = From::from(vm.env); let machine = { let mut machine = ::ethereum::new_frontier_test_machine(); machine.set_schedule_creation_rules(Box::new(move |s, _| s.max_depth = 1)); @@ -262,10 +263,12 @@ fn do_json_test_for(vm_type: &VMType, json_data: &[u8] // execute let (res, callcreates) = { + let schedule = machine.schedule(info.number); let mut ex = try_fail!(TestExt::new( &mut state, &info, &machine, + &schedule, 0, OriginInfo::from(¶ms), &mut substate, @@ -274,7 +277,7 @@ fn do_json_test_for(vm_type: &VMType, json_data: &[u8] &mut tracer, &mut vm_tracer, )); - let mut evm = vm_factory.create(¶ms, &machine.schedule(0u64.into())); + let mut evm = vm_factory.create(¶ms, schedule.wasm.is_some()); let res = evm.exec(params, &mut ex); // a return in finalize will not alter callcreates let callcreates = ex.callcreates.clone(); diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index dbf66aa121..633f837dc5 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -145,7 +145,8 @@ impl EthereumMachine { call_type: CallType::Call, params_type: ParamsType::Separate, }; - let mut ex = Executive::new(&mut state, &env_info, self); + let schedule = self.schedule(env_info.number); + let mut ex = Executive::new(&mut state, &env_info, self, &schedule); let mut substate = Substate::new(); let mut output = Vec::new(); if let Err(e) = ex.call(params, &mut substate, BytesRef::Flexible(&mut output), &mut NoopTracer, &mut NoopVMTracer) { diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 2b3e1e2656..015755f836 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -631,7 +631,9 @@ impl Spec { let mut substate = Substate::new(); { - let mut exec = Executive::new(&mut state, &env_info, self.engine.machine()); + let machine = self.engine.machine(); + let schedule = machine.schedule(env_info.number); + let mut exec = Executive::new(&mut state, &env_info, &machine, &schedule); if let Err(e) = exec.create(params, &mut substate, &mut None, &mut NoopTracer, &mut NoopVMTracer) { warn!(target: "spec", "Genesis constructor execution at {} failed: {}.", address, e); } diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 0da6142544..796ec0c1d1 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -745,7 +745,8 @@ impl State { fn execute(&mut self, env_info: &EnvInfo, machine: &Machine, t: &SignedTransaction, options: TransactOptions, virt: bool) -> Result, ExecutionError> where T: trace::Tracer, V: trace::VMTracer, { - let mut e = Executive::new(self, env_info, machine); + let schedule = machine.schedule(env_info.number); + let mut e = Executive::new(self, env_info, machine, &schedule); match virt { true => e.transact_virtual(t, options), diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 0b8f2c4fa4..a7629313d1 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -373,8 +373,11 @@ fn transaction_proof() { factories.accountdb = ::account_db::Factory::Plain; // raw state values, no mangled keys. let root = *client.best_block_header().state_root(); + let machine = test_spec.engine.machine(); + let env_info = client.latest_env_info(); + let schedule = machine.schedule(env_info.number); let mut state = State::from_existing(backend, root, 0.into(), factories.clone()).unwrap(); - Executive::new(&mut state, &client.latest_env_info(), test_spec.engine.machine()) + Executive::new(&mut state, &env_info, &machine, &schedule) .transact(&transaction, TransactOptions::with_no_tracing().dont_check_nonce()).unwrap(); assert_eq!(state.balance(&Address::default()).unwrap(), 5.into()); diff --git a/ethcore/src/tests/evm.rs b/ethcore/src/tests/evm.rs index 4f4ad4241f..239905facf 100644 --- a/ethcore/src/tests/evm.rs +++ b/ethcore/src/tests/evm.rs @@ -62,7 +62,8 @@ fn test_blockhash_eip210(factory: Factory) { call_type: CallType::Call, params_type: ParamsType::Separate, }; - let mut ex = Executive::new(&mut state, &env_info, &machine); + let schedule = machine.schedule(env_info.number); + let mut ex = Executive::new(&mut state, &env_info, &machine, &schedule); let mut substate = Substate::new(); let mut output = []; if let Err(e) = ex.call(params, &mut substate, BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer) { @@ -85,7 +86,8 @@ fn test_blockhash_eip210(factory: Factory) { call_type: CallType::Call, params_type: ParamsType::Separate, }; - let mut ex = Executive::new(&mut state, &env_info, &machine); + let schedule = machine.schedule(env_info.number); + let mut ex = Executive::new(&mut state, &env_info, &machine, &schedule); let mut substate = Substate::new(); let mut output = H256::new(); if let Err(e) = ex.call(params, &mut substate, BytesRef::Fixed(&mut output), &mut NoopTracer, &mut NoopVMTracer) { -- GitLab From 1b1941a896c8485a05fa3e9ffe8b251b498eb541 Mon Sep 17 00:00:00 2001 From: Peter Pratscher Date: Tue, 24 Jul 2018 15:04:48 +0200 Subject: [PATCH 167/191] Added --tx-queue-no-early-reject flag to disable early tx queue rejects (#9143) * Added --tx-queue-no-early-reject flag to disable early tx queue rejects because of low gas price * Fixed failing tests, clarified comments and simplified no_early_reject field name. * Added test case for the --tx-queue-no-early-reject flag --- .../private-tx/src/private_transactions.rs | 1 + ethcore/src/miner/miner.rs | 3 ++ miner/src/pool/queue.rs | 12 +++-- miner/src/pool/tests/mod.rs | 47 +++++++++++++++++++ miner/src/pool/verifier.rs | 5 +- parity/cli/mod.rs | 7 +++ parity/cli/tests/config.full.toml | 1 + parity/configuration.rs | 1 + rpc/src/v1/tests/helpers/miner_service.rs | 1 + 9 files changed, 73 insertions(+), 5 deletions(-) diff --git a/ethcore/private-tx/src/private_transactions.rs b/ethcore/private-tx/src/private_transactions.rs index fcc6da514e..e16d6ab911 100644 --- a/ethcore/private-tx/src/private_transactions.rs +++ b/ethcore/private-tx/src/private_transactions.rs @@ -67,6 +67,7 @@ impl Default for VerificationStore { minimal_gas_price: 0.into(), block_gas_limit: 8_000_000.into(), tx_gas_limit: U256::max_value(), + no_early_reject: false }, pool::PrioritizationStrategy::GasPriceOnly, ) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 90d28f44ec..1939d02b11 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -176,6 +176,7 @@ impl Default for MinerOptions { minimal_gas_price: DEFAULT_MINIMAL_GAS_PRICE.into(), block_gas_limit: U256::max_value(), tx_gas_limit: U256::max_value(), + no_early_reject: false, }, } } @@ -283,6 +284,7 @@ impl Miner { minimal_gas_price, block_gas_limit: U256::max_value(), tx_gas_limit: U256::max_value(), + no_early_reject: false, }, reseal_min_period: Duration::from_secs(0), ..Default::default() @@ -1338,6 +1340,7 @@ mod tests { minimal_gas_price: 0.into(), block_gas_limit: U256::max_value(), tx_gas_limit: U256::max_value(), + no_early_reject: false, }, }, GasPricer::new_fixed(0u64.into()), diff --git a/miner/src/pool/queue.rs b/miner/src/pool/queue.rs index 24a56c226a..d110521084 100644 --- a/miner/src/pool/queue.rs +++ b/miner/src/pool/queue.rs @@ -243,11 +243,15 @@ impl TransactionQueue { let options = self.options.read().clone(); let transaction_to_replace = { - let pool = self.pool.read(); - if pool.is_full() { - pool.worst_transaction().map(|worst| (pool.scoring().clone(), worst)) - } else { + if options.no_early_reject { None + } else { + let pool = self.pool.read(); + if pool.is_full() { + pool.worst_transaction().map(|worst| (pool.scoring().clone(), worst)) + } else { + None + } } }; diff --git a/miner/src/pool/tests/mod.rs b/miner/src/pool/tests/mod.rs index 1f69355890..7fd486b0f6 100644 --- a/miner/src/pool/tests/mod.rs +++ b/miner/src/pool/tests/mod.rs @@ -37,6 +37,7 @@ fn new_queue() -> TransactionQueue { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ) @@ -54,6 +55,7 @@ fn should_return_correct_nonces_when_dropped_because_of_limit() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -105,6 +107,7 @@ fn should_never_drop_local_transactions_from_different_senders() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -478,6 +481,7 @@ fn should_prefer_current_transactions_when_hitting_the_limit() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -890,6 +894,7 @@ fn should_include_local_transaction_to_a_full_pool() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -921,6 +926,7 @@ fn should_avoid_verifying_transaction_already_in_pool() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -955,6 +961,7 @@ fn should_avoid_reverifying_recently_rejected_transactions() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -996,6 +1003,7 @@ fn should_reject_early_in_case_gas_price_is_less_than_min_effective() { minimal_gas_price: 1.into(), block_gas_limit: 1_000_000.into(), tx_gas_limit: 1_000_000.into(), + no_early_reject: false, }, PrioritizationStrategy::GasPriceOnly, ); @@ -1020,3 +1028,42 @@ fn should_reject_early_in_case_gas_price_is_less_than_min_effective() { // then assert_eq!(txq.status().status.transaction_count, 1); } + + +#[test] +fn should_not_reject_early_in_case_gas_price_is_less_than_min_effective() { + // given + let txq = TransactionQueue::new( + txpool::Options { + max_count: 1, + max_per_sender: 2, + max_mem_usage: 50 + }, + verifier::Options { + minimal_gas_price: 1.into(), + block_gas_limit: 1_000_000.into(), + tx_gas_limit: 1_000_000.into(), + no_early_reject: true, + }, + PrioritizationStrategy::GasPriceOnly, + ); + // when + let tx1 = Tx::gas_price(2).signed(); + let client = TestClient::new().with_local(&tx1.sender()); + let res = txq.import(client.clone(), vec![tx1.unverified()]); + + // then + assert_eq!(res, vec![Ok(())]); + assert_eq!(txq.status().status.transaction_count, 1); + assert!(client.was_verification_triggered()); + + // when + let tx1 = Tx::gas_price(1).signed(); + let client = TestClient::new().with_local(&tx1.sender()); + let res = txq.import(client.clone(), vec![tx1.unverified()]); + + // then + assert_eq!(res, vec![Ok(())]); + assert_eq!(txq.status().status.transaction_count, 2); + assert!(client.was_verification_triggered()); +} diff --git a/miner/src/pool/verifier.rs b/miner/src/pool/verifier.rs index 4703088ffb..eaa13b3da1 100644 --- a/miner/src/pool/verifier.rs +++ b/miner/src/pool/verifier.rs @@ -43,6 +43,8 @@ pub struct Options { pub block_gas_limit: U256, /// Maximal gas limit for a single transaction. pub tx_gas_limit: U256, + /// Skip checks for early rejection, to make sure that local transactions are always imported. + pub no_early_reject: bool, } #[cfg(test)] @@ -52,6 +54,7 @@ impl Default for Options { minimal_gas_price: 0.into(), block_gas_limit: U256::max_value(), tx_gas_limit: U256::max_value(), + no_early_reject: false, } } } @@ -204,7 +207,7 @@ impl txpool::Verifier for Verifier, tx_queue_ban_time: Option, tx_queue_no_unfamiliar_locals: Option, + tx_queue_no_early_reject: Option, remove_solved: Option, notify_work: Option>, refuse_service_transactions: Option, @@ -1720,6 +1725,7 @@ mod tests { arg_gas_cap: "6283184".into(), arg_extra_data: Some("Parity".into()), flag_tx_queue_no_unfamiliar_locals: false, + flag_tx_queue_no_early_reject: false, arg_tx_queue_size: 8192usize, arg_tx_queue_per_sender: None, arg_tx_queue_mem_limit: 4u32, @@ -1988,6 +1994,7 @@ mod tests { tx_queue_ban_count: None, tx_queue_ban_time: None, tx_queue_no_unfamiliar_locals: None, + tx_queue_no_early_reject: None, tx_gas_limit: None, tx_time_limit: None, extra_data: None, diff --git a/parity/cli/tests/config.full.toml b/parity/cli/tests/config.full.toml index 2dcba6f195..d615996cfc 100644 --- a/parity/cli/tests/config.full.toml +++ b/parity/cli/tests/config.full.toml @@ -134,6 +134,7 @@ tx_queue_ban_time = 180 #s tx_gas_limit = "6283184" tx_time_limit = 100 #ms tx_queue_no_unfamiliar_locals = false +tx_queue_no_early_reject = false extra_data = "Parity" remove_solved = false notify_work = ["http://localhost:3001"] diff --git a/parity/configuration.rs b/parity/configuration.rs index 52bcc40b21..6a40aff3d6 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -570,6 +570,7 @@ impl Configuration { Some(ref d) => to_u256(d)?, None => U256::max_value(), }, + no_early_reject: self.args.flag_tx_queue_no_early_reject, }) } diff --git a/rpc/src/v1/tests/helpers/miner_service.rs b/rpc/src/v1/tests/helpers/miner_service.rs index 7ecd2a4749..a57e5d5f22 100644 --- a/rpc/src/v1/tests/helpers/miner_service.rs +++ b/rpc/src/v1/tests/helpers/miner_service.rs @@ -264,6 +264,7 @@ impl MinerService for TestMinerService { minimal_gas_price: 0x1312d00.into(), block_gas_limit: 5_000_000.into(), tx_gas_limit: 5_000_000.into(), + no_early_reject: false, }, status: txpool::LightStatus { mem_usage: 1_000, -- GitLab From 7d9548400dfd8eddbc82f5ce395a6dbb6a4b1bd8 Mon Sep 17 00:00:00 2001 From: Piotr Chromiec Date: Wed, 25 Jul 2018 12:57:15 +0200 Subject: [PATCH 168/191] Simple build instruction fix (#9215) Changed `parity` dir name into `parity-ethereum` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e49addc97..9355cde7d2 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ sudo snap install parity --edge ```bash # download Parity-Ethereum code $ git clone https://github.com/paritytech/parity-ethereum -$ cd parity +$ cd parity-ethereum # build in release mode $ cargo build --release --features final -- GitLab From 143411aaf0cdd240f546c017f069762f5ad4bc70 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Wed, 25 Jul 2018 14:36:46 +0200 Subject: [PATCH 169/191] deserialize block only once during verification (#9161) --- ethcore/src/client/client.rs | 8 +- ethcore/src/verification/mod.rs | 4 +- ethcore/src/verification/queue/kind.rs | 35 ++++-- ethcore/src/verification/verification.rs | 130 +++++++++++++---------- ethcore/transaction/src/transaction.rs | 8 +- 5 files changed, 113 insertions(+), 72 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index f8990e9c7f..8278b2ca82 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -73,15 +73,14 @@ use transaction::{self, LocalizedTransaction, UnverifiedTransaction, SignedTrans use types::filter::Filter; use types::ancestry_action::AncestryAction; use verification; -use verification::{PreverifiedBlock, Verifier}; -use verification::queue::BlockQueue; +use verification::{PreverifiedBlock, Verifier, BlockQueue}; use views::BlockView; // re-export pub use types::blockchain_info::BlockChainInfo; pub use types::block_status::BlockStatus; pub use blockchain::CacheSize as BlockChainCacheSize; -pub use verification::queue::QueueInfo as BlockQueueInfo; +pub use verification::QueueInfo as BlockQueueInfo; use_contract!(registry, "Registry", "res/contracts/registrar.json"); @@ -371,8 +370,7 @@ impl Importer { &parent, engine, Some(verification::FullFamilyParams { - block_bytes: &block.bytes, - transactions: &block.transactions, + block: &block, block_provider: &**chain, client }), diff --git a/ethcore/src/verification/mod.rs b/ethcore/src/verification/mod.rs index 56cb2ade77..fdb04df864 100644 --- a/ethcore/src/verification/mod.rs +++ b/ethcore/src/verification/mod.rs @@ -16,8 +16,8 @@ //! Block verification utilities. -pub mod verification; -pub mod verifier; +mod verification; +mod verifier; pub mod queue; mod canon_verifier; mod noop_verifier; diff --git a/ethcore/src/verification/queue/kind.rs b/ethcore/src/verification/queue/kind.rs index 2d89f11a33..fbc6346c9c 100644 --- a/ethcore/src/verification/queue/kind.rs +++ b/ethcore/src/verification/queue/kind.rs @@ -72,6 +72,7 @@ pub mod blocks { use error::{Error, ErrorKind, BlockError}; use header::Header; use verification::{PreverifiedBlock, verify_block_basic, verify_block_unordered}; + use transaction::UnverifiedTransaction; use heapsize::HeapSizeOf; use ethereum_types::{H256, U256}; @@ -86,7 +87,7 @@ pub mod blocks { type Verified = PreverifiedBlock; fn create(input: Self::Input, engine: &EthEngine) -> Result { - match verify_block_basic(&input.header, &input.bytes, engine) { + match verify_block_basic(&input, engine) { Ok(()) => Ok(input), Err(Error(ErrorKind::Block(BlockError::TemporarilyInvalid(oob)), _)) => { debug!(target: "client", "Block received too early {}: {:?}", input.hash(), oob); @@ -101,7 +102,7 @@ pub mod blocks { fn verify(un: Self::Unverified, engine: &EthEngine, check_seal: bool) -> Result { let hash = un.hash(); - match verify_block_unordered(un.header, un.bytes, engine, check_seal) { + match verify_block_unordered(un, engine, check_seal) { Ok(verified) => Ok(verified), Err(e) => { warn!(target: "client", "Stage 2 block verification failed for {}: {:?}", hash, e); @@ -113,25 +114,43 @@ pub mod blocks { /// An unverified block. pub struct Unverified { - header: Header, - bytes: Bytes, + /// Unverified block header. + pub header: Header, + /// Unverified block transactions. + pub transactions: Vec, + /// Unverified block uncles. + pub uncles: Vec

, + /// Raw block bytes. + pub bytes: Bytes, } impl Unverified { /// Create an `Unverified` from raw bytes. pub fn from_rlp(bytes: Bytes) -> Result { + use rlp::Rlp; + let (header, transactions, uncles) = { + let rlp = Rlp::new(&bytes); + let header = rlp.val_at(0)?; + let transactions = rlp.list_at(1)?; + let uncles = rlp.list_at(2)?; + (header, transactions, uncles) + }; - let header = ::rlp::Rlp::new(&bytes).val_at(0)?; Ok(Unverified { - header: header, - bytes: bytes, + header, + transactions, + uncles, + bytes, }) } } impl HeapSizeOf for Unverified { fn heap_size_of_children(&self) -> usize { - self.header.heap_size_of_children() + self.bytes.heap_size_of_children() + self.header.heap_size_of_children() + + self.transactions.heap_size_of_children() + + self.uncles.heap_size_of_children() + + self.bytes.heap_size_of_children() } } diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index ebb8e79a70..a021013543 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -25,7 +25,6 @@ use std::collections::HashSet; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use bytes::Bytes; -use ethereum_types::H256; use hash::keccak; use heapsize::HeapSizeOf; use rlp::Rlp; @@ -37,8 +36,8 @@ use client::{BlockInfo, CallContract}; use engines::EthEngine; use error::{BlockError, Error}; use header::{BlockNumber, Header}; -use transaction::{SignedTransaction, UnverifiedTransaction}; -use views::BlockView; +use transaction::SignedTransaction; +use verification::queue::kind::blocks::Unverified; /// Preprocessed block data gathered in `verify_block_unordered` call pub struct PreverifiedBlock { @@ -46,6 +45,8 @@ pub struct PreverifiedBlock { pub header: Header, /// Populated block transactions pub transactions: Vec, + /// Populated block uncles + pub uncles: Vec
, /// Block bytes pub bytes: Bytes, } @@ -59,63 +60,66 @@ impl HeapSizeOf for PreverifiedBlock { } /// Phase 1 quick block verification. Only does checks that are cheap. Operates on a single block -pub fn verify_block_basic(header: &Header, bytes: &[u8], engine: &EthEngine) -> Result<(), Error> { - verify_header_params(&header, engine, true)?; - verify_block_integrity(bytes, &header.transactions_root(), &header.uncles_hash())?; - engine.verify_block_basic(&header)?; - for u in Rlp::new(bytes).at(2)?.iter().map(|rlp| rlp.as_val::
()) { - let u = u?; - verify_header_params(&u, engine, false)?; - engine.verify_block_basic(&u)?; +pub fn verify_block_basic(block: &Unverified, engine: &EthEngine) -> Result<(), Error> { + verify_header_params(&block.header, engine, true)?; + verify_block_integrity(block)?; + engine.verify_block_basic(&block.header)?; + + for uncle in &block.uncles { + verify_header_params(uncle, engine, false)?; + engine.verify_block_basic(uncle)?; } - for t in Rlp::new(bytes).at(1)?.iter().map(|rlp| rlp.as_val::()) { - engine.verify_transaction_basic(&t?, &header)?; + for t in &block.transactions { + engine.verify_transaction_basic(t, &block.header)?; } + Ok(()) } /// Phase 2 verification. Perform costly checks such as transaction signatures and block nonce for ethash. /// Still operates on a individual block /// Returns a `PreverifiedBlock` structure populated with transactions -pub fn verify_block_unordered(header: Header, bytes: Bytes, engine: &EthEngine, check_seal: bool) -> Result { +pub fn verify_block_unordered(block: Unverified, engine: &EthEngine, check_seal: bool) -> Result { + let header = block.header; if check_seal { engine.verify_block_unordered(&header)?; - for u in Rlp::new(&bytes).at(2)?.iter().map(|rlp| rlp.as_val::
()) { - engine.verify_block_unordered(&u?)?; + for uncle in &block.uncles { + engine.verify_block_unordered(uncle)?; } } // Verify transactions. - let mut transactions = Vec::new(); let nonce_cap = if header.number() >= engine.params().dust_protection_transition { Some((engine.params().nonce_cap_increment * header.number()).into()) - } else { None }; - { - let v = view!(BlockView, &bytes); - for t in v.transactions() { + } else { + None + }; + + let transactions = block.transactions + .into_iter() + .map(|t| { let t = engine.verify_transaction_unordered(t, &header)?; if let Some(max_nonce) = nonce_cap { if t.nonce >= max_nonce { return Err(BlockError::TooManyTransactions(t.sender()).into()); } } - transactions.push(t); - } - } + Ok(t) + }) + .collect::, Error>>()?; + Ok(PreverifiedBlock { - header: header, - transactions: transactions, - bytes: bytes, + header, + transactions, + uncles: block.uncles, + bytes: block.bytes, }) } /// Parameters for full verification of block family pub struct FullFamilyParams<'a, C: BlockInfo + CallContract + 'a> { - /// Serialized block bytes - pub block_bytes: &'a [u8], - - /// Signed transactions - pub transactions: &'a [SignedTransaction], + /// Preverified block + pub block: &'a PreverifiedBlock, /// Block provider to use during verification pub block_provider: &'a BlockProvider, @@ -135,17 +139,18 @@ pub fn verify_block_family(header: &Header, parent: None => return Ok(()), }; - verify_uncles(header, params.block_bytes, params.block_provider, engine)?; + verify_uncles(params.block, params.block_provider, engine)?; - for transaction in params.transactions { - engine.machine().verify_transaction(transaction, header, params.client)?; + for tx in ¶ms.block.transactions { + engine.machine().verify_transaction(tx, header, params.client)?; } Ok(()) } -fn verify_uncles(header: &Header, bytes: &[u8], bc: &BlockProvider, engine: &EthEngine) -> Result<(), Error> { - let num_uncles = Rlp::new(bytes).at(2)?.item_count()?; +fn verify_uncles(block: &PreverifiedBlock, bc: &BlockProvider, engine: &EthEngine) -> Result<(), Error> { + let header = &block.header; + let num_uncles = block.uncles.len(); let max_uncles = engine.maximum_uncle_count(header.number()); if num_uncles != 0 { if num_uncles > max_uncles { @@ -174,8 +179,7 @@ fn verify_uncles(header: &Header, bytes: &[u8], bc: &BlockProvider, engine: &Eth } let mut verified = HashSet::new(); - for uncle in Rlp::new(bytes).at(2)?.iter().map(|rlp| rlp.as_val::
()) { - let uncle = uncle?; + for uncle in &block.uncles { if excluded.contains(&uncle.hash()) { return Err(From::from(BlockError::UncleInChain(uncle.hash()))) } @@ -332,16 +336,22 @@ fn verify_parent(header: &Header, parent: &Header, engine: &EthEngine) -> Result } /// Verify block data against header: transactions root and uncles hash. -fn verify_block_integrity(block: &[u8], transactions_root: &H256, uncles_hash: &H256) -> Result<(), Error> { - let block = Rlp::new(block); - let tx = block.at(1)?; - let expected_root = &ordered_trie_root(tx.iter().map(|r| r.as_raw())); - if expected_root != transactions_root { - return Err(From::from(BlockError::InvalidTransactionsRoot(Mismatch { expected: expected_root.clone(), found: transactions_root.clone() }))) - } - let expected_uncles = &keccak(block.at(2)?.as_raw()); - if expected_uncles != uncles_hash { - return Err(From::from(BlockError::InvalidUnclesHash(Mismatch { expected: expected_uncles.clone(), found: uncles_hash.clone() }))) +fn verify_block_integrity(block: &Unverified) -> Result<(), Error> { + let block_rlp = Rlp::new(&block.bytes); + let tx = block_rlp.at(1)?; + let expected_root = ordered_trie_root(tx.iter().map(|r| r.as_raw())); + if &expected_root != block.header.transactions_root() { + bail!(BlockError::InvalidTransactionsRoot(Mismatch { + expected: expected_root, + found: *block.header.transactions_root(), + })); + } + let expected_uncles = keccak(block_rlp.at(2)?.as_raw()); + if &expected_uncles != block.header.uncles_hash(){ + bail!(BlockError::InvalidUnclesHash(Mismatch { + expected: expected_uncles, + found: *block.header.uncles_hash(), + })); } Ok(()) } @@ -366,6 +376,7 @@ mod tests { use types::log_entry::{LogEntry, LocalizedLogEntry}; use rlp; use triehash::ordered_trie_root; + use views::BlockView; fn check_ok(result: Result<(), Error>) { result.unwrap_or_else(|e| panic!("Block verification failed: {:?}", e)); @@ -486,8 +497,8 @@ mod tests { } fn basic_test(bytes: &[u8], engine: &EthEngine) -> Result<(), Error> { - let header = view!(BlockView, bytes).header(); - verify_block_basic(&header, bytes, engine) + let unverified = Unverified::from_rlp(bytes.to_vec())?; + verify_block_basic(&unverified, engine) } fn family_test(bytes: &[u8], engine: &EthEngine, bc: &BC) -> Result<(), Error> where BC: BlockProvider { @@ -507,18 +518,25 @@ mod tests { .ok_or(BlockError::UnknownParent(header.parent_hash().clone()))? .decode()?; + let block = PreverifiedBlock { + header, + transactions, + uncles: view.uncles(), + bytes: bytes.to_vec(), + }; + let full_params = FullFamilyParams { - block_bytes: bytes, - transactions: &transactions[..], + block: &block, block_provider: bc as &BlockProvider, client: &client, }; - verify_block_family(&header, &parent, engine, Some(full_params)) + verify_block_family(&block.header, &parent, engine, Some(full_params)) } fn unordered_test(bytes: &[u8], engine: &EthEngine) -> Result<(), Error> { - let header = view!(BlockView, bytes).header(); - verify_block_unordered(header, bytes.to_vec(), engine, false)?; + use verification::queue::kind::blocks::Unverified; + let un = Unverified::from_rlp(bytes.to_vec())?; + verify_block_unordered(un, engine, false)?; Ok(()) } diff --git a/ethcore/transaction/src/transaction.rs b/ethcore/transaction/src/transaction.rs index 27b8b346cf..49804f1870 100644 --- a/ethcore/transaction/src/transaction.rs +++ b/ethcore/transaction/src/transaction.rs @@ -282,6 +282,12 @@ pub struct UnverifiedTransaction { hash: H256, } +impl HeapSizeOf for UnverifiedTransaction { + fn heap_size_of_children(&self) -> usize { + self.unsigned.heap_size_of_children() + } +} + impl Deref for UnverifiedTransaction { type Target = Transaction; @@ -436,7 +442,7 @@ pub struct SignedTransaction { impl HeapSizeOf for SignedTransaction { fn heap_size_of_children(&self) -> usize { - self.transaction.unsigned.heap_size_of_children() + self.transaction.heap_size_of_children() } } -- GitLab From 2ce15f429bd44a85b2c67c0756e5dd99e80dee02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Wed, 25 Jul 2018 16:40:33 +0100 Subject: [PATCH 170/191] ethcore: update bn version (#9217) --- Cargo.lock | 79 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2192318166..6ecec53882 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,7 +76,7 @@ name = "base64" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -85,7 +85,7 @@ name = "base64" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -94,7 +94,7 @@ name = "bincode" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -131,7 +131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "blooms-db" version = "0.1.0" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethbloom 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -141,15 +141,16 @@ dependencies = [ [[package]] name = "bn" version = "0.4.4" -source = "git+https://github.com/paritytech/bn#964b48fad5dffbaa124c2f10699e76faf5846c4e" +source = "git+https://github.com/paritytech/bn#2a71dbde5ca93451c8da2135767896a64483759e" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "byteorder" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -157,7 +158,7 @@ name = "bytes" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -217,6 +218,14 @@ dependencies = [ "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cmake" version = "0.1.31" @@ -310,6 +319,11 @@ name = "crunchy" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "crunchy" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ct-logs" version = "0.2.0" @@ -483,7 +497,7 @@ dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "blooms-db 0.1.0", "bn 0.4.4 (git+https://github.com/paritytech/bn)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "common-types 0.1.0", "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -747,7 +761,7 @@ dependencies = [ name = "ethcore-secretstore" version = "1.0.0" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-contract 5.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -904,7 +918,7 @@ dependencies = [ name = "ethkey" version = "0.3.0" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "edit-distance 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2215,7 +2229,7 @@ name = "parity-wasm" version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2223,7 +2237,7 @@ name = "parity-whisper" version = "0.1.0" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-network 1.12.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", @@ -2476,7 +2490,7 @@ name = "pwasm-utils" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2513,6 +2527,23 @@ dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rayon" version = "1.0.1" @@ -2601,7 +2632,7 @@ name = "rlp" version = "0.2.1" source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3309,7 +3340,7 @@ name = "uint" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3426,7 +3457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "vm" version = "0.1.0" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "common-types 0.1.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", @@ -3447,7 +3478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "wasm" version = "0.1.0" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-logger 1.12.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3463,7 +3494,7 @@ name = "wasmi" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "nan-preserving-float 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3539,7 +3570,7 @@ name = "ws" version = "0.7.5" source = "git+https://github.com/tomusdrw/ws-rs#f12d19c4c19422fc79af28a3181f598bc07ecd1e" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3599,13 +3630,14 @@ dependencies = [ "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" "checksum bn 0.4.4 (git+https://github.com/paritytech/bn)" = "" -"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" +"checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9" "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" "checksum cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "49ec142f5768efb5b7622aebc3fdbdbb8950a4b9ba996393cb76ef7466e8747d" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6" "checksum cid 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d85ee025368e69063c420cbb2ed9f852cb03a5e69b73be021e65726ce03585b6" "checksum clap 2.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f4a2b3bb7ef3c672d7c13d15613211d5a6976b6892c598b0fcb5d40765f19c2" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3" "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" @@ -3615,6 +3647,7 @@ dependencies = [ "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" +"checksum crunchy 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c240f247c278fa08a6d4820a6a222bfc6e0d999e51ba67be94f44c905b2161f2" "checksum ct-logs 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61cd11fb222fecf889f4531855c614548e92e8bd2eb178e35296885df5ee9a7c" "checksum ctrlc 1.1.1 (git+https://github.com/paritytech/rust-ctrlc.git)" = "" "checksum daemonize 0.2.3 (git+https://github.com/paritytech/daemonize)" = "" @@ -3752,6 +3785,8 @@ dependencies = [ "checksum quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0ff51282f28dc1b53fd154298feaa2e77c5ea0dba68e1fd8b03b72fbe13d2a" "checksum rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)" = "512870020642bb8c221bf68baa1b2573da814f6ccfe5c9699b1c303047abe9b1" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" +"checksum rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "12397506224b2f93e6664ffc4f664b29be8208e5157d3d90b44f09b5fae470ea" +"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" "checksum rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80e811e76f1dbf68abf87a759083d34600017fc4e10b6bd5ad84a700f9dba4b1" "checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" -- GitLab From 823054dc34efdccfef656733bc67efecba021394 Mon Sep 17 00:00:00 2001 From: EOS Classic Date: Thu, 26 Jul 2018 01:06:45 +0900 Subject: [PATCH 171/191] [Chain] Add more bootnodes (#9174) + For ETC, ELLA, EXP, Morden, MUSIC --- ethcore/res/ethereum/classic.json | 4 +++- ethcore/res/ethereum/ellaism.json | 3 ++- ethcore/res/ethereum/expanse.json | 1 + ethcore/res/ethereum/morden.json | 10 +++++++++- ethcore/res/ethereum/musicoin.json | 10 +++++++++- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ethcore/res/ethereum/classic.json b/ethcore/res/ethereum/classic.json index 602c05cd3b..17cdfd300d 100644 --- a/ethcore/res/ethereum/classic.json +++ b/ethcore/res/ethereum/classic.json @@ -3077,7 +3077,9 @@ "enode://72e445f4e89c0f476d404bc40478b0df83a5b500d2d2e850e08eb1af0cd464ab86db6160d0fde64bd77d5f0d33507ae19035671b3c74fec126d6e28787669740@104.198.71.200:30303", "enode://39abab9d2a41f53298c0c9dc6bbca57b0840c3ba9dccf42aa27316addc1b7e56ade32a0a9f7f52d6c5db4fe74d8824bcedfeaecf1a4e533cacb71cf8100a9442@144.76.238.49:30303", "enode://f50e675a34f471af2438b921914b5f06499c7438f3146f6b8936f1faeb50b8a91d0d0c24fb05a66f05865cd58c24da3e664d0def806172ddd0d4c5bdbf37747e@144.76.238.49:30306", - "enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@159.89.223.6:30303" + "enode://83b33409349ffa25e150555f7b4f8deebc68f3d34d782129dc3c8ba07b880c209310a4191e1725f2f6bef59bce9452d821111eaa786deab08a7e6551fca41f4f@159.89.223.6:30303", + "enode://5cd218959f8263bc3721d7789070806b0adff1a0ed3f95ec886fb469f9362c7507e3b32b256550b9a7964a23a938e8d42d45a0c34b332bfebc54b29081e83b93@35.187.57.94:30303", + "enode://6dd3ac8147fa82e46837ec8c3223d69ac24bcdbab04b036a3705c14f3a02e968f7f1adfcdb002aacec2db46e625c04bf8b5a1f85bb2d40a479b3cc9d45a444af@104.237.131.102:30303" ], "accounts": { "0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, diff --git a/ethcore/res/ethereum/ellaism.json b/ethcore/res/ethereum/ellaism.json index c3107bbe46..41f08e7557 100644 --- a/ethcore/res/ethereum/ellaism.json +++ b/ethcore/res/ethereum/ellaism.json @@ -59,7 +59,8 @@ "enode://5dd35866da95aea15211fb1f98684f6e8c4e355e6aa3cc17585680ed53fa164477b8c52cb6ca4b24ec4d80f3d48ff9212b53feb131d825c7945a3abaaf02d24d@178.79.189.58:60606", "enode://6c585c18024eb902ca093278af73b04863ac904caabc39ac2920c23532307c572ad92afd828a990c980d272b1f26307f2409cc97aec3ff9fe866732cae49a8c2@144.217.163.224:31337", "enode://edd90c4cc64528802ad52fd127d80b641ff80fd43fa5292fb111c8bd2914482dffee288fd1b0d26440c6b2c669b10a53cbcd37c895ba0d6194110e100a965b2d@188.166.179.159:30303", - "enode://9d960373335c1cc38ca696dea8f2893e2a071c8f21524f21e8aae22be032acc3b67797b1d21e866f9d832943ae7d9555b8466c6ab34f473d21e547114952df37@213.32.53.183:30303" + "enode://9d960373335c1cc38ca696dea8f2893e2a071c8f21524f21e8aae22be032acc3b67797b1d21e866f9d832943ae7d9555b8466c6ab34f473d21e547114952df37@213.32.53.183:30303", + "enode://5120308ebf25261c8423866a3a082e8d0f31106343d8b3b6c4dfe9d41bd900f5e03c64356ba51b6d343a951846a3f5ede5c5dd05925eaea4e4b9c35b1be9237c@95.53.247.188:30303" ], "accounts": { "0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, diff --git a/ethcore/res/ethereum/expanse.json b/ethcore/res/ethereum/expanse.json index 2061231c60..99a3ab5d78 100644 --- a/ethcore/res/ethereum/expanse.json +++ b/ethcore/res/ethereum/expanse.json @@ -65,6 +65,7 @@ "enode://96d3919b903e7f5ad59ac2f73c43be9172d9d27e2771355db03fd194732b795829a31fe2ea6de109d0804786c39a807e155f065b4b94c6fce167becd0ac02383@45.55.22.34:42786", "enode://5f6c625bf287e3c08aad568de42d868781e961cbda805c8397cfb7be97e229419bef9a5a25a75f97632787106bba8a7caf9060fab3887ad2cfbeb182ab0f433f@46.101.182.53:42786", "enode://d33a8d4c2c38a08971ed975b750f21d54c927c0bf7415931e214465a8d01651ecffe4401e1db913f398383381413c78105656d665d83f385244ab302d6138414@128.199.183.48:42786", + "enode://df872f81e25f72356152b44cab662caf1f2e57c3a156ecd20e9ac9246272af68a2031b4239a0bc831f2c6ab34733a041464d46b3ea36dce88d6c11714446e06b@178.62.208.109:42786", "enode://f6f0d6b9b7d02ec9e8e4a16e38675f3621ea5e69860c739a65c1597ca28aefb3cec7a6d84e471ac927d42a1b64c1cbdefad75e7ce8872d57548ddcece20afdd1@159.203.64.95:42786" ], "accounts": { diff --git a/ethcore/res/ethereum/morden.json b/ethcore/res/ethereum/morden.json index b61799c0c9..3664c3e9c2 100644 --- a/ethcore/res/ethereum/morden.json +++ b/ethcore/res/ethereum/morden.json @@ -55,7 +55,15 @@ "enode://fd008499e9c4662f384b3cff23438879d31ced24e2d19504c6389bc6da6c882f9c2f8dbed972f7058d7650337f54e4ba17bb49c7d11882dd1731d26a6e62e3cb@35.187.57.94:30304", "enode://30a1fd71f28aa6f66fe662af9ecc75f0a6980f06b71598f2b19d3dda04223fc0e53b47e40c9171d5014e9f5b59d9954de125782da592f5d95ea39066e2591d5d@104.237.131.102:30304", "enode://7909d51011d8a153351169f21d3a7bbedb3be1e17d38c1f2fad06504dd5aa07a00f00845835d535fe702bf379c4d7209a51f4d1b723e0ca8b8732bd21fba3b30@139.162.133.42:30303", - "enode://a088dfb2f5305be9232e8071c5535f13718a4017e247a0b35074b807d43d99e022880c27302cdb5b1e98ad34c083dbbb483f2b17bdc66149bad037154d6ace96@139.162.127.72:30303" + "enode://a088dfb2f5305be9232e8071c5535f13718a4017e247a0b35074b807d43d99e022880c27302cdb5b1e98ad34c083dbbb483f2b17bdc66149bad037154d6ace96@139.162.127.72:30303", + "enode://1fac84e8fe252d63764563f4f526323393b52aaaf832693f7a8a1637f6920311d7d04a7cb91945273e6c644d5c3b01a6bf8a172ae653c918e1bf8eb79e7e6baf@94.152.212.32:40404", + "enode://3666177e0e2e56bebaef318c8ba4aed3d05ce788df1eb0e48b79fce40fcf3445feb4ccc4ce2fd4aadc3c146858e276bdef1cb63437215f17e6e5dd8c41403427@144.202.23.122:30303", + "enode://3666177e0e2e56bebaef318c8ba4aed3d05ce788df1eb0e48b79fce40fcf3445feb4ccc4ce2fd4aadc3c146858e276bdef1cb63437215f17e6e5dd8c41403427@45.76.16.230:30303", + "enode://78d8897b376e549c2b47664e4c81fd023b089d0a417275731760739b7f98dd639d632bb7b75e92606c7d6abbbe96f69f06d85e0a41a143f1f0a3c55ff2b1d732@144.202.101.214:30303", + "enode://a329e2399e6d72009690faa15a82ae13ef2015bc5e72ffb22f92ea83cf3bfc9ce45d43c38b3c2289c148939d3911e9d1a9e940f41698dba54508b59489072b2a@5.135.157.4:30303", + "enode://d79b12fc48a494ba7053bbc30cbe510060ebb3a2ce9bb4f88076303e97e31e2af263c61e797af0af20419b7268b2bfb2d2f196b57242a454035ecb6001cc69a2@94.23.49.75:30303", + "enode://f4a1805a51cfdf5afdddf0b43b8d4b687657497311797464046dce65388b9e5a538b55bdb23ae4eac54485a81d47adad48731294efc9d73fbc9f297f625aec70@198.27.80.32:30303", + "enode://f570df80b5589dfb0a7657adb62b93dc55e76d491694d8965c6382964e6f397ae0b8c3548ef0a108151f3b1485c75769ff203df2db7ace385ee98fdb2766ba3b@86.8.233.254:30303" ], "accounts": { "0000000000000000000000000000000000000001": { "balance": "1", "nonce": "1048576", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, diff --git a/ethcore/res/ethereum/musicoin.json b/ethcore/res/ethereum/musicoin.json index 724f11478b..f9c4e046d6 100644 --- a/ethcore/res/ethereum/musicoin.json +++ b/ethcore/res/ethereum/musicoin.json @@ -62,7 +62,15 @@ "enode://b58c0c71f08864c0cf7fa9dea2c4cbefae5ae7a36cc30d286603b24982d25f3ccc056b589119324c51768fc2054b8c529ecf682e06e1e9980170b93ff194ed7a@132.148.132.9:30303", "enode://d302f52c8789ad87ee528f1431a67f1aa646c9bec17babb4665dfb3d61de5b9119a70aa77b2147a5f28854092ba09769323c1c552a6ac6f6a34cbcf767e2d2fe@158.69.248.48:30303", "enode://c72564bce8331ae298fb8ece113a456e3927d7e5989c2be3e445678b3600579f722410ef9bbfe339335d676af77343cb21b5b1703b7bebc32be85fce937a2220@191.252.185.71:30303", - "enode://e3ae4d25ee64791ff98bf17c37acf90933359f2505c00f65c84f6863231a32a94153cadb0a462e428f18f35ded6bd91cd91033d26576a28558c22678be9cfaee@5.63.158.137:35555" + "enode://e3ae4d25ee64791ff98bf17c37acf90933359f2505c00f65c84f6863231a32a94153cadb0a462e428f18f35ded6bd91cd91033d26576a28558c22678be9cfaee@5.63.158.137:35555", + "enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303", + "enode://3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99@13.93.211.84:30303", + "enode://78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d@191.235.84.50:30303", + "enode://158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6@13.75.154.138:30303", + "enode://1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082@52.74.57.123:30303", + "enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303", + "enode://d302f52c8789ad87ee528f1431a67f1aa646c9bec17babb4665dfb3d61de5b9119a70aa77b2147a5f28854092ba09769323c1c552a6ac6f6a34cbcf767e2d2fe@158.69.248.48:30303", + "enode://c72564bce8331ae298fb8ece113a456e3927d7e5989c2be3e445678b3600579f722410ef9bbfe339335d676af77343cb21b5b1703b7bebc32be85fce937a2220@191.252.185.71:30303" ], "accounts":{ "0000000000000000000000000000000000000001":{ -- GitLab From 5795d332c8d6bd4bac38177f314a36994c32ed57 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 26 Jul 2018 00:45:06 +0800 Subject: [PATCH 172/191] Insert PROOF messages for some cases in blockchain (#9141) * Insert PROOF messages for some cases in blockchain * Break expect to its own line to avoid things being too long * Be more specific for all low-level database error cases * Fix BranchBecomingCanonChain expect * ethcore: fix typo in expect proof message --- ethcore/src/blockchain/blockchain.rs | 37 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/ethcore/src/blockchain/blockchain.rs b/ethcore/src/blockchain/blockchain.rs index b2ba886b4d..5977a0a81d 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -270,7 +270,7 @@ impl BlockProvider for BlockChain { // Read from DB and populate cache let b = self.db.key_value().get(db::COL_HEADERS, hash) - .expect("Low level database error. Some issue with disk?")?; + .expect("Low level database error when fetching block header data. Some issue with disk?")?; let header = encoded::Header::new(decompress(&b, blocks_swapper()).into_vec()); let mut write = self.block_headers.write(); @@ -300,7 +300,7 @@ impl BlockProvider for BlockChain { // Read from DB and populate cache let b = self.db.key_value().get(db::COL_BODIES, hash) - .expect("Low level database error. Some issue with disk?")?; + .expect("Low level database error when fetching block body data. Some issue with disk?")?; let body = encoded::Body::new(decompress(&b, blocks_swapper()).into_vec()); let mut write = self.block_bodies.write(); @@ -346,7 +346,7 @@ impl BlockProvider for BlockChain { I: Iterator { self.db.blooms() .filter(from_block, to_block, blooms) - .expect("Low level database error. Some issue with disk?") + .expect("Low level database error when searching blooms. Some issue with disk?") } /// Returns logs matching given filter. The order of logs returned will be the same as the order of the blocks @@ -536,7 +536,9 @@ impl BlockChain { }; // load best block - let best_block_hash = match bc.db.key_value().get(db::COL_EXTRA, b"best").unwrap() { + let best_block_hash = match bc.db.key_value().get(db::COL_EXTRA, b"best") + .expect("Low-level database error when fetching 'best' block. Some issue with disk?") + { Some(best) => { H256::from_slice(&best) } @@ -564,15 +566,18 @@ impl BlockChain { batch.write(db::COL_EXTRA, &header.number(), &hash); batch.put(db::COL_EXTRA, b"best", &hash); - bc.db.key_value().write(batch).expect("Low level database error. Some issue with disk?"); + bc.db.key_value().write(batch).expect("Low level database error when fetching 'best' block. Some issue with disk?"); hash } }; { // Fetch best block details - let best_block_total_difficulty = bc.block_details(&best_block_hash).unwrap().total_difficulty; - let best_block_rlp = bc.block(&best_block_hash).unwrap(); + let best_block_total_difficulty = bc.block_details(&best_block_hash) + .expect("Best block is from a known block hash; a known block hash always comes with a known block detail; qed") + .total_difficulty; + let best_block_rlp = bc.block(&best_block_hash) + .expect("Best block is from a known block hash; qed"); // and write them let mut best_block = bc.best_block.write(); @@ -586,8 +591,12 @@ impl BlockChain { { let best_block_number = bc.best_block.read().header.number(); // Fetch first and best ancient block details - let raw_first = bc.db.key_value().get(db::COL_EXTRA, b"first").unwrap().map(|v| v.into_vec()); - let mut best_ancient = bc.db.key_value().get(db::COL_EXTRA, b"ancient").unwrap().map(|h| H256::from_slice(&h)); + let raw_first = bc.db.key_value().get(db::COL_EXTRA, b"first") + .expect("Low level database error when fetching 'first' block. Some issue with disk?") + .map(|v| v.into_vec()); + let mut best_ancient = bc.db.key_value().get(db::COL_EXTRA, b"ancient") + .expect("Low level database error when fetching 'best ancient' block. Some issue with disk?") + .map(|h| H256::from_slice(&h)); let best_ancient_number; if best_ancient.is_none() && best_block_number > 1 && bc.block_hash(1).is_none() { best_ancient = Some(bc.genesis_hash()); @@ -618,7 +627,7 @@ impl BlockChain { trace!("First block calculated: {:?}", hash); let mut batch = db.key_value().transaction(); batch.put(db::COL_EXTRA, b"first", &hash); - db.key_value().write(batch).expect("Low level database error."); + db.key_value().write(batch).expect("Low level database error when writing 'first' block. Some issue with disk?"); bc.first_block = Some(hash); } }, @@ -1072,7 +1081,7 @@ impl BlockChain { if let Some((block, blooms)) = update.blocks_blooms { self.db.blooms() .insert_blooms(block, blooms.iter()) - .expect("Low level database error. Some issue with disk?"); + .expect("Low level database error when updating blooms. Some issue with disk?"); } // These cached values must be updated last with all four locks taken to avoid @@ -1350,11 +1359,13 @@ impl BlockChain { } }, BlockLocation::BranchBecomingCanonChain(ref data) => { - let ancestor_number = self.block_number(&data.ancestor).unwrap(); + let ancestor_number = self.block_number(&data.ancestor) + .expect("hash belongs to an ancestor of an inserted block; this branch is only reachable for normal block insertion (non-ancient); ancestors of an inserted block are always available for normal block insertion; block number of an inserted block is always available; qed"); let start_number = ancestor_number + 1; let mut blooms: Vec = data.enacted.iter() - .map(|hash| self.block_header_data(hash).unwrap()) + .map(|hash| self.block_header_data(hash) + .expect("hash belongs to an inserted block; block header data of an inserted block is always available; qed")) .map(|h| h.log_bloom()) .collect(); -- GitLab From 4ddccfa5e54ccc31d66a4a96aa65a80fd606abfd Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Thu, 26 Jul 2018 13:36:15 +0200 Subject: [PATCH 173/191] remove ssl from dockerfiles, closes #8880 (#9195) --- docker/android/Dockerfile | 18 ------------------ docker/hub/Dockerfile | 2 -- docker/ubuntu/Dockerfile | 1 - 3 files changed, 21 deletions(-) diff --git a/docker/android/Dockerfile b/docker/android/Dockerfile index 7783781b4c..1dbf15fac7 100644 --- a/docker/android/Dockerfile +++ b/docker/android/Dockerfile @@ -23,24 +23,6 @@ RUN /usr/local/android-ndk-r16b/build/tools/make-standalone-toolchain.sh \ --arch=arm --install-dir=/opt/ndk-standalone --stl=libc++ --platform=android-26 ENV PATH $PATH:/opt/ndk-standalone/bin -# Compiling OpenSSL for Android -RUN cd /root && \ - git clone git://git.openssl.org/openssl.git && \ - cd openssl && \ - git checkout OpenSSL_1_1_0-stable -ENV CROSS_SYSROOT /opt/ndk-standalone/sysroot -RUN cd /root/openssl && \ - ./Configure android-armeabi --cross-compile-prefix=arm-linux-androideabi- \ - -static no-stdio no-ui \ - -I/usr/local/android-ndk-r16b/sysroot/usr/include \ - -I/usr/local/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi \ - -L/usr/local/android-ndk-r16b/sysroot/usr/lib \ - --prefix=/opt/ndk-standalone/sysroot/usr -RUN cd /root/openssl && \ - make build_libs && \ - make install_dev -RUN rm -rf /root/openssl - # Compiling libudev for Android # This is the most hacky part of the process, as we need to apply a patch and pass specific # options that the compiler environment doesn't define. diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index e70434af4b..ce85763dce 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -23,8 +23,6 @@ RUN apt-get update && \ libc6-dev \ binutils \ file \ - openssl \ - libssl-dev \ libudev-dev \ pkg-config \ dpkg-dev \ diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile index 83bf1567a4..574ff64ebd 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu/Dockerfile @@ -11,7 +11,6 @@ RUN apt-get update && \ git \ file \ binutils \ - libssl-dev \ pkg-config \ libudev-dev -- GitLab From 1ce8c1cf82fc5d2738ba3f41087a599eb02fe817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Thu, 26 Jul 2018 21:42:09 +0100 Subject: [PATCH 174/191] snap: remove ssl dependencies from snapcraft definition (#9222) --- snap/snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b101770703..c7da239600 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -33,8 +33,8 @@ parts: # rust-channel: stable # @TODO enable after https://bugs.launchpad.net/snapcraft/+bug/1778530 rust-revision: 1.26.2 # @TODO remove after https://bugs.launchpad.net/snapcraft/+bug/1778530 build-attributes: [no-system-libraries] - build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config, cmake] - stage-packages: [libc6, libssl1.0.0, libudev1, libstdc++6] + build-packages: [g++, libudev-dev, make, pkg-config, cmake] + stage-packages: [libc6, libudev1, libstdc++6] df: plugin: nil stage-packages: [coreutils] -- GitLab From bf7677ce6913998142eba39ad2f32f0b45a52c4d Mon Sep 17 00:00:00 2001 From: JohnnySheffield Date: Fri, 27 Jul 2018 06:20:27 +0200 Subject: [PATCH 175/191] Removes duplicate libudev-dev from Dockerfile (#9220) --- docker/hub/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index ce85763dce..88b11a524c 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -25,8 +25,7 @@ RUN apt-get update && \ file \ libudev-dev \ pkg-config \ - dpkg-dev \ - libudev-dev &&\ + dpkg-dev &&\ # install rustup curl https://sh.rustup.rs -sSf | sh -s -- -y && \ # rustup directory -- GitLab From fb503f523bff75c8711601ee6677aefae7693777 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 27 Jul 2018 10:13:05 +0100 Subject: [PATCH 176/191] Allow old blocks from peers with lower difficulty (#9226) Previously we only allow downloading of old blocks if the peer difficulty was greater than our syncing difficulty. This change allows downloading of blocks from peers where the difficulty is greater then the last downloaded old block. --- ethcore/sync/src/chain/mod.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index 50f4c9428a..ef5146f91d 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -761,14 +761,24 @@ impl ChainSync { } } - // Only ask for old blocks if the peer has a higher difficulty - if force || higher_difficulty { + // Only ask for old blocks if the peer has a higher difficulty than the last imported old block + let last_imported_old_block_difficulty = self.old_blocks.as_mut().and_then(|d| { + io.chain().block_total_difficulty(BlockId::Number(d.last_imported_block_number())) + }); + + if force || last_imported_old_block_difficulty.map_or(true, |ld| peer_difficulty.map_or(true, |pd| pd > ld)) { if let Some(request) = self.old_blocks.as_mut().and_then(|d| d.request_blocks(io, num_active_peers)) { SyncRequester::request_blocks(self, io, peer_id, request, BlockSet::OldBlocks); return; } } else { - trace!(target: "sync", "peer {} is not suitable for asking old blocks", peer_id); + trace!( + target: "sync", + "peer {:?} is not suitable for requesting old blocks, last_imported_old_block_difficulty={:?}, peer_difficulty={:?}", + peer_id, + last_imported_old_block_difficulty, + peer_difficulty + ); self.deactivate_peer(io, peer_id); } }, -- GitLab From 77a5ce6bf365d410cbf27fc418ebc2bd820bcac2 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Fri, 27 Jul 2018 18:07:46 +0800 Subject: [PATCH 177/191] Fix potential as_usize overflow when casting from U256 in miner (#9221) --- 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 1939d02b11..233e28139b 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -417,7 +417,7 @@ impl Miner { let max_transactions = if min_tx_gas.is_zero() { usize::max_value() } else { - MAX_SKIPPED_TRANSACTIONS.saturating_add((*open_block.block().header().gas_limit() / min_tx_gas).as_u64() as usize) + MAX_SKIPPED_TRANSACTIONS.saturating_add(cmp::min(*open_block.block().header().gas_limit() / min_tx_gas, u64::max_value().into()).as_u64() as usize) }; let pending: Vec> = self.transaction_queue.pending( -- GitLab From 5737c213409c7205a826936b842c3f91194598e3 Mon Sep 17 00:00:00 2001 From: Dong Zhou Date: Fri, 27 Jul 2018 18:56:21 +0800 Subject: [PATCH 178/191] fix typo (#9232) --- util/network-devp2p/src/host.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index 28d6620bc1..8d8a1459c9 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -670,7 +670,7 @@ impl Host { } } - fn connection_closed(&self, token: TimerToken, io: &IoContext) { + fn connection_closed(&self, token: StreamToken, io: &IoContext) { trace!(target: "network", "Connection closed: {}", token); self.kill_connection(token, io, true); } -- GitLab From 7ad556346eed03cfea2999f7f9daf864de6489af Mon Sep 17 00:00:00 2001 From: Afri Schoedon <5chdn@users.noreply.github.com> Date: Fri, 27 Jul 2018 16:00:34 +0200 Subject: [PATCH 179/191] add changelog for 1.11.8 stable and 2.0.1 beta (#9230) * docs: add changelog for 1.11.8 stable * docs: add changelog for 2.0.1 beta --- CHANGELOG.md | 54 +++++++++++++++++++++++++++++++++++++++++- docs/CHANGELOG-1.11.md | 50 +++++++++++++++++++++++++++++++++++--- 2 files changed, 100 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b92c3f0ab8..a86383349d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,55 @@ +## Parity-Ethereum [v2.0.1](https://github.com/paritytech/parity-ethereum/releases/tag/v2.0.1) (2018-07-27) + +Parity-Ethereum 2.0.1-beta is a bug-fix release to improve performance and stability. + +Note, authorities in PoA networks based on the Aura engine, should upgrade their nodes to 1.11.8-stable or 2.0.1-beta as this release includes a critical fix. + +The full list of included changes: + +- Backports to 2.0.1-beta ([#9145](https://github.com/paritytech/parity-ethereum/pull/9145)) + - Parity-version: bump beta to 2.0.1 + - Ci: update version strings for snaps ([#9160](https://github.com/paritytech/parity-ethereum/pull/9160)) + - Be more graceful on Aura difficulty validation ([#9164](https://github.com/paritytech/parity-ethereum/pull/9164)) + - Be more graceful on Aura difficulty validation + - Test: rejects_step_backwards + - Test: proposer_switching + - Test: rejects_future_block + - Test: reports_skipped + - Test: verify_empty_seal_steps + - Remove node-health ([#9119](https://github.com/paritytech/parity-ethereum/pull/9119)) + - Remove node-health + - Remove ntp_servers + - Add --ntp-servers as legacy instead of removing it + - Add --ntp-servers to deprecated args + - Remove unused stuff + - Remove _legacy_ntp_servers + - Parity: fix UserDefaults json parser ([#9189](https://github.com/paritytech/parity-ethereum/pull/9189)) + - Parity: fix UserDefaults json parser + - Parity: use serde_derive for UserDefaults + - Parity: support deserialization of old UserDefault json format + - Parity: make UserDefaults serde backwards compatible + - Parity: tabify indentation in UserDefaults + - Fix bugfix hard fork logic ([#9138](https://github.com/paritytech/parity-ethereum/pull/9138)) + - Fix bugfix hard fork logic + - Remove dustProtectionTransition from bugfix category + - Eip-168 is not enabled by default + - Remove unnecessary 'static + - Disable per-sender limit for local transactions. ([#9148](https://github.com/paritytech/parity-ethereum/pull/9148)) + - Disable per-sender limit for local transactions. + - Add a missing new line. + - Rpc: fix is_major_importing sync state condition ([#9112](https://github.com/paritytech/parity-ethereum/pull/9112)) + - Rpc: fix is_major_importing sync state condition + - Rpc: fix informant printout when waiting for peers + - Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity-ethereum/pull/9135)) + - Docker: update hub dockerfile ([#9173](https://github.com/paritytech/parity-ethereum/pull/9173)) + - Update Dockerfile for hub + - Update to Ubuntu Xenial 16.04 + - Fix cmake version + - Docker: fix tab indentation in hub dockerfile + - Rpc: fix broken merge + - Rpc: remove node_health leftover from merge + - Rpc: remove dapps leftover from merge + ## Parity-Ethereum [v2.0.0](https://github.com/paritytech/parity-ethereum/releases/tag/v2.0.0) "Ethereum" (2018-07-18) This is the Parity-Ethereum//v2.0.0-beta release, code-named "Ethereum", **YOLO!** @@ -57,7 +109,7 @@ The full list of included changes: - Update parity-common - Offload cull to IoWorker. ([#9099](https://github.com/paritytech/parity-ethereum/pull/9099)) - Fix work-notify. ([#9104](https://github.com/paritytech/parity-ethereum/pull/9104)) - - Update hidapi, fixes #7542 ([#9108](https://github.com/paritytech/parity-ethereum/pull/9108)) + - Update hidapi, fixes [#7542](https://github.com/paritytech/parity-ethereum/issues/7542) ([#9108](https://github.com/paritytech/parity-ethereum/pull/9108)) - Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity-ethereum/pull/9111)) - Update light client hardcoded headers ([#9098](https://github.com/paritytech/parity-ethereum/pull/9098)) - Insert Kovan hardcoded headers until 7690241 diff --git a/docs/CHANGELOG-1.11.md b/docs/CHANGELOG-1.11.md index ecbcf62e2f..2d8630c80a 100644 --- a/docs/CHANGELOG-1.11.md +++ b/docs/CHANGELOG-1.11.md @@ -1,4 +1,48 @@ -## Parity [v1.11.7](https://github.com/paritytech/parity/releases/tag/v1.11.7) "Prosperity" (2018-07-17) +## Parity [v1.11.8](https://github.com/paritytech/parity-ethereum/releases/tag/v1.11.8) (2018-07-27) + +Parity 1.11.8-stable is a bug-fix release to improve performance and stability. + +Note, authorities in PoA networks based on the Aura engine, should upgrade their nodes immediately as this release includes a critical fix. + +The full list of included changes: + +- Backports to 1.11.8-stable ([#9144](https://github.com/paritytech/parity-ethereum/pull/9144)) + - Parity-version: bump stable to 1.11.8 + - Ci: update version strings for snaps ([#9160](https://github.com/paritytech/parity-ethereum/pull/9160)) + - Be more graceful on Aura difficulty validation ([#9164](https://github.com/paritytech/parity-ethereum/pull/9164)) + - Be more graceful on Aura difficulty validation + - Test: rejects_step_backwards + - Test: proposer_switching + - Test: rejects_future_block + - Test: reports_skipped + - Test: verify_empty_seal_steps + - Parity: fix UserDefaults json parser ([#9189](https://github.com/paritytech/parity-ethereum/pull/9189)) + - Parity: fix UserDefaults json parser + - Parity: use serde_derive for UserDefaults + - Parity: support deserialization of old UserDefault json format + - Parity: make UserDefaults serde backwards compatible + - Parity: tabify indentation in UserDefaults + - Fix bugfix hard fork logic ([#9138](https://github.com/paritytech/parity-ethereum/pull/9138)) + - Fix bugfix hard fork logic + - Remove dustProtectionTransition from bugfix category + - EIP-168 is not enabled by default + - Remove unnecessary 'static + - Disable per-sender limit for local transactions. ([#9148](https://github.com/paritytech/parity-ethereum/pull/9148)) + - Disable per-sender limit for local transactions. + - Add a missing new line. + - Rpc: fix is_major_importing sync state condition ([#9112](https://github.com/paritytech/parity-ethereum/pull/9112)) + - Rpc: fix is_major_importing sync state condition + - Rpc: fix informant printout when waiting for peers + - Fix verification in ethcore-sync collect_blocks ([#9135](https://github.com/paritytech/parity-ethereum/pull/9135)) + - Docker: update hub dockerfile ([#9173](https://github.com/paritytech/parity-ethereum/pull/9173)) + - Update Dockerfile for hub + - Update to Ubuntu Xenial 16.04 + - Fix cmake version + - Docker: fix tab indentation in hub dockerfile + - Ethcore: update to parity-wasm 0.31 + - Rpc: fix broken merge + +## Parity [v1.11.7](https://github.com/paritytech/parity-ethereum/releases/tag/v1.11.7) "Prosperity" (2018-07-17) Parity 1.11.7 "Prosperity" is a bug-fix release to improve performance and stability that marks the 1.11 release track as `stable`. Among other fixes, this release significantly addresses peering and synchronization issues. If you experienced such issues before, upgrading is highly recommended. If you rely on old versions of Parity, check out the `old-stable-1.10` branch, cherry-pick fixes, and compile your binaries independently. There will be no official support for any versions prior to 1.11.7, however (EOL). @@ -29,7 +73,7 @@ The full list of included changes: - Fix ethcore-sync tests. - Fix RPC tests. - Make sure to produce full blocks. ([#9115](https://github.com/paritytech/parity/pull/9115)) - - Update hidapi, fixes #7542 ([#9108](https://github.com/paritytech/parity/pull/9108)) + - Update hidapi, fixes [#7542](https://github.com/paritytech/parity-ethereum/issues/7542) ([#9108](https://github.com/paritytech/parity/pull/9108)) - Docker: add cmake dependency ([#9111](https://github.com/paritytech/parity/pull/9111)) - Fix miner tests. - Revert "Make sure to produce full blocks." @@ -249,7 +293,7 @@ The full list of included changes: - Update shell32-sys to fix windows build ([#8792](https://github.com/paritytech/parity/pull/8792)) - Backports ([#8785](https://github.com/paritytech/parity/pull/8785)) - Fix light sync with initial validator-set contract ([#8528](https://github.com/paritytech/parity/pull/8528)) - - Fix #8468 + - Fix [#8468](https://github.com/paritytech/parity-ethereum/issues/8468) - Use U256::max_value() instead - Also change initial transaction gas - Resumable warp-sync / Seed downloaded snapshots ([#8544](https://github.com/paritytech/parity/pull/8544)) -- GitLab From a809621f63cae56ac06ac0f5ebe089a072d01376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 30 Jul 2018 11:19:47 +0200 Subject: [PATCH 180/191] Increase the number of sessions. (#9203) --- util/network-devp2p/src/host.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/network-devp2p/src/host.rs b/util/network-devp2p/src/host.rs index 8d8a1459c9..81e304f1ac 100644 --- a/util/network-devp2p/src/host.rs +++ b/util/network-devp2p/src/host.rs @@ -49,7 +49,7 @@ use network::{ConnectionFilter, ConnectionDirection}; type Slab = ::slab::Slab; -const MAX_SESSIONS: usize = 1024 + MAX_HANDSHAKES; +const MAX_SESSIONS: usize = 2048 + MAX_HANDSHAKES; const MAX_HANDSHAKES: usize = 1024; const DEFAULT_PORT: u16 = 30303; -- GitLab From c54beba932e5effb46fd317b0fa2ce6aaafb73e0 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Mon, 30 Jul 2018 11:45:10 +0200 Subject: [PATCH 181/191] block cleanup (#9117) * blockchain insert expects owned block instead of block reference * reduce a number of times a block is deserialized * removed cached uncle_bytes from block * removed is_finalized from OpenBlock * removed unused parity_machine::WithMetadata trait * removed commented out code * remove unused metadata from block * remove unused metadata from block * BlockDetails extras may have at most 5 elements --- ethcore/src/block.rs | 55 +--- ethcore/src/blockchain/blockchain.rs | 268 +++++++++----------- ethcore/src/blockchain/extras.rs | 16 +- ethcore/src/blockchain/generator.rs | 8 +- ethcore/src/blockchain/update.rs | 7 +- ethcore/src/client/client.rs | 39 ++- ethcore/src/encoded.rs | 5 + ethcore/src/header.rs | 6 - ethcore/src/snapshot/consensus/authority.rs | 3 +- ethcore/src/snapshot/consensus/work.rs | 10 +- ethcore/src/snapshot/tests/proof_of_work.rs | 11 +- ethcore/src/test_helpers.rs | 7 +- ethcore/src/verification/verification.rs | 1 - machine/src/lib.rs | 16 -- 14 files changed, 179 insertions(+), 273 deletions(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index 2cd2fef70f..6f1ba7a2f0 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -116,10 +116,6 @@ pub struct ExecutedBlock { pub traces: Tracing, /// Hashes of last 256 blocks. pub last_hashes: Arc, - /// Finalization flag. - pub is_finalized: bool, - /// Block metadata. - pub metadata: Option>, } impl ExecutedBlock { @@ -138,8 +134,6 @@ impl ExecutedBlock { Tracing::Disabled }, last_hashes: last_hashes, - is_finalized: false, - metadata: None, } } @@ -228,26 +222,6 @@ impl ::parity_machine::Transactions for ExecutedBlock { } } -impl ::parity_machine::Finalizable for ExecutedBlock { - fn is_finalized(&self) -> bool { - self.is_finalized - } - - fn mark_finalized(&mut self) { - self.is_finalized = true; - } -} - -impl ::parity_machine::WithMetadata for ExecutedBlock { - fn metadata(&self) -> Option<&[u8]> { - self.metadata.as_ref().map(|v| v.as_ref()) - } - - fn set_metadata(&mut self, value: Option>) { - self.metadata = value; - } -} - /// Block that is ready for transactions to be added. /// /// It's a bit like a Vec, except that whenever a transaction is pushed, we execute it and @@ -264,10 +238,7 @@ pub struct OpenBlock<'x> { #[derive(Clone)] pub struct ClosedBlock { block: ExecutedBlock, - uncle_bytes: Bytes, unclosed_state: State, - unclosed_finalization_state: bool, - unclosed_metadata: Option>, } /// Just like `ClosedBlock` except that we can't reopen it and it's faster. @@ -276,7 +247,6 @@ pub struct ClosedBlock { #[derive(Clone)] pub struct LockedBlock { block: ExecutedBlock, - uncle_bytes: Bytes, } /// A block that has a valid seal. @@ -284,7 +254,6 @@ pub struct LockedBlock { /// The block's header has valid seal arguments. The block cannot be reversed into a `ClosedBlock` or `OpenBlock`. pub struct SealedBlock { block: ExecutedBlock, - uncle_bytes: Bytes, } impl<'x> OpenBlock<'x> { @@ -432,14 +401,12 @@ impl<'x> OpenBlock<'x> { let mut s = self; let unclosed_state = s.block.state.clone(); - let unclosed_metadata = s.block.metadata.clone(); - let unclosed_finalization_state = s.block.is_finalized; s.engine.on_close_block(&mut s.block)?; s.block.state.commit()?; s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); - let uncle_bytes = encode_list(&s.block.uncles).into_vec(); + let uncle_bytes = encode_list(&s.block.uncles); s.block.header.set_uncles_hash(keccak(&uncle_bytes)); s.block.header.set_state_root(s.block.state.root().clone()); s.block.header.set_receipts_root(ordered_trie_root(s.block.receipts.iter().map(|r| r.rlp_bytes()))); @@ -451,10 +418,7 @@ impl<'x> OpenBlock<'x> { Ok(ClosedBlock { block: s.block, - uncle_bytes, unclosed_state, - unclosed_metadata, - unclosed_finalization_state, }) } @@ -468,8 +432,8 @@ impl<'x> OpenBlock<'x> { if s.block.header.transactions_root().is_zero() || s.block.header.transactions_root() == &KECCAK_NULL_RLP { s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); } - let uncle_bytes = encode_list(&s.block.uncles).into_vec(); if s.block.header.uncles_hash().is_zero() || s.block.header.uncles_hash() == &KECCAK_EMPTY_LIST_RLP { + let uncle_bytes = encode_list(&s.block.uncles); s.block.header.set_uncles_hash(keccak(&uncle_bytes)); } if s.block.header.receipts_root().is_zero() || s.block.header.receipts_root() == &KECCAK_NULL_RLP { @@ -485,7 +449,6 @@ impl<'x> OpenBlock<'x> { Ok(LockedBlock { block: s.block, - uncle_bytes, }) } @@ -514,7 +477,6 @@ impl ClosedBlock { pub fn lock(self) -> LockedBlock { LockedBlock { block: self.block, - uncle_bytes: self.uncle_bytes, } } @@ -523,8 +485,6 @@ impl ClosedBlock { // revert rewards (i.e. set state back at last transaction's state). let mut block = self.block; block.state = self.unclosed_state; - block.metadata = self.unclosed_metadata; - block.is_finalized = self.unclosed_finalization_state; OpenBlock { block: block, engine: engine, @@ -533,7 +493,6 @@ impl ClosedBlock { } impl LockedBlock { - /// Removes outcomes from receipts and updates the receipt root. /// /// This is done after the block is enacted for historical reasons. @@ -566,7 +525,9 @@ impl LockedBlock { } s.block.header.set_seal(seal); s.block.header.compute_hash(); - Ok(SealedBlock { block: s.block, uncle_bytes: s.uncle_bytes }) + Ok(SealedBlock { + block: s.block + }) } /// Provide a valid seal in order to turn this into a `SealedBlock`. @@ -584,7 +545,9 @@ impl LockedBlock { // TODO: passing state context to avoid engines owning it? match engine.verify_local_seal(&s.block.header) { Err(e) => Err((e, s)), - _ => Ok(SealedBlock { block: s.block, uncle_bytes: s.uncle_bytes }), + _ => Ok(SealedBlock { + block: s.block + }), } } } @@ -601,7 +564,7 @@ impl SealedBlock { let mut block_rlp = RlpStream::new_list(3); block_rlp.append(&self.block.header); block_rlp.append_list(&self.block.transactions); - block_rlp.append_raw(&self.uncle_bytes, 1); + block_rlp.append_list(&self.block.uncles); block_rlp.out() } } diff --git a/ethcore/src/blockchain/blockchain.rs b/ethcore/src/blockchain/blockchain.rs index 5977a0a81d..01becd1820 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -450,9 +450,7 @@ impl<'a> Iterator for AncestryWithMetadataIter<'a> { Some(ExtendedHeader { parent_total_difficulty: details.total_difficulty - *header.difficulty(), is_finalized: details.is_finalized, - metadata: details.metadata, - - header: header, + header, }) }, _ => { @@ -555,7 +553,6 @@ impl BlockChain { parent: header.parent_hash(), children: vec![], is_finalized: false, - metadata: None, }; let mut batch = DBTransaction::new(); @@ -759,10 +756,11 @@ impl BlockChain { /// `parent_td` is a parent total diffuculty /// Supply a dummy parent total difficulty when the parent block may not be in the chain. /// Returns true if the block is disconnected. - pub fn insert_unordered_block(&self, batch: &mut DBTransaction, bytes: &[u8], receipts: Vec, parent_td: Option, is_best: bool, is_ancient: bool) -> bool { - let block = view!(BlockView, bytes); - let header = block.header_view(); - let hash = header.hash(); + pub fn insert_unordered_block(&self, batch: &mut DBTransaction, block: encoded::Block, receipts: Vec, parent_td: Option, is_best: bool, is_ancient: bool) -> bool { + let block_number = block.header_view().number(); + let block_parent_hash = block.header_view().parent_hash(); + let block_difficulty = block.header_view().difficulty(); + let hash = block.header_view().hash(); if self.is_known(&hash) { return false; @@ -770,45 +768,45 @@ impl BlockChain { assert!(self.pending_best_block.read().is_none()); - let compressed_header = compress(block.header_rlp().as_raw(), blocks_swapper()); - let compressed_body = compress(&Self::block_to_body(bytes), blocks_swapper()); + let compressed_header = compress(block.header_view().rlp().as_raw(), blocks_swapper()); + let compressed_body = compress(&Self::block_to_body(block.raw()), blocks_swapper()); // store block in db batch.put(db::COL_HEADERS, &hash, &compressed_header); batch.put(db::COL_BODIES, &hash, &compressed_body); - let maybe_parent = self.block_details(&header.parent_hash()); + let maybe_parent = self.block_details(&block_parent_hash); if let Some(parent_details) = maybe_parent { // parent known to be in chain. let info = BlockInfo { hash: hash, - number: header.number(), - total_difficulty: parent_details.total_difficulty + header.difficulty(), + number: block_number, + total_difficulty: parent_details.total_difficulty + block_difficulty, location: BlockLocation::CanonChain, }; self.prepare_update(batch, ExtrasUpdate { - block_hashes: self.prepare_block_hashes_update(bytes, &info), - block_details: self.prepare_block_details_update(bytes, &info, false, None), + block_hashes: self.prepare_block_hashes_update(&info), + block_details: self.prepare_block_details_update(block_parent_hash, &info, false), block_receipts: self.prepare_block_receipts_update(receipts, &info), - blocks_blooms: self.prepare_block_blooms_update(bytes, &info), - transactions_addresses: self.prepare_transaction_addresses_update(bytes, &info), + blocks_blooms: self.prepare_block_blooms_update(block.header_view().log_bloom(), &info), + transactions_addresses: self.prepare_transaction_addresses_update(block.view().transaction_hashes(), &info), info: info, - block: bytes + block, }, is_best); if is_ancient { let mut best_ancient_block = self.best_ancient_block.write(); let ancient_number = best_ancient_block.as_ref().map_or(0, |b| b.number); - if self.block_hash(header.number() + 1).is_some() { + if self.block_hash(block_number + 1).is_some() { batch.delete(db::COL_EXTRA, b"ancient"); *best_ancient_block = None; - } else if header.number() > ancient_number { + } else if block_number > ancient_number { batch.put(db::COL_EXTRA, b"ancient", &hash); *best_ancient_block = Some(BestAncientBlock { hash: hash, - number: header.number(), + number: block_number, }); } } @@ -821,32 +819,31 @@ impl BlockChain { let info = BlockInfo { hash: hash, - number: header.number(), - total_difficulty: d + header.difficulty(), + number: block_number, + total_difficulty: d + block_difficulty, location: BlockLocation::CanonChain, }; // TODO [sorpaas] support warp sync insertion of finalization and metadata. let block_details = BlockDetails { - number: header.number(), + number: block_number, total_difficulty: info.total_difficulty, - parent: header.parent_hash(), + parent: block_parent_hash, children: Vec::new(), is_finalized: false, - metadata: None, }; let mut update = HashMap::new(); update.insert(hash, block_details); self.prepare_update(batch, ExtrasUpdate { - block_hashes: self.prepare_block_hashes_update(bytes, &info), + block_hashes: self.prepare_block_hashes_update(&info), block_details: update, block_receipts: self.prepare_block_receipts_update(receipts, &info), - blocks_blooms: self.prepare_block_blooms_update(bytes, &info), - transactions_addresses: self.prepare_transaction_addresses_update(bytes, &info), + blocks_blooms: self.prepare_block_blooms_update(block.header_view().log_bloom(), &info), + transactions_addresses: self.prepare_transaction_addresses_update(block.view().transaction_hashes(), &info), info: info, - block: bytes, + block, }, is_best); true } @@ -958,41 +955,36 @@ impl BlockChain { /// Inserts the block into backing cache database. /// Expects the block to be valid and already verified. /// If the block is already known, does nothing. - pub fn insert_block(&self, batch: &mut DBTransaction, bytes: &[u8], receipts: Vec, extras: ExtrasInsert) -> ImportRoute { - let block = view!(BlockView, bytes); - let header = block.header_view(); - - let parent_hash = header.parent_hash(); + pub fn insert_block(&self, batch: &mut DBTransaction, block: encoded::Block, receipts: Vec, extras: ExtrasInsert) -> ImportRoute { + let parent_hash = block.header_view().parent_hash(); let best_hash = self.best_block_hash(); let route = self.tree_route(best_hash, parent_hash).expect("forks are only kept when it has common ancestors; tree route from best to prospective's parent always exists; qed"); - self.insert_block_with_route(batch, bytes, receipts, route, extras) + self.insert_block_with_route(batch, block, receipts, route, extras) } /// Inserts the block into backing cache database with already generated route information. /// Expects the block to be valid and already verified and route is tree route information from current best block to new block's parent. /// If the block is already known, does nothing. - pub fn insert_block_with_route(&self, batch: &mut DBTransaction, bytes: &[u8], receipts: Vec, route: TreeRoute, extras: ExtrasInsert) -> ImportRoute { - // create views onto rlp - let block = view!(BlockView, bytes); - let header = block.header_view(); - let hash = header.hash(); + pub fn insert_block_with_route(&self, batch: &mut DBTransaction, block: encoded::Block, receipts: Vec, route: TreeRoute, extras: ExtrasInsert) -> ImportRoute { + let hash = block.header_view().hash(); + let parent_hash = block.header_view().parent_hash(); - if self.is_known_child(&header.parent_hash(), &hash) { + if self.is_known_child(&parent_hash, &hash) { return ImportRoute::none(); } assert!(self.pending_best_block.read().is_none()); - let compressed_header = compress(block.header_rlp().as_raw(), blocks_swapper()); - let compressed_body = compress(&Self::block_to_body(bytes), blocks_swapper()); + let compressed_header = compress(block.header_view().rlp().as_raw(), blocks_swapper()); + let compressed_body = compress(&Self::block_to_body(block.raw()), blocks_swapper()); // store block in db batch.put(db::COL_HEADERS, &hash, &compressed_header); batch.put(db::COL_BODIES, &hash, &compressed_body); - let info = self.block_info(&header, route, &extras); + let info = self.block_info(&block.header_view(), route, &extras); if let BlockLocation::BranchBecomingCanonChain(ref d) = info.location { info!(target: "reorg", "Reorg to {} ({} {} {})", @@ -1004,13 +996,13 @@ impl BlockChain { } self.prepare_update(batch, ExtrasUpdate { - block_hashes: self.prepare_block_hashes_update(bytes, &info), - block_details: self.prepare_block_details_update(bytes, &info, extras.is_finalized, extras.metadata), + block_hashes: self.prepare_block_hashes_update(&info), + block_details: self.prepare_block_details_update(parent_hash, &info, extras.is_finalized), block_receipts: self.prepare_block_receipts_update(receipts, &info), - blocks_blooms: self.prepare_block_blooms_update(bytes, &info), - transactions_addresses: self.prepare_transaction_addresses_update(bytes, &info), + blocks_blooms: self.prepare_block_blooms_update(block.header_view().log_bloom(), &info), + transactions_addresses: self.prepare_transaction_addresses_update(block.view().transaction_hashes(), &info), info: info.clone(), - block: bytes, + block, }, true); ImportRoute::from(info) @@ -1090,11 +1082,10 @@ impl BlockChain { let mut best_block = self.pending_best_block.write(); if is_best && update.info.location != BlockLocation::Branch { batch.put(db::COL_EXTRA, b"best", &update.info.hash); - let block = encoded::Block::new(update.block.to_vec()); *best_block = Some(BestBlock { total_difficulty: update.info.total_difficulty, - header: block.decode_header(), - block, + header: update.block.decode_header(), + block: update.block, }); } @@ -1214,16 +1205,13 @@ impl BlockChain { } /// This function returns modified block hashes. - fn prepare_block_hashes_update(&self, block_bytes: &[u8], info: &BlockInfo) -> HashMap { + fn prepare_block_hashes_update(&self, info: &BlockInfo) -> HashMap { let mut block_hashes = HashMap::new(); - let block = view!(BlockView, block_bytes); - let header = block.header_view(); - let number = header.number(); match info.location { BlockLocation::Branch => (), BlockLocation::CanonChain => { - block_hashes.insert(number, info.hash); + block_hashes.insert(info.number, info.hash); }, BlockLocation::BranchBecomingCanonChain(ref data) => { let ancestor_number = self.block_number(&data.ancestor).expect("Block number of ancestor is always in DB"); @@ -1233,7 +1221,7 @@ impl BlockChain { block_hashes.insert(start_number + index as BlockNumber, hash); } - block_hashes.insert(number, info.hash); + block_hashes.insert(info.number, info.hash); } } @@ -1242,23 +1230,18 @@ impl BlockChain { /// This function returns modified block details. /// Uses the given parent details or attempts to load them from the database. - fn prepare_block_details_update(&self, block_bytes: &[u8], info: &BlockInfo, is_finalized: bool, metadata: Option>) -> HashMap { - let block = view!(BlockView, block_bytes); - let header = block.header_view(); - let parent_hash = header.parent_hash(); - + fn prepare_block_details_update(&self, parent_hash: H256, info: &BlockInfo, is_finalized: bool) -> HashMap { // update parent let mut parent_details = self.block_details(&parent_hash).unwrap_or_else(|| panic!("Invalid parent hash: {:?}", parent_hash)); parent_details.children.push(info.hash); // create current block details. let details = BlockDetails { - number: header.number(), + number: info.number, total_difficulty: info.total_difficulty, parent: parent_hash, children: vec![], is_finalized: is_finalized, - metadata: metadata, }; // write to batch @@ -1276,10 +1259,7 @@ impl BlockChain { } /// This function returns modified transaction addresses. - fn prepare_transaction_addresses_update(&self, block_bytes: &[u8], info: &BlockInfo) -> HashMap> { - let block = view!(BlockView, block_bytes); - let transaction_hashes = block.transaction_hashes(); - + fn prepare_transaction_addresses_update(&self, transaction_hashes: Vec, info: &BlockInfo) -> HashMap> { match info.location { BlockLocation::CanonChain => { transaction_hashes.into_iter() @@ -1344,14 +1324,10 @@ impl BlockChain { /// Later, BloomIndexer is used to map bloom location on filter layer (BloomIndex) /// to bloom location in database (BlocksBloomLocation). /// - fn prepare_block_blooms_update(&self, block_bytes: &[u8], info: &BlockInfo) -> Option<(u64, Vec)> { - let block = view!(BlockView, block_bytes); - let header = block.header_view(); - + fn prepare_block_blooms_update(&self, log_bloom: Bloom, info: &BlockInfo) -> Option<(u64, Vec)> { match info.location { BlockLocation::Branch => None, BlockLocation::CanonChain => { - let log_bloom = header.log_bloom(); if log_bloom.is_zero() { None } else { @@ -1369,7 +1345,7 @@ impl BlockChain { .map(|h| h.log_bloom()) .collect(); - blooms.push(header.log_bloom()); + blooms.push(log_bloom); Some((start_number, blooms)) } } @@ -1505,18 +1481,19 @@ mod tests { use log_entry::{LogEntry, LocalizedLogEntry}; use ethkey::Secret; use test_helpers::new_db; + use encoded; - fn new_chain(genesis: &[u8], db: Arc) -> BlockChain { - BlockChain::new(Config::default(), genesis, db) + fn new_chain(genesis: encoded::Block, db: Arc) -> BlockChain { + BlockChain::new(Config::default(), genesis.raw(), db) } - fn insert_block(db: &Arc, bc: &BlockChain, bytes: &[u8], receipts: Vec) -> ImportRoute { - insert_block_commit(db, bc, bytes, receipts, true) + fn insert_block(db: &Arc, bc: &BlockChain, block: encoded::Block, receipts: Vec) -> ImportRoute { + insert_block_commit(db, bc, block, receipts, true) } - fn insert_block_commit(db: &Arc, bc: &BlockChain, bytes: &[u8], receipts: Vec, commit: bool) -> ImportRoute { + fn insert_block_commit(db: &Arc, bc: &BlockChain, block: encoded::Block, receipts: Vec, commit: bool) -> ImportRoute { let mut batch = db.key_value().transaction(); - let res = insert_block_batch(&mut batch, bc, bytes, receipts); + let res = insert_block_batch(&mut batch, bc, block, receipts); db.key_value().write(batch).unwrap(); if commit { bc.commit(); @@ -1524,25 +1501,24 @@ mod tests { res } - fn insert_block_batch(batch: &mut DBTransaction, bc: &BlockChain, bytes: &[u8], receipts: Vec) -> ImportRoute { - use views::BlockView; + fn insert_block_batch(batch: &mut DBTransaction, bc: &BlockChain, block: encoded::Block, receipts: Vec) -> ImportRoute { use blockchain::ExtrasInsert; - let block = view!(BlockView, bytes); - let header = block.header_view(); - let parent_hash = header.parent_hash(); - let parent_details = bc.block_details(&parent_hash).unwrap_or_else(|| panic!("Invalid parent hash: {:?}", parent_hash)); - let block_total_difficulty = parent_details.total_difficulty + header.difficulty(); - let fork_choice = if block_total_difficulty > bc.best_block_total_difficulty() { - ::engines::ForkChoice::New - } else { - ::engines::ForkChoice::Old + let fork_choice = { + let header = block.header_view(); + let parent_hash = header.parent_hash(); + let parent_details = bc.block_details(&parent_hash).unwrap_or_else(|| panic!("Invalid parent hash: {:?}", parent_hash)); + let block_total_difficulty = parent_details.total_difficulty + header.difficulty(); + if block_total_difficulty > bc.best_block_total_difficulty() { + ::engines::ForkChoice::New + } else { + ::engines::ForkChoice::Old + } }; - bc.insert_block(batch, bytes, receipts, ExtrasInsert { + bc.insert_block(batch, block, receipts, ExtrasInsert { fork_choice: fork_choice, is_finalized: false, - metadata: None }) } @@ -1553,11 +1529,11 @@ mod tests { let first = genesis.add_block(); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); assert_eq!(bc.best_block_number(), 0); // when - insert_block_commit(&db, &bc, &first.last().encoded(), vec![], false); + insert_block_commit(&db, &bc, first.last().encoded(), vec![], false); assert_eq!(bc.best_block_number(), 0); bc.commit(); // NOTE no db.write here (we want to check if best block is cached) @@ -1578,7 +1554,7 @@ mod tests { let first_hash = first.hash(); let db = new_db(); - let bc = new_chain(&genesis.encoded(), db.clone()); + let bc = new_chain(genesis.encoded(), db.clone()); assert_eq!(bc.genesis_hash(), genesis_hash); assert_eq!(bc.best_block_hash(), genesis_hash); @@ -1587,7 +1563,7 @@ mod tests { assert_eq!(bc.block_details(&genesis_hash).unwrap().children, vec![]); let mut batch = db.key_value().transaction(); - insert_block_batch(&mut batch, &bc, &first.encoded(), vec![]); + insert_block_batch(&mut batch, &bc, first.encoded(), vec![]); db.key_value().write(batch).unwrap(); bc.commit(); @@ -1607,13 +1583,13 @@ mod tests { let generator = BlockGenerator::new(vec![first_10]); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut block_hashes = vec![genesis.last().hash()]; let mut batch = db.key_value().transaction(); for block in generator { block_hashes.push(block.hash()); - insert_block_batch(&mut batch, &bc, &block.encoded(), vec![]); + insert_block_batch(&mut batch, &bc, block.encoded(), vec![]); bc.commit(); } db.key_value().write(batch).unwrap(); @@ -1651,10 +1627,10 @@ mod tests { ); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); for b in generator { - insert_block(&db, &bc, &b.encoded(), vec![]); + insert_block(&db, &bc, b.encoded(), vec![]); } assert_eq!(uncle_headers, bc.find_uncle_headers(&b4a_hash, 3).unwrap()); @@ -1687,12 +1663,12 @@ mod tests { let b2_hash = b2.last().hash(); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); - let _ = insert_block_batch(&mut batch, &bc, &b1a.last().encoded(), vec![]); + let _ = insert_block_batch(&mut batch, &bc, b1a.last().encoded(), vec![]); bc.commit(); - let _ = insert_block_batch(&mut batch, &bc, &b1b.last().encoded(), vec![]); + let _ = insert_block_batch(&mut batch, &bc, b1b.last().encoded(), vec![]); bc.commit(); db.key_value().write(batch).unwrap(); @@ -1704,7 +1680,7 @@ mod tests { // now let's make forked chain the canon chain let mut batch = db.key_value().transaction(); - let _ = insert_block_batch(&mut batch, &bc, &b2.last().encoded(), vec![]); + let _ = insert_block_batch(&mut batch, &bc, b2.last().encoded(), vec![]); bc.commit(); db.key_value().write(batch).unwrap(); @@ -1762,12 +1738,12 @@ mod tests { let t3_hash = t3.hash(); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); - let _ = insert_block_batch(&mut batch, &bc, &b1a.last().encoded(), vec![]); + let _ = insert_block_batch(&mut batch, &bc, b1a.last().encoded(), vec![]); bc.commit(); - let _ = insert_block_batch(&mut batch, &bc, &b1b.last().encoded(), vec![]); + let _ = insert_block_batch(&mut batch, &bc, b1b.last().encoded(), vec![]); bc.commit(); db.key_value().write(batch).unwrap(); @@ -1783,7 +1759,7 @@ mod tests { // now let's make forked chain the canon chain let mut batch = db.key_value().transaction(); - let _ = insert_block_batch(&mut batch, &bc, &b2.last().encoded(), vec![]); + let _ = insert_block_batch(&mut batch, &bc, b2.last().encoded(), vec![]); bc.commit(); db.key_value().write(batch).unwrap(); @@ -1820,19 +1796,19 @@ mod tests { let best_block_hash = b3a_hash; let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); - let ir1 = insert_block_batch(&mut batch, &bc, &b1.last().encoded(), vec![]); + let ir1 = insert_block_batch(&mut batch, &bc, b1.last().encoded(), vec![]); bc.commit(); - let ir2 = insert_block_batch(&mut batch, &bc, &b2.last().encoded(), vec![]); + let ir2 = insert_block_batch(&mut batch, &bc, b2.last().encoded(), vec![]); bc.commit(); - let ir3b = insert_block_batch(&mut batch, &bc, &b3b.last().encoded(), vec![]); + let ir3b = insert_block_batch(&mut batch, &bc, b3b.last().encoded(), vec![]); bc.commit(); db.key_value().write(batch).unwrap(); assert_eq!(bc.block_hash(3).unwrap(), b3b_hash); let mut batch = db.key_value().transaction(); - let ir3a = insert_block_batch(&mut batch, &bc, &b3a.last().encoded(), vec![]); + let ir3a = insert_block_batch(&mut batch, &bc, b3a.last().encoded(), vec![]); bc.commit(); db.key_value().write(batch).unwrap(); @@ -1934,17 +1910,17 @@ mod tests { let db = new_db(); { - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); assert_eq!(bc.best_block_hash(), genesis_hash); let mut batch = db.key_value().transaction(); - insert_block_batch(&mut batch, &bc, &first.last().encoded(), vec![]); + insert_block_batch(&mut batch, &bc, first.last().encoded(), vec![]); db.key_value().write(batch).unwrap(); bc.commit(); assert_eq!(bc.best_block_hash(), first_hash); } { - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); assert_eq!(bc.best_block_hash(), first_hash); } @@ -1994,9 +1970,9 @@ mod tests { let b1_hash: H256 = "f53f268d23a71e85c7d6d83a9504298712b84c1a2ba220441c86eeda0bf0b6e3".into(); let db = new_db(); - let bc = new_chain(&genesis, db.clone()); + let bc = new_chain(encoded::Block::new(genesis), db.clone()); let mut batch = db.key_value().transaction(); - insert_block_batch(&mut batch, &bc, &b1, vec![]); + insert_block_batch(&mut batch, &bc, encoded::Block::new(b1), vec![]); db.key_value().write(batch).unwrap(); bc.commit(); @@ -2062,8 +2038,8 @@ mod tests { let b3_number = b3.last().number(); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); - insert_block(&db, &bc, &b1.last().encoded(), vec![Receipt { + let bc = new_chain(genesis.last().encoded(), db.clone()); + insert_block(&db, &bc, b1.last().encoded(), vec![Receipt { outcome: TransactionOutcome::StateRoot(H256::default()), gas_used: 10_000.into(), log_bloom: Default::default(), @@ -2080,7 +2056,7 @@ mod tests { LogEntry { address: Default::default(), topics: vec![], data: vec![3], }, ], }]); - insert_block(&db, &bc, &b2.last().encoded(), vec![ + insert_block(&db, &bc, b2.last().encoded(), vec![ Receipt { outcome: TransactionOutcome::StateRoot(H256::default()), gas_used: 10_000.into(), @@ -2090,7 +2066,7 @@ mod tests { ], } ]); - insert_block(&db, &bc, &b3.last().encoded(), vec![ + insert_block(&db, &bc, b3.last().encoded(), vec![ Receipt { outcome: TransactionOutcome::StateRoot(H256::default()), gas_used: 10_000.into(), @@ -2190,27 +2166,27 @@ mod tests { let b2a = b1a.add_block_with_bloom(bloom_ba); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let blocks_b1 = bc.blocks_with_bloom(Some(&bloom_b1), 0, 5); let blocks_b2 = bc.blocks_with_bloom(Some(&bloom_b2), 0, 5); assert!(blocks_b1.is_empty()); assert!(blocks_b2.is_empty()); - insert_block(&db, &bc, &b1.last().encoded(), vec![]); + insert_block(&db, &bc, b1.last().encoded(), vec![]); let blocks_b1 = bc.blocks_with_bloom(Some(&bloom_b1), 0, 5); let blocks_b2 = bc.blocks_with_bloom(Some(&bloom_b2), 0, 5); assert_eq!(blocks_b1, vec![1]); assert!(blocks_b2.is_empty()); - insert_block(&db, &bc, &b2.last().encoded(), vec![]); + insert_block(&db, &bc, b2.last().encoded(), vec![]); let blocks_b1 = bc.blocks_with_bloom(Some(&bloom_b1), 0, 5); let blocks_b2 = bc.blocks_with_bloom(Some(&bloom_b2), 0, 5); assert_eq!(blocks_b1, vec![1]); assert_eq!(blocks_b2, vec![2]); // hasn't been forked yet - insert_block(&db, &bc, &b1a.last().encoded(), vec![]); + insert_block(&db, &bc, b1a.last().encoded(), vec![]); let blocks_b1 = bc.blocks_with_bloom(Some(&bloom_b1), 0, 5); let blocks_b2 = bc.blocks_with_bloom(Some(&bloom_b2), 0, 5); let blocks_ba = bc.blocks_with_bloom(Some(&bloom_ba), 0, 5); @@ -2219,7 +2195,7 @@ mod tests { assert!(blocks_ba.is_empty()); // fork has happend - insert_block(&db, &bc, &b2a.last().encoded(), vec![]); + insert_block(&db, &bc, b2a.last().encoded(), vec![]); let blocks_b1 = bc.blocks_with_bloom(Some(&bloom_b1), 0, 5); let blocks_b2 = bc.blocks_with_bloom(Some(&bloom_b2), 0, 5); let blocks_ba = bc.blocks_with_bloom(Some(&bloom_ba), 0, 5); @@ -2228,7 +2204,7 @@ mod tests { assert_eq!(blocks_ba, vec![1, 2]); // fork back - insert_block(&db, &bc, &b3.last().encoded(), vec![]); + insert_block(&db, &bc, b3.last().encoded(), vec![]); let blocks_b1 = bc.blocks_with_bloom(Some(&bloom_b1), 0, 5); let blocks_b2 = bc.blocks_with_bloom(Some(&bloom_b2), 0, 5); let blocks_ba = bc.blocks_with_bloom(Some(&bloom_ba), 0, 5); @@ -2252,13 +2228,13 @@ mod tests { let b1_total_difficulty = genesis.last().difficulty() + b1.last().difficulty(); let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); - bc.insert_unordered_block(&mut batch, &b2.last().encoded(), vec![], Some(b1_total_difficulty), false, false); + bc.insert_unordered_block(&mut batch, b2.last().encoded(), vec![], Some(b1_total_difficulty), false, false); bc.commit(); - bc.insert_unordered_block(&mut batch, &b3.last().encoded(), vec![], None, true, false); + bc.insert_unordered_block(&mut batch, b3.last().encoded(), vec![], None, true, false); bc.commit(); - bc.insert_unordered_block(&mut batch, &b1.last().encoded(), vec![], None, false, false); + bc.insert_unordered_block(&mut batch, b1.last().encoded(), vec![], None, false, false); bc.commit(); db.key_value().write(batch).unwrap(); @@ -2285,23 +2261,23 @@ mod tests { let db = new_db(); { - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); // create a longer fork for block in generator { - insert_block_batch(&mut batch, &bc, &block.encoded(), vec![]); + insert_block_batch(&mut batch, &bc, block.encoded(), vec![]); bc.commit(); } assert_eq!(bc.best_block_number(), 5); - insert_block_batch(&mut batch, &bc, &uncle.last().encoded(), vec![]); + insert_block_batch(&mut batch, &bc, uncle.last().encoded(), vec![]); db.key_value().write(batch).unwrap(); bc.commit(); } // re-loading the blockchain should load the correct best block. - let bc = new_chain(&genesis.last().encoded(), db); + let bc = new_chain(genesis.last().encoded(), db); assert_eq!(bc.best_block_number(), 5); } @@ -2316,13 +2292,13 @@ mod tests { let db = new_db(); { - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); // create a longer fork for (i, block) in generator.into_iter().enumerate() { - insert_block_batch(&mut batch, &bc, &block.encoded(), vec![]); + insert_block_batch(&mut batch, &bc, block.encoded(), vec![]); bc.insert_epoch_transition(&mut batch, i as u64, EpochTransition { block_hash: block.hash(), block_number: i as u64 + 1, @@ -2333,7 +2309,7 @@ mod tests { assert_eq!(bc.best_block_number(), 5); - insert_block_batch(&mut batch, &bc, &uncle.last().encoded(), vec![]); + insert_block_batch(&mut batch, &bc, uncle.last().encoded(), vec![]); bc.insert_epoch_transition(&mut batch, 999, EpochTransition { block_hash: uncle.last().hash(), block_number: 1, @@ -2348,7 +2324,7 @@ mod tests { } // re-loading the blockchain should load the correct best block. - let bc = new_chain(&genesis.last().encoded(), db); + let bc = new_chain(genesis.last().encoded(), db); assert_eq!(bc.best_block_number(), 5); assert_eq!(bc.epoch_transitions().map(|(i, _)| i).collect::>(), vec![0, 1, 2, 3, 4]); @@ -2369,7 +2345,7 @@ mod tests { let db = new_db(); - let bc = new_chain(&genesis.last().encoded(), db.clone()); + let bc = new_chain(genesis.last().encoded(), db.clone()); let mut batch = db.key_value().transaction(); bc.insert_epoch_transition(&mut batch, 0, EpochTransition { @@ -2383,7 +2359,7 @@ mod tests { // and a non-canonical fork of 8 from genesis. let fork_hash = { for block in fork_generator { - insert_block(&db, &bc, &block.encoded(), vec![]); + insert_block(&db, &bc, block.encoded(), vec![]); } assert_eq!(bc.best_block_number(), 7); @@ -2391,7 +2367,7 @@ mod tests { }; for block in next_generator { - insert_block(&db, &bc, &block.encoded(), vec![]); + insert_block(&db, &bc, block.encoded(), vec![]); } assert_eq!(bc.best_block_number(), 10); diff --git a/ethcore/src/blockchain/extras.rs b/ethcore/src/blockchain/extras.rs index bbf67374a1..1dd51b7c75 100644 --- a/ethcore/src/blockchain/extras.rs +++ b/ethcore/src/blockchain/extras.rs @@ -152,17 +152,15 @@ pub struct BlockDetails { pub children: Vec, /// Whether the block is considered finalized pub is_finalized: bool, - /// Additional block metadata - pub metadata: Option>, } impl rlp::Encodable for BlockDetails { fn rlp_append(&self, stream: &mut rlp::RlpStream) { - let use_short_version = self.metadata.is_none() && !self.is_finalized; + let use_short_version = !self.is_finalized; match use_short_version { true => { stream.begin_list(4); }, - false => { stream.begin_list(6); }, + false => { stream.begin_list(5); }, } stream.append(&self.number); @@ -171,7 +169,6 @@ impl rlp::Encodable for BlockDetails { stream.append_list(&self.children); if !use_short_version { stream.append(&self.is_finalized); - stream.append(&self.metadata); } } } @@ -180,7 +177,7 @@ impl rlp::Decodable for BlockDetails { fn decode(rlp: &rlp::Rlp) -> Result { let use_short_version = match rlp.item_count()? { 4 => true, - 6 => false, + 5 => false, _ => return Err(rlp::DecoderError::RlpIncorrectListLen), }; @@ -194,11 +191,6 @@ impl rlp::Decodable for BlockDetails { } else { rlp.val_at(4)? }, - metadata: if use_short_version { - None - } else { - rlp.val_at(5)? - }, }) } } @@ -252,7 +244,7 @@ pub struct EpochTransitions { #[cfg(test)] mod tests { use rlp::*; - + use super::BlockReceipts; #[test] diff --git a/ethcore/src/blockchain/generator.rs b/ethcore/src/blockchain/generator.rs index 5a97f37f98..44d4e038c5 100644 --- a/ethcore/src/blockchain/generator.rs +++ b/ethcore/src/blockchain/generator.rs @@ -19,11 +19,11 @@ use std::collections::VecDeque; use ethereum_types::{U256, H256, Bloom}; -use bytes::Bytes; use header::Header; use rlp::encode; use transaction::SignedTransaction; use views::BlockView; +use encoded; /// Helper structure, used for encoding blocks. #[derive(Default, Clone, RlpEncodable)] @@ -41,7 +41,7 @@ impl Block { #[inline] pub fn hash(&self) -> H256 { - view!(BlockView, &self.encoded()).header_view().hash() + view!(BlockView, &self.encoded().raw()).header_view().hash() } #[inline] @@ -50,8 +50,8 @@ impl Block { } #[inline] - pub fn encoded(&self) -> Bytes { - encode(self).into_vec() + pub fn encoded(&self) -> encoded::Block { + encoded::Block::new(encode(self).into_vec()) } #[inline] diff --git a/ethcore/src/blockchain/update.rs b/ethcore/src/blockchain/update.rs index 0a2d0e7749..897abb59bc 100644 --- a/ethcore/src/blockchain/update.rs +++ b/ethcore/src/blockchain/update.rs @@ -19,13 +19,14 @@ use ethereum_types::{H256, Bloom}; use header::BlockNumber; use blockchain::block_info::BlockInfo; use blockchain::extras::{BlockDetails, BlockReceipts, TransactionAddress}; +use encoded::Block; /// Block extras update info. -pub struct ExtrasUpdate<'a> { +pub struct ExtrasUpdate { /// Block info. pub info: BlockInfo, /// Current block uncompressed rlp bytes - pub block: &'a [u8], + pub block: Block, /// Modified block hashes. pub block_hashes: HashMap, /// Modified block details. @@ -44,6 +45,4 @@ pub struct ExtrasInsert { pub fork_choice: ::engines::ForkChoice, /// Is the inserted block considered finalized. pub is_finalized: bool, - /// New block local metadata. - pub metadata: Option>, } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 8278b2ca82..47974356f1 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -74,7 +74,6 @@ use types::filter::Filter; use types::ancestry_action::AncestryAction; use verification; use verification::{PreverifiedBlock, Verifier, BlockQueue}; -use views::BlockView; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -210,7 +209,7 @@ pub struct Client { /// Queued ancient blocks, make sure they are imported in order. queued_ancient_blocks: Arc, - VecDeque<(Header, Bytes, Bytes)> + VecDeque<(Header, encoded::Block, Bytes)> )>>, ancient_blocks_import_lock: Arc>, /// Consensus messages import queue @@ -297,7 +296,7 @@ impl Importer { let transactions_len = closed_block.transactions().len(); - let route = self.commit_block(closed_block, &header, &bytes, client); + let route = self.commit_block(closed_block, &header, encoded::Block::new(bytes), client); import_results.push(route); client.report.write().accrue_block(&header, transactions_len); @@ -430,9 +429,8 @@ impl Importer { /// /// The block is guaranteed to be the next best blocks in the /// first block sequence. Does no sealing or transaction validation. - fn import_old_block(&self, header: &Header, block_bytes: &[u8], receipts_bytes: &[u8], db: &KeyValueDB, chain: &BlockChain) -> Result { + fn import_old_block(&self, header: &Header, block: encoded::Block, receipts_bytes: &[u8], db: &KeyValueDB, chain: &BlockChain) -> Result<(), ::error::Error> { let receipts = ::rlp::decode_list(receipts_bytes); - let hash = header.hash(); let _import_lock = self.import_lock.lock(); { @@ -443,28 +441,29 @@ impl Importer { // Commit results let mut batch = DBTransaction::new(); - chain.insert_unordered_block(&mut batch, block_bytes, receipts, None, false, true); + chain.insert_unordered_block(&mut batch, block, receipts, None, false, true); // Final commit to the DB db.write_buffered(batch); chain.commit(); } db.flush().expect("DB flush failed."); - Ok(hash) + Ok(()) } // NOTE: the header of the block passed here is not necessarily sealed, as // it is for reconstructing the state transition. // // The header passed is from the original block data and is sealed. - fn commit_block(&self, block: B, header: &Header, block_data: &[u8], client: &Client) -> ImportRoute where B: Drain { + fn commit_block(&self, block: B, header: &Header, block_data: encoded::Block, client: &Client) -> ImportRoute where B: Drain { let hash = &header.hash(); let number = header.number(); let parent = header.parent_hash(); let chain = client.chain.read(); + let is_finalized = false; // Commit results let block = block.drain(); - assert_eq!(header.hash(), view!(BlockView, block_data).header_view().hash()); + debug_assert_eq!(header.hash(), block_data.header_view().hash()); let mut batch = DBTransaction::new(); @@ -476,8 +475,7 @@ impl Importer { let new = ExtendedHeader { header: header.clone(), - is_finalized: block.is_finalized, - metadata: block.metadata, + is_finalized, parent_total_difficulty: chain.block_details(&parent).expect("Parent block is in the database; qed").total_difficulty }; @@ -493,8 +491,6 @@ impl Importer { ExtendedHeader { parent_total_difficulty: details.total_difficulty - *header.difficulty(), is_finalized: details.is_finalized, - metadata: details.metadata, - header: header, } }; @@ -515,7 +511,7 @@ impl Importer { // state. self.check_epoch_end_signal( &header, - block_data, + block_data.raw(), &receipts, &state, &chain, @@ -532,8 +528,7 @@ impl Importer { let route = chain.insert_block(&mut batch, block_data, receipts.clone(), ExtrasInsert { fork_choice: fork_choice, - is_finalized: block.is_finalized, - metadata: new.metadata, + is_finalized, }); client.tracedb.read().import(&mut batch, TraceImportRequest { @@ -1327,7 +1322,7 @@ impl ChainInfo for Client { } impl BlockInfo for Client { - fn block_header(&self, id: BlockId) -> Option<::encoded::Header> { + 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)) @@ -2053,7 +2048,7 @@ impl IoClient for Client { { let mut queued = self.queued_ancient_blocks.write(); queued.0.insert(hash); - queued.1.push_back((header, block_bytes, receipts_bytes)); + queued.1.push_back((header, encoded::Block::new(block_bytes), receipts_bytes)); } let queued = self.queued_ancient_blocks.clone(); @@ -2069,7 +2064,7 @@ impl IoClient for Client { let hash = header.hash(); let result = client.importer.import_old_block( &header, - &block_bytes, + block_bytes, &receipts_bytes, &**client.db.read().key_value(), &*client.chain.read(), @@ -2194,7 +2189,7 @@ impl ImportSealedBlock for Client { let block_data = block.rlp_bytes(); let header = block.header().clone(); - let route = self.importer.commit_block(block, &header, &block_data, self); + let route = self.importer.commit_block(block, &header, encoded::Block::new(block_data), self); trace!(target: "client", "Imported sealed block #{} ({})", number, h); self.state_db.write().sync_cache(&route.enacted, &route.retracted, false); route @@ -2380,6 +2375,7 @@ mod tests { use std::sync::atomic::{AtomicBool, Ordering}; use kvdb::DBTransaction; use blockchain::ExtrasInsert; + use encoded; let client = generate_dummy_client(0); let genesis = client.chain_info().best_block_hash; @@ -2392,10 +2388,9 @@ mod tests { let another_client = client.clone(); thread::spawn(move || { let mut batch = DBTransaction::new(); - another_client.chain.read().insert_block(&mut batch, &new_block, Vec::new(), ExtrasInsert { + another_client.chain.read().insert_block(&mut batch, encoded::Block::new(new_block), Vec::new(), ExtrasInsert { fork_choice: ::engines::ForkChoice::New, is_finalized: false, - metadata: None, }); go_thread.store(true, Ordering::SeqCst); }); diff --git a/ethcore/src/encoded.rs b/ethcore/src/encoded.rs index 5bd723f0e2..9573bb5d16 100644 --- a/ethcore/src/encoded.rs +++ b/ethcore/src/encoded.rs @@ -222,6 +222,11 @@ impl Block { /// Consume the view and return the raw bytes. pub fn into_inner(self) -> Vec { self.0 } + + /// Returns the reference to slice of bytes + pub fn raw(&self) -> &[u8] { + &self.0 + } } // forwarders to borrowed header view. diff --git a/ethcore/src/header.rs b/ethcore/src/header.rs index 5aa4be3237..7896282fc2 100644 --- a/ethcore/src/header.rs +++ b/ethcore/src/header.rs @@ -43,8 +43,6 @@ pub struct ExtendedHeader { pub is_finalized: bool, /// The parent block difficulty. pub parent_total_difficulty: U256, - /// The block metadata information. - pub metadata: Option>, } /// A block header. @@ -418,10 +416,6 @@ impl ::parity_machine::FinalizableHeader for ExtendedHeader { fn is_finalized(&self) -> bool { self.is_finalized } } -impl ::parity_machine::WithMetadataHeader for ExtendedHeader { - fn metadata(&self) -> Option<&[u8]> { self.metadata.as_ref().map(|v| v.as_ref()) } -} - #[cfg(test)] mod tests { use rustc_hex::FromHex; diff --git a/ethcore/src/snapshot/consensus/authority.rs b/ethcore/src/snapshot/consensus/authority.rs index 8ae4cc33c0..72d828643d 100644 --- a/ethcore/src/snapshot/consensus/authority.rs +++ b/ethcore/src/snapshot/consensus/authority.rs @@ -37,6 +37,7 @@ use rlp::{RlpStream, Rlp}; use ethereum_types::{H256, U256}; use kvdb::KeyValueDB; use bytes::Bytes; +use encoded; /// Snapshot creation and restoration for PoA chains. @@ -339,7 +340,7 @@ impl Rebuilder for ChunkRebuilder { let parent_td: U256 = last_rlp.val_at(4)?; let mut batch = self.db.transaction(); - self.chain.insert_unordered_block(&mut batch, &block_data, receipts, Some(parent_td), true, false); + self.chain.insert_unordered_block(&mut batch, encoded::Block::new(block_data), receipts, Some(parent_td), true, false); self.db.write_buffered(batch); self.warp_target = Some(block.header); diff --git a/ethcore/src/snapshot/consensus/work.rs b/ethcore/src/snapshot/consensus/work.rs index 963a96a7f9..ded004fe89 100644 --- a/ethcore/src/snapshot/consensus/work.rs +++ b/ethcore/src/snapshot/consensus/work.rs @@ -35,6 +35,7 @@ use kvdb::KeyValueDB; use bytes::Bytes; use rlp::{RlpStream, Rlp}; use rand::OsRng; +use encoded; /// Snapshot creation and restoration for PoW chains. /// This includes blocks from the head of the chain as a @@ -220,7 +221,6 @@ impl Rebuilder for PowRebuilder { /// Feed the rebuilder an uncompressed block chunk. /// Returns the number of blocks fed or any errors. fn feed(&mut self, chunk: &[u8], engine: &EthEngine, abort_flag: &AtomicBool) -> Result<(), ::error::Error> { - use views::BlockView; use snapshot::verify_old_block; use ethereum_types::U256; use triehash::ordered_trie_root; @@ -250,7 +250,7 @@ impl Rebuilder for PowRebuilder { let receipts_root = ordered_trie_root(pair.at(1)?.iter().map(|r| r.as_raw())); let block = abridged_block.to_block(parent_hash, cur_number, receipts_root)?; - let block_bytes = block.rlp_bytes(); + let block_bytes = encoded::Block::new(block.rlp_bytes()); let is_best = cur_number == self.best_number; if is_best { @@ -275,16 +275,16 @@ impl Rebuilder for PowRebuilder { // special-case the first block in each chunk. if idx == 3 { - if self.chain.insert_unordered_block(&mut batch, &block_bytes, receipts, Some(parent_total_difficulty), is_best, false) { + if self.chain.insert_unordered_block(&mut batch, block_bytes, receipts, Some(parent_total_difficulty), is_best, false) { self.disconnected.push((cur_number, block.header.hash())); } } else { - self.chain.insert_unordered_block(&mut batch, &block_bytes, receipts, None, is_best, false); + self.chain.insert_unordered_block(&mut batch, block_bytes, receipts, None, is_best, false); } self.db.write_buffered(batch); self.chain.commit(); - parent_hash = view!(BlockView, &block_bytes).hash(); + parent_hash = block.header.hash(); cur_number += 1; } diff --git a/ethcore/src/snapshot/tests/proof_of_work.rs b/ethcore/src/snapshot/tests/proof_of_work.rs index 40733c3285..2572699682 100644 --- a/ethcore/src/snapshot/tests/proof_of_work.rs +++ b/ethcore/src/snapshot/tests/proof_of_work.rs @@ -43,15 +43,14 @@ fn chunk_and_restore(amount: u64) { let snapshot_path = tempdir.path().join("SNAP"); let old_db = test_helpers::new_db(); - let bc = BlockChain::new(Default::default(), &genesis.encoded(), old_db.clone()); + let bc = BlockChain::new(Default::default(), genesis.encoded().raw(), old_db.clone()); // build the blockchain. let mut batch = DBTransaction::new(); for block in generator { - bc.insert_block(&mut batch, &block.encoded(), vec![], ExtrasInsert { + bc.insert_block(&mut batch, block.encoded(), vec![], ExtrasInsert { fork_choice: ::engines::ForkChoice::New, is_finalized: false, - metadata: None, }); bc.commit(); } @@ -83,7 +82,7 @@ fn chunk_and_restore(amount: u64) { // restore it. let new_db = test_helpers::new_db(); - let new_chain = BlockChain::new(Default::default(), &genesis.encoded(), new_db.clone()); + let new_chain = BlockChain::new(Default::default(), genesis.encoded().raw(), new_db.clone()); let mut rebuilder = SNAPSHOT_MODE.rebuilder(new_chain, new_db.clone(), &manifest).unwrap(); let reader = PackedReader::new(&snapshot_path).unwrap().unwrap(); @@ -98,7 +97,7 @@ fn chunk_and_restore(amount: u64) { drop(rebuilder); // and test it. - let new_chain = BlockChain::new(Default::default(), &genesis.encoded(), new_db); + let new_chain = BlockChain::new(Default::default(), genesis.encoded().raw(), new_db); assert_eq!(new_chain.best_block_hash(), best_hash); } @@ -130,7 +129,7 @@ fn checks_flag() { let db = test_helpers::new_db(); let engine = ::spec::Spec::new_test().engine; - let chain = BlockChain::new(Default::default(), &genesis.last().encoded(), db.clone()); + let chain = BlockChain::new(Default::default(), genesis.last().encoded().raw(), db.clone()); let manifest = ::snapshot::ManifestData { version: 2, diff --git a/ethcore/src/test_helpers.rs b/ethcore/src/test_helpers.rs index 443e0418b5..408714571e 100644 --- a/ethcore/src/test_helpers.rs +++ b/ethcore/src/test_helpers.rs @@ -43,6 +43,7 @@ use blooms_db; use kvdb::KeyValueDB; use kvdb_rocksdb; use tempdir::TempDir; +use encoded; /// Creates test block with corresponding header pub fn create_test_block(header: &Header) -> Bytes { @@ -354,10 +355,9 @@ pub fn generate_dummy_blockchain(block_number: u32) -> BlockChain { let mut batch = db.key_value().transaction(); for block_order in 1..block_number { // Total difficulty is always 0 here. - bc.insert_block(&mut batch, &create_unverifiable_block(block_order, bc.best_block_hash()), vec![], ExtrasInsert { + bc.insert_block(&mut batch, encoded::Block::new(create_unverifiable_block(block_order, bc.best_block_hash())), vec![], ExtrasInsert { fork_choice: ::engines::ForkChoice::New, is_finalized: false, - metadata: None, }); bc.commit(); } @@ -373,10 +373,9 @@ pub fn generate_dummy_blockchain_with_extra(block_number: u32) -> BlockChain { let mut batch = db.key_value().transaction(); for block_order in 1..block_number { // Total difficulty is always 0 here. - bc.insert_block(&mut batch, &create_unverifiable_block_with_extra(block_order, bc.best_block_hash(), None), vec![], ExtrasInsert { + bc.insert_block(&mut batch, encoded::Block::new(create_unverifiable_block_with_extra(block_order, bc.best_block_hash(), None)), vec![], ExtrasInsert { fork_choice: ::engines::ForkChoice::New, is_finalized: false, - metadata: None, }); bc.commit(); } diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index a021013543..a0ecf96342 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -467,7 +467,6 @@ mod tests { parent: header.parent_hash().clone(), children: Vec::new(), is_finalized: false, - metadata: None, } }) } diff --git a/machine/src/lib.rs b/machine/src/lib.rs index 6d152851da..a3f640fe57 100644 --- a/machine/src/lib.rs +++ b/machine/src/lib.rs @@ -95,22 +95,6 @@ pub trait Transactions: LiveBlock { fn transactions(&self) -> &[Self::Transaction]; } -/// Trait for blocks which have finalized information. -pub trait Finalizable: LiveBlock { - /// Get whether the block is finalized. - fn is_finalized(&self) -> bool; - /// Mark the block as finalized. - fn mark_finalized(&mut self); -} - -/// A state machine with block metadata. -pub trait WithMetadata: LiveBlock { - /// Get the current live block metadata. - fn metadata(&self) -> Option<&[u8]>; - /// Set the current live block metadata. - fn set_metadata(&mut self, value: Option>); -} - /// Generalization of types surrounding blockchain-suitable state machines. pub trait Machine: for<'a> LocalizedMachine<'a> { /// The block header type. -- GitLab From 771ea47d376d7492ef3a1aa1e2c612c45bccba2b Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Mon, 30 Jul 2018 13:28:44 +0300 Subject: [PATCH 182/191] Update Dockerfile (#9242) * Update Dockerfile fix Docker build * fix dockerfile paths: parity -> parity-ethereum (#9248) --- docker/hub/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/hub/Dockerfile b/docker/hub/Dockerfile index 88b11a524c..eb007dc10a 100644 --- a/docker/hub/Dockerfile +++ b/docker/hub/Dockerfile @@ -34,12 +34,12 @@ RUN apt-get update && \ RUST_BACKTRACE=1 && \ # build parity cd /build&&git clone https://github.com/paritytech/parity-ethereum && \ - cd parity && \ + cd parity-ethereum&& \ git pull&& \ git checkout $BUILD_TAG && \ cargo build --verbose --release --features final && \ - strip /build/parity/target/release/parity && \ - file /build/parity/target/release/parity&&mkdir -p /parity&& cp /build/parity/target/release/parity /parity&&\ + strip /build/parity-ethereum/target/release/parity && \ + file /build/parity-ethereum/target/release/parity&&mkdir -p /parity&& cp /build/parity-ethereum/target/release/parity /parity&&\ #cleanup Docker image rm -rf /root/.cargo&&rm -rf /root/.multirust&&rm -rf /root/.rustup&&rm -rf /build&&\ apt-get purge -y \ -- GitLab From f9814381a7c36d9b14f326f64c7b476e9549d846 Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Mon, 30 Jul 2018 13:59:01 +0200 Subject: [PATCH 183/191] Improve Tracer documentation (#9237) --- ethcore/src/trace/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ethcore/src/trace/mod.rs b/ethcore/src/trace/mod.rs index 569b2a6791..90ea64b5d2 100644 --- a/ethcore/src/trace/mod.rs +++ b/ethcore/src/trace/mod.rs @@ -49,15 +49,21 @@ pub trait Tracer: Send { type Output; /// Prepares call trace for given params. Noop tracer should return None. + /// + /// This is called before a call has been executed. fn prepare_trace_call(&self, params: &ActionParams) -> Option; /// Prepares create trace for given params. Noop tracer should return None. + /// + /// This is called before a create has been executed. fn prepare_trace_create(&self, params: &ActionParams) -> Option; /// Prepare trace output. Noop tracer should return None. fn prepare_trace_output(&self) -> Option; /// Stores trace call info. + /// + /// This is called after a call has completed successfully. fn trace_call( &mut self, call: Option, @@ -67,6 +73,8 @@ pub trait Tracer: Send { ); /// Stores trace create info. + /// + /// This is called after a create has completed successfully. fn trace_create( &mut self, create: Option, @@ -77,9 +85,13 @@ pub trait Tracer: Send { ); /// Stores failed call trace. + /// + /// This is called after a call has completed erroneously. fn trace_failed_call(&mut self, call: Option, subs: Vec, error: TraceError); /// Stores failed create trace. + /// + /// This is called after a create has completed erroneously. fn trace_failed_create(&mut self, create: Option, subs: Vec, error: TraceError); /// Stores suicide info. -- GitLab From 29baccd857fea3d2d3298528cb3c3327b0b5af22 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Tue, 31 Jul 2018 13:27:57 +0800 Subject: [PATCH 184/191] Implement EIP-1052 (EXTCODEHASH) and fix several issues in state account cache (#9234) * Implement EIP-1052 and fix several issues related to account cache * Fix jsontests * Merge two matches together * Avoid making unnecessary Arc * Address grumbles --- ethcore/evm/src/instructions.rs | 3 ++ ethcore/evm/src/interpreter/gasometer.rs | 3 ++ ethcore/evm/src/interpreter/mod.rs | 18 +++++++--- ethcore/src/client/client.rs | 2 +- ethcore/src/executive.rs | 2 +- ethcore/src/externalities.rs | 16 +++++---- ethcore/src/json_tests/executive.rs | 8 +++-- ethcore/src/machine.rs | 2 +- ethcore/src/spec/spec.rs | 7 ++++ ethcore/src/state/account.rs | 16 +++++---- ethcore/src/state/mod.rs | 46 +++++++++++++++--------- ethcore/vm/src/ext.rs | 7 ++-- ethcore/vm/src/schedule.rs | 8 +++++ ethcore/vm/src/tests.rs | 13 ++++--- json/src/spec/params.rs | 3 ++ 15 files changed, 111 insertions(+), 43 deletions(-) diff --git a/ethcore/evm/src/instructions.rs b/ethcore/evm/src/instructions.rs index 7a41ed33c7..3be4556942 100644 --- a/ethcore/evm/src/instructions.rs +++ b/ethcore/evm/src/instructions.rs @@ -134,6 +134,8 @@ enum_with_from_u8! { RETURNDATASIZE = 0x3d, #[doc = "copy return data buffer to memory"] RETURNDATACOPY = 0x3e, + #[doc = "return the keccak256 hash of contract code"] + EXTCODEHASH = 0x3f, #[doc = "get hash of most recent complete block"] BLOCKHASH = 0x40, @@ -492,6 +494,7 @@ lazy_static! { arr[CALLDATALOAD as usize] = Some(InstructionInfo::new("CALLDATALOAD", 1, 1, GasPriceTier::VeryLow)); arr[CALLDATASIZE as usize] = Some(InstructionInfo::new("CALLDATASIZE", 0, 1, GasPriceTier::Base)); arr[CALLDATACOPY as usize] = Some(InstructionInfo::new("CALLDATACOPY", 3, 0, GasPriceTier::VeryLow)); + arr[EXTCODEHASH as usize] = Some(InstructionInfo::new("EXTCODEHASH", 1, 1, GasPriceTier::Special)); arr[CODESIZE as usize] = Some(InstructionInfo::new("CODESIZE", 0, 1, GasPriceTier::Base)); arr[CODECOPY as usize] = Some(InstructionInfo::new("CODECOPY", 3, 0, GasPriceTier::VeryLow)); arr[GASPRICE as usize] = Some(InstructionInfo::new("GASPRICE", 0, 1, GasPriceTier::Base)); diff --git a/ethcore/evm/src/interpreter/gasometer.rs b/ethcore/evm/src/interpreter/gasometer.rs index dbb3338379..943a8320bb 100644 --- a/ethcore/evm/src/interpreter/gasometer.rs +++ b/ethcore/evm/src/interpreter/gasometer.rs @@ -143,6 +143,9 @@ impl Gasometer { instructions::EXTCODESIZE => { Request::Gas(Gas::from(schedule.extcodesize_gas)) }, + instructions::EXTCODEHASH => { + Request::Gas(Gas::from(schedule.extcodehash_gas)) + }, instructions::SUICIDE => { let mut gas = Gas::from(schedule.suicide_gas); diff --git a/ethcore/evm/src/interpreter/mod.rs b/ethcore/evm/src/interpreter/mod.rs index 1119869138..6b8abcc17f 100644 --- a/ethcore/evm/src/interpreter/mod.rs +++ b/ethcore/evm/src/interpreter/mod.rs @@ -230,8 +230,9 @@ impl Interpreter { (instruction == instructions::STATICCALL && !schedule.have_static_call) || ((instruction == instructions::RETURNDATACOPY || instruction == instructions::RETURNDATASIZE) && !schedule.have_return_data) || (instruction == instructions::REVERT && !schedule.have_revert) || - ((instruction == instructions::SHL || instruction == instructions::SHR || instruction == instructions::SAR) && !schedule.have_bitwise_shifting) { - + ((instruction == instructions::SHL || instruction == instructions::SHR || instruction == instructions::SAR) && !schedule.have_bitwise_shifting) || + (instruction == instructions::EXTCODEHASH && !schedule.have_extcodehash) + { return Err(vm::Error::BadInstruction { instruction: instruction as u8 }); @@ -568,9 +569,14 @@ impl Interpreter { }, instructions::EXTCODESIZE => { let address = u256_to_address(&stack.pop_back()); - let len = ext.extcodesize(&address)?; + let len = ext.extcodesize(&address)?.unwrap_or(0); stack.push(U256::from(len)); }, + instructions::EXTCODEHASH => { + let address = u256_to_address(&stack.pop_back()); + let hash = ext.extcodehash(&address)?.unwrap_or_else(H256::zero); + stack.push(U256::from(hash)); + }, instructions::CALLDATACOPY => { Self::copy_data_to_memory(&mut self.mem, stack, params.data.as_ref().map_or_else(|| &[] as &[u8], |d| &*d as &[u8])); }, @@ -591,7 +597,11 @@ impl Interpreter { instructions::EXTCODECOPY => { let address = u256_to_address(&stack.pop_back()); let code = ext.extcode(&address)?; - Self::copy_data_to_memory(&mut self.mem, stack, &code); + Self::copy_data_to_memory( + &mut self.mem, + stack, + code.as_ref().map(|c| &(*c)[..]).unwrap_or(&[]) + ); }, instructions::GASPRICE => { stack.push(params.gas_price.clone()); diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 47974356f1..a68c1e4956 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1339,7 +1339,7 @@ impl BlockInfo for Client { } fn code_hash(&self, address: &Address, id: BlockId) -> Option { - self.state_at(id).and_then(|s| s.code_hash(address).ok()) + self.state_at(id).and_then(|s| s.code_hash(address).unwrap_or(None)) } } diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index 1243eeea3e..9bb0bc8f9f 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -323,7 +323,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> { gas_price: t.gas_price, value: ActionValue::Transfer(t.value), code: self.state.code(address)?, - code_hash: Some(self.state.code_hash(address)?), + code_hash: self.state.code_hash(address)?, data: Some(t.data.clone()), call_type: CallType::Call, params_type: vm::ParamsType::Separate, diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index 9aa308a230..c1bd785c4a 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -165,7 +165,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> gas: self.machine.params().eip210_contract_gas, gas_price: 0.into(), code: code, - code_hash: Some(code_hash), + code_hash: code_hash, data: Some(H256::from(number).to_vec()), call_type: CallType::Call, params_type: vm::ParamsType::Separate, @@ -272,7 +272,7 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> gas: *gas, gas_price: self.origin_info.gas_price, code: code, - code_hash: Some(code_hash), + code_hash: code_hash, data: Some(data.to_vec()), call_type: call_type, params_type: vm::ParamsType::Separate, @@ -291,12 +291,16 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for Externalities<'a, T, V, B> } } - fn extcode(&self, address: &Address) -> vm::Result> { - Ok(self.state.code(address)?.unwrap_or_else(|| Arc::new(vec![]))) + fn extcode(&self, address: &Address) -> vm::Result>> { + Ok(self.state.code(address)?) + } + + fn extcodehash(&self, address: &Address) -> vm::Result> { + Ok(self.state.code_hash(address)?) } - fn extcodesize(&self, address: &Address) -> vm::Result { - Ok(self.state.code_size(address)?.unwrap_or(0)) + fn extcodesize(&self, address: &Address) -> vm::Result> { + Ok(self.state.code_size(address)?) } fn ret(mut self, gas: &U256, data: &ReturnData, apply_state: bool) -> vm::Result diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index 3fc14be2ad..a8fd4b4537 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -166,14 +166,18 @@ impl<'a, T: 'a, V: 'a, B: 'a> Ext for TestExt<'a, T, V, B> MessageCallResult::Success(*gas, ReturnData::empty()) } - fn extcode(&self, address: &Address) -> vm::Result> { + fn extcode(&self, address: &Address) -> vm::Result>> { self.ext.extcode(address) } - fn extcodesize(&self, address: &Address) -> vm::Result { + fn extcodesize(&self, address: &Address) -> vm::Result> { self.ext.extcodesize(address) } + fn extcodehash(&self, address: &Address) -> vm::Result> { + self.ext.extcodehash(address) + } + fn log(&mut self, topics: Vec, data: &[u8]) -> vm::Result<()> { self.ext.log(topics, data) } diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 633f837dc5..d58a3878d7 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -140,7 +140,7 @@ impl EthereumMachine { gas_price: 0.into(), value: ActionValue::Transfer(0.into()), code: state.code(&contract_address)?, - code_hash: Some(state.code_hash(&contract_address)?), + code_hash: state.code_hash(&contract_address)?, data: data, call_type: CallType::Call, params_type: ParamsType::Separate, diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 015755f836..d79775f788 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -115,6 +115,8 @@ pub struct CommonParams { pub eip214_transition: BlockNumber, /// Number of first block where EIP-145 rules begin. pub eip145_transition: BlockNumber, + /// Number of first block where EIP-1052 rules begin. + pub eip1052_transition: BlockNumber, /// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin. pub dust_protection_transition: BlockNumber, /// Nonce cap increase per block. Nonce cap is only checked if dust protection is enabled. @@ -174,6 +176,7 @@ impl CommonParams { schedule.have_static_call = block_number >= self.eip214_transition; schedule.have_return_data = block_number >= self.eip211_transition; schedule.have_bitwise_shifting = block_number >= self.eip145_transition; + schedule.have_extcodehash = block_number >= self.eip1052_transition; if block_number >= self.eip210_transition { schedule.blockhash_gas = 800; } @@ -270,6 +273,10 @@ impl From for CommonParams { BlockNumber::max_value, Into::into, ), + eip1052_transition: p.eip1052_transition.map_or_else( + BlockNumber::max_value, + Into::into, + ), dust_protection_transition: p.dust_protection_transition.map_or_else( BlockNumber::max_value, Into::into, diff --git a/ethcore/src/state/account.rs b/ethcore/src/state/account.rs index 359b84b1ec..eec713a4e3 100644 --- a/ethcore/src/state/account.rs +++ b/ethcore/src/state/account.rs @@ -278,12 +278,13 @@ impl Account { !self.code_cache.is_empty() || (self.code_cache.is_empty() && self.code_hash == KECCAK_EMPTY) } - /// Provide a database to get `code_hash`. Should not be called if it is a contract without code. + /// Provide a database to get `code_hash`. Should not be called if it is a contract without code. Returns the cached code, if successful. + #[must_use] pub fn cache_code(&mut self, db: &HashDB) -> Option> { // TODO: fill out self.code_cache; trace!("Account::cache_code: ic={}; self.code_hash={:?}, self.code_cache={}", self.is_cached(), self.code_hash, self.code_cache.pretty()); - if self.is_cached() { return Some(self.code_cache.clone()) } + if self.is_cached() { return Some(self.code_cache.clone()); } match db.get(&self.code_hash) { Some(x) => { @@ -298,8 +299,7 @@ impl Account { } } - /// Provide code to cache. For correctness, should be the correct code for the - /// account. + /// Provide code to cache. For correctness, should be the correct code for the account. pub fn cache_given_code(&mut self, code: Arc) { trace!("Account::cache_given_code: ic={}; self.code_hash={:?}, self.code_cache={}", self.is_cached(), self.code_hash, self.code_cache.pretty()); @@ -307,7 +307,9 @@ impl Account { self.code_cache = code; } - /// Provide a database to get `code_size`. Should not be called if it is a contract without code. + /// Provide a database to get `code_size`. Should not be called if it is a contract without code. Returns whether + /// the cache succeeds. + #[must_use] pub fn cache_code_size(&mut self, db: &HashDB) -> bool { // TODO: fill out self.code_cache; trace!("Account::cache_code_size: ic={}; self.code_hash={:?}, self.code_cache={}", self.is_cached(), self.code_hash, self.code_cache.pretty()); @@ -324,7 +326,9 @@ impl Account { }, } } else { - false + // If the code hash is empty hash, then the code size is zero. + self.code_size = Some(0); + true } } diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 796ec0c1d1..323e11ccb2 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -608,9 +608,9 @@ impl State { } /// Get an account's code hash. - pub fn code_hash(&self, a: &Address) -> TrieResult { + pub fn code_hash(&self, a: &Address) -> TrieResult> { self.ensure_cached(a, RequireCache::None, true, - |a| a.as_ref().map_or(KECCAK_EMPTY, |a| a.code_hash())) + |a| a.as_ref().map(|a| a.code_hash())) } /// Get accounts' code size. @@ -911,31 +911,38 @@ impl State { Ok(pod_state::diff_pod(&pod_state_pre, &pod_state_post)) } - // load required account data from the databases. - fn update_account_cache(require: RequireCache, account: &mut Account, state_db: &B, db: &HashDB) { + /// Load required account data from the databases. Returns whether the cache succeeds. + #[must_use] + fn update_account_cache(require: RequireCache, account: &mut Account, state_db: &B, db: &HashDB) -> bool { if let RequireCache::None = require { - return; + return true; } if account.is_cached() { - return; + return true; } // if there's already code in the global cache, always cache it localy let hash = account.code_hash(); match state_db.get_cached_code(&hash) { - Some(code) => account.cache_given_code(code), + Some(code) => { + account.cache_given_code(code); + true + }, None => match require { - RequireCache::None => {}, + RequireCache::None => true, RequireCache::Code => { if let Some(code) = account.cache_code(db) { // propagate code loaded from the database to // the global code cache. - state_db.cache_code(hash, code) + state_db.cache_code(hash, code); + true + } else { + false } }, RequireCache::CodeSize => { - account.cache_code_size(db); + account.cache_code_size(db) } } } @@ -950,8 +957,11 @@ impl State { if let Some(ref mut maybe_acc) = self.cache.borrow_mut().get_mut(a) { if let Some(ref mut account) = maybe_acc.account { let accountdb = self.factories.accountdb.readonly(self.db.as_hashdb(), account.address_hash(a)); - Self::update_account_cache(require, account, &self.db, accountdb.as_hashdb()); - return Ok(f(Some(account))); + if Self::update_account_cache(require, account, &self.db, accountdb.as_hashdb()) { + return Ok(f(Some(account))); + } else { + return Err(Box::new(TrieError::IncompleteDatabase(H256::from(a)))); + } } return Ok(f(None)); } @@ -959,12 +969,14 @@ impl State { let result = self.db.get_cached(a, |mut acc| { if let Some(ref mut account) = acc { let accountdb = self.factories.accountdb.readonly(self.db.as_hashdb(), account.address_hash(a)); - Self::update_account_cache(require, account, &self.db, accountdb.as_hashdb()); + if !Self::update_account_cache(require, account, &self.db, accountdb.as_hashdb()) { + return Err(Box::new(TrieError::IncompleteDatabase(H256::from(a)))); + } } - f(acc.map(|a| &*a)) + Ok(f(acc.map(|a| &*a))) }); match result { - Some(r) => Ok(r), + Some(r) => Ok(r?), None => { // first check if it is not in database for sure if check_null && self.db.is_known_null(a) { return Ok(f(None)); } @@ -975,7 +987,9 @@ impl State { let mut maybe_acc = db.get_with(a, from_rlp)?; if let Some(ref mut account) = maybe_acc.as_mut() { let accountdb = self.factories.accountdb.readonly(self.db.as_hashdb(), account.address_hash(a)); - Self::update_account_cache(require, account, &self.db, accountdb.as_hashdb()); + if !Self::update_account_cache(require, account, &self.db, accountdb.as_hashdb()) { + return Err(Box::new(TrieError::IncompleteDatabase(H256::from(a)))); + } } let r = f(maybe_acc.as_ref()); self.insert_cache(a, AccountEntry::new_clean(maybe_acc)); diff --git a/ethcore/vm/src/ext.rs b/ethcore/vm/src/ext.rs index 166e8712aa..b6d41a3952 100644 --- a/ethcore/vm/src/ext.rs +++ b/ethcore/vm/src/ext.rs @@ -106,10 +106,13 @@ pub trait Ext { ) -> MessageCallResult; /// Returns code at given address - fn extcode(&self, address: &Address) -> Result>; + fn extcode(&self, address: &Address) -> Result>>; + + /// Returns code hash at given address + fn extcodehash(&self, address: &Address) -> Result>; /// Returns code size at given address - fn extcodesize(&self, address: &Address) -> Result; + fn extcodesize(&self, address: &Address) -> Result>; /// Creates log entry with given topics and data fn log(&mut self, topics: Vec, data: &[u8]) -> Result<()>; diff --git a/ethcore/vm/src/schedule.rs b/ethcore/vm/src/schedule.rs index 960821e72c..6215aed78d 100644 --- a/ethcore/vm/src/schedule.rs +++ b/ethcore/vm/src/schedule.rs @@ -26,6 +26,8 @@ pub struct Schedule { pub have_create2: bool, /// Does it have a REVERT instruction pub have_revert: bool, + /// Does it have a EXTCODEHASH instruction + pub have_extcodehash: bool, /// VM stack limit pub stack_limit: usize, /// Max number of nested calls/creates @@ -92,6 +94,8 @@ pub struct Schedule { pub extcodecopy_base_gas: usize, /// Price of BALANCE pub balance_gas: usize, + /// Price of EXTCODEHASH + pub extcodehash_gas: usize, /// Price of SUICIDE pub suicide_gas: usize, /// Amount of additional gas to pay when SUICIDE credits a non-existant account @@ -197,6 +201,7 @@ impl Schedule { have_revert: false, have_return_data: false, have_bitwise_shifting: false, + have_extcodehash: false, stack_limit: 1024, max_depth: 1024, tier_step_gas: [0, 2, 3, 5, 8, 10, 20, 0], @@ -229,6 +234,7 @@ impl Schedule { copy_gas: 3, extcodesize_gas: 700, extcodecopy_base_gas: 700, + extcodehash_gas: 400, balance_gas: 400, suicide_gas: 5000, suicide_to_new_account_cost: 25000, @@ -268,6 +274,7 @@ impl Schedule { have_revert: false, have_return_data: false, have_bitwise_shifting: false, + have_extcodehash: false, stack_limit: 1024, max_depth: 1024, tier_step_gas: [0, 2, 3, 5, 8, 10, 20, 0], @@ -300,6 +307,7 @@ impl Schedule { copy_gas: 3, extcodesize_gas: 20, extcodecopy_base_gas: 20, + extcodehash_gas: 400, balance_gas: 20, suicide_gas: 0, suicide_to_new_account_cost: 0, diff --git a/ethcore/vm/src/tests.rs b/ethcore/vm/src/tests.rs index 9a17e0d3dc..d83e6881a1 100644 --- a/ethcore/vm/src/tests.rs +++ b/ethcore/vm/src/tests.rs @@ -24,6 +24,7 @@ use { ReturnData, Ext, ContractCreateResult, MessageCallResult, CreateContractAddress, Result, GasLeft, }; +use hash::keccak; pub struct FakeLogEntry { pub topics: Vec, @@ -168,12 +169,16 @@ impl Ext for FakeExt { MessageCallResult::Success(*gas, ReturnData::empty()) } - fn extcode(&self, address: &Address) -> Result> { - Ok(self.codes.get(address).unwrap_or(&Arc::new(Bytes::new())).clone()) + fn extcode(&self, address: &Address) -> Result>> { + Ok(self.codes.get(address).cloned()) } - fn extcodesize(&self, address: &Address) -> Result { - Ok(self.codes.get(address).map_or(0, |c| c.len())) + fn extcodesize(&self, address: &Address) -> Result> { + Ok(self.codes.get(address).map(|c| c.len())) + } + + fn extcodehash(&self, address: &Address) -> Result> { + Ok(self.codes.get(address).map(|c| keccak(c.as_ref()))) } fn log(&mut self, topics: Vec, data: &[u8]) -> Result<()> { diff --git a/json/src/spec/params.rs b/json/src/spec/params.rs index e03fe7081b..a37e4f23ba 100644 --- a/json/src/spec/params.rs +++ b/json/src/spec/params.rs @@ -109,6 +109,9 @@ pub struct Params { #[serde(rename="eip658Transition")] pub eip658_transition: Option, /// See `CommonParams` docs. + #[serde(rename="eip1052Transition")] + pub eip1052_transition: Option, + /// See `CommonParams` docs. #[serde(rename="dustProtectionTransition")] pub dust_protection_transition: Option, /// See `CommonParams` docs. -- GitLab From 10f42a2b390281b7bed225486b21cdd1aab6195e Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 31 Jul 2018 11:55:18 +0200 Subject: [PATCH 185/191] removed client error (#9253) --- ethcore/src/client/client.rs | 3 +- ethcore/src/client/error.rs | 55 ------------------------------------ ethcore/src/client/mod.rs | 2 -- ethcore/src/error.rs | 16 ----------- 4 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 ethcore/src/client/error.rs diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index a68c1e4956..f63615701e 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -34,7 +34,6 @@ use ethereum_types::{H256, Address, U256}; use block::{IsBlock, LockedBlock, Drain, ClosedBlock, OpenBlock, enact_verified, SealedBlock}; use blockchain::{BlockChain, BlockChainDB, BlockProvider, TreeRoute, ImportRoute, TransactionAddress, ExtrasInsert}; use client::ancient_import::AncientVerifier; -use client::Error as ClientError; use client::{ Nonce, Balance, ChainInfo, BlockInfo, CallContract, TransactionInfo, RegistryInfo, ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock, @@ -933,7 +932,7 @@ impl Client { } // prune ancient states until below the memory limit or only the minimum amount remain. - fn prune_ancient(&self, mut state_db: StateDB, chain: &BlockChain) -> Result<(), ClientError> { + fn prune_ancient(&self, mut state_db: StateDB, chain: &BlockChain) -> Result<(), ::error::Error> { let number = match state_db.journal_db().latest_era() { Some(n) => n, None => return Ok(()), diff --git a/ethcore/src/client/error.rs b/ethcore/src/client/error.rs deleted file mode 100644 index 6851a4057b..0000000000 --- a/ethcore/src/client/error.rs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2015-2018 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::fmt::{Display, Formatter, Error as FmtError}; -use std::io; -use ethtrie::TrieError; - -/// Client configuration errors. -#[derive(Debug)] -pub enum Error { - /// TrieDB-related error. - Trie(TrieError), - /// Io error. - Io(io::Error), -} - -impl From for Error { - fn from(err: TrieError) -> Self { - Error::Trie(err) - } -} - -impl From for Error { - fn from(err: io::Error) -> Self { - Error::Io(err) - } -} - -impl From> for Error where Error: From { - fn from(err: Box) -> Self { - Error::from(*err) - } -} - -impl Display for Error { - fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> { - match *self { - Error::Trie(ref err) => write!(f, "{}", err), - Error::Io(ref err) => write!(f, "{}", err), - } - } -} diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 8c5abf3f5d..ffd303c127 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -19,7 +19,6 @@ mod ancient_import; mod client; mod config; -mod error; #[cfg(any(test, feature = "test-helpers"))] mod evm_test_client; mod io_message; @@ -29,7 +28,6 @@ mod trace; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; -pub use self::error::Error; #[cfg(any(test, feature = "test-helpers"))] pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult}; pub use self::io_message::ClientIoMessage; diff --git a/ethcore/src/error.rs b/ethcore/src/error.rs index 88b50f8134..75b2b51750 100644 --- a/ethcore/src/error.rs +++ b/ethcore/src/error.rs @@ -24,7 +24,6 @@ use unexpected::{Mismatch, OutOfBounds}; use ethtrie::TrieError; use io::*; use header::BlockNumber; -use client::Error as ClientError; use snapshot::Error as SnapshotError; use engines::EngineError; use ethkey::Error as EthkeyError; @@ -250,12 +249,6 @@ error_chain! { } errors { - #[doc = "Client configuration error."] - Client(err: ClientError) { - description("Client configuration error.") - display("Client configuration error {}", err) - } - #[doc = "Snapshot error."] Snapshot(err: SnapshotError) { description("Snapshot error.") @@ -297,15 +290,6 @@ error_chain! { /// Result of import block operation. pub type ImportResult = EthcoreResult; -impl From for Error { - fn from(err: ClientError) -> Error { - match err { - ClientError::Trie(err) => ErrorKind::Trie(err).into(), - _ => ErrorKind::Client(err).into() - } - } -} - impl From for Error { fn from(err: AccountsError) -> Error { ErrorKind::AccountProvider(err).into() -- GitLab From f0c0da85515c9163a8ff06d1ac56b72545ab2cbe Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Tue, 31 Jul 2018 04:52:49 -0700 Subject: [PATCH 186/191] Check if synced when using eth_getWork (#9193) (#9210) * Check if synced when using eth_getWork (#9193) * Don't use fn syncing * Fix identation * Fix typo * Don't check for warping * rpc: avoid calling queue_info twice on eth_getWork --- rpc/src/v1/impls/eth.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index d20b2feb26..f8934b26e6 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -744,9 +744,11 @@ impl Eth for EthClient< // check if we're still syncing and return empty strings in that case { - //TODO: check if initial sync is complete here - //let sync = self.sync; - if /*sync.status().state != SyncState::Idle ||*/ self.client.queue_info().total_queue_size() > MAX_QUEUE_SIZE_TO_MINE_ON { + let sync_status = self.sync.status(); + let queue_info = self.client.queue_info(); + let total_queue_size = queue_info.total_queue_size(); + + if is_major_importing(Some(sync_status.state), queue_info) || total_queue_size > MAX_QUEUE_SIZE_TO_MINE_ON { trace!(target: "miner", "Syncing. Cannot give any work."); return Err(errors::no_work()); } -- GitLab From 637883f52b249be8284d77ac7a76968ebff4aefa Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Wed, 1 Aug 2018 19:17:04 +0800 Subject: [PATCH 187/191] Comply EIP-86 with the new definition (#9140) * Comply EIP-86 with the new CREATE2 opcode * Fix rpc compile * Fix interpreter CREATE/CREATE2 stack pop difference * Add unreachable! to fix compile * Fix instruction_info * Fix gas check due to new stack item * Add new tests in executive * Fix have_create2 comment * Remove all unused references of eip86_transition and block_number --- ethcore/evm/src/instructions.rs | 2 +- ethcore/evm/src/interpreter/gasometer.rs | 6 +++- ethcore/evm/src/interpreter/mod.rs | 6 +++- ethcore/src/executive.rs | 8 +++-- ethcore/src/externalities.rs | 40 ++++++++++++++++++++++++ ethcore/src/machine.rs | 8 ++--- ethcore/vm/src/ext.rs | 8 ++--- ethcore/vm/src/schedule.rs | 2 +- rpc/src/v1/helpers/dispatch.rs | 6 ++-- rpc/src/v1/helpers/light_fetch.rs | 8 ++--- rpc/src/v1/impls/eth.rs | 11 +++---- rpc/src/v1/impls/light/eth.rs | 17 +++------- rpc/src/v1/impls/light/parity.rs | 8 ++--- rpc/src/v1/impls/parity.rs | 12 ++----- rpc/src/v1/impls/parity_set.rs | 5 +-- rpc/src/v1/tests/mocked/signing.rs | 2 +- rpc/src/v1/types/transaction.rs | 20 ++++++------ 17 files changed, 96 insertions(+), 73 deletions(-) diff --git a/ethcore/evm/src/instructions.rs b/ethcore/evm/src/instructions.rs index 3be4556942..67d390d4df 100644 --- a/ethcore/evm/src/instructions.rs +++ b/ethcore/evm/src/instructions.rs @@ -594,7 +594,7 @@ lazy_static! { arr[DELEGATECALL as usize] = Some(InstructionInfo::new("DELEGATECALL", 6, 1, GasPriceTier::Special)); arr[STATICCALL as usize] = Some(InstructionInfo::new("STATICCALL", 6, 1, GasPriceTier::Special)); arr[SUICIDE as usize] = Some(InstructionInfo::new("SUICIDE", 1, 0, GasPriceTier::Special)); - arr[CREATE2 as usize] = Some(InstructionInfo::new("CREATE2", 3, 1, GasPriceTier::Special)); + arr[CREATE2 as usize] = Some(InstructionInfo::new("CREATE2", 4, 1, GasPriceTier::Special)); arr[REVERT as usize] = Some(InstructionInfo::new("REVERT", 2, 0, GasPriceTier::Zero)); arr }; diff --git a/ethcore/evm/src/interpreter/gasometer.rs b/ethcore/evm/src/interpreter/gasometer.rs index 943a8320bb..78a33ef3ea 100644 --- a/ethcore/evm/src/interpreter/gasometer.rs +++ b/ethcore/evm/src/interpreter/gasometer.rs @@ -228,7 +228,11 @@ impl Gasometer { }, instructions::CREATE | instructions::CREATE2 => { let gas = Gas::from(schedule.create_gas); - let mem = mem_needed(stack.peek(1), stack.peek(2))?; + let mem = match instruction { + instructions::CREATE => mem_needed(stack.peek(1), stack.peek(2))?, + instructions::CREATE2 => mem_needed(stack.peek(2), stack.peek(3))?, + _ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"), + }; Request::GasMemProvide(gas, mem, None) }, diff --git a/ethcore/evm/src/interpreter/mod.rs b/ethcore/evm/src/interpreter/mod.rs index 6b8abcc17f..3af1e34dd3 100644 --- a/ethcore/evm/src/interpreter/mod.rs +++ b/ethcore/evm/src/interpreter/mod.rs @@ -317,6 +317,11 @@ impl Interpreter { }, instructions::CREATE | instructions::CREATE2 => { let endowment = stack.pop_back(); + let address_scheme = match instruction { + instructions::CREATE => CreateContractAddress::FromSenderAndNonce, + instructions::CREATE2 => CreateContractAddress::FromSenderSaltAndCodeHash(stack.pop_back().into()), + _ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"), + }; let init_off = stack.pop_back(); let init_size = stack.pop_back(); @@ -336,7 +341,6 @@ impl Interpreter { } let contract_code = self.mem.read_slice(init_off, init_size); - let address_scheme = if instruction == instructions::CREATE { CreateContractAddress::FromSenderAndNonce } else { CreateContractAddress::FromSenderAndCodeHash }; let create_result = ext.create(&create_gas.as_u256(), &endowment, contract_code, address_scheme); return match create_result { diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index 9bb0bc8f9f..b77cb050e4 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -61,10 +61,12 @@ pub fn contract_address(address_scheme: CreateContractAddress, sender: &Address, stream.append(nonce); (From::from(keccak(stream.as_raw())), None) }, - CreateContractAddress::FromCodeHash => { + CreateContractAddress::FromSenderSaltAndCodeHash(salt) => { let code_hash = keccak(code); - let mut buffer = [0xffu8; 20 + 32]; - &mut buffer[20..].copy_from_slice(&code_hash[..]); + let mut buffer = [0u8; 20 + 32 + 32]; + &mut buffer[0..20].copy_from_slice(&sender[..]); + &mut buffer[20..(20+32)].copy_from_slice(&salt[..]); + &mut buffer[(20+32)..].copy_from_slice(&code_hash[..]); (From::from(keccak(&buffer[..])), Some(code_hash)) }, CreateContractAddress::FromSenderAndCodeHash => { diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index c1bd785c4a..2dbc82f604 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -581,4 +581,44 @@ mod tests { assert_eq!(setup.sub_state.suicides.len(), 1); } + + #[test] + fn can_create() { + use std::str::FromStr; + + let mut setup = TestSetup::new(); + let state = &mut setup.state; + let mut tracer = NoopTracer; + let mut vm_tracer = NoopVMTracer; + + let address = { + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + match ext.create(&U256::max_value(), &U256::zero(), &[], CreateContractAddress::FromSenderAndNonce) { + ContractCreateResult::Created(address, _) => address, + _ => panic!("Test create failed; expected Created, got Failed/Reverted."), + } + }; + + assert_eq!(address, Address::from_str("bd770416a3345f91e4b34576cb804a576fa48eb1").unwrap()); + } + + #[test] + fn can_create2() { + use std::str::FromStr; + + let mut setup = TestSetup::new(); + let state = &mut setup.state; + let mut tracer = NoopTracer; + let mut vm_tracer = NoopVMTracer; + + let address = { + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + match ext.create(&U256::max_value(), &U256::zero(), &[], CreateContractAddress::FromSenderSaltAndCodeHash(H256::default())) { + ContractCreateResult::Created(address, _) => address, + _ => panic!("Test create failed; expected Created, got Failed/Reverted."), + } + }; + + assert_eq!(address, Address::from_str("b7c227636666831278bacdb8d7f52933b8698ab9").unwrap()); + } } diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index d58a3878d7..5b2170609a 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -310,12 +310,8 @@ impl EthereumMachine { } /// Returns new contract address generation scheme at given block number. - pub fn create_address_scheme(&self, number: BlockNumber) -> CreateContractAddress { - if number >= self.params().eip86_transition { - CreateContractAddress::FromCodeHash - } else { - CreateContractAddress::FromSenderAndNonce - } + pub fn create_address_scheme(&self, _number: BlockNumber) -> CreateContractAddress { + CreateContractAddress::FromSenderAndNonce } /// Verify a particular transaction is valid, regardless of order. diff --git a/ethcore/vm/src/ext.rs b/ethcore/vm/src/ext.rs index b6d41a3952..3e6ee1e026 100644 --- a/ethcore/vm/src/ext.rs +++ b/ethcore/vm/src/ext.rs @@ -53,11 +53,11 @@ pub enum MessageCallResult { /// Specifies how an address is calculated for a new contract. #[derive(Copy, Clone, PartialEq, Eq)] pub enum CreateContractAddress { - /// Address is calculated from nonce and sender. Pre EIP-86 (Metropolis) + /// Address is calculated from sender and nonce. Pre EIP-86 (Metropolis) FromSenderAndNonce, - /// Address is calculated from code hash. Default since EIP-86 - FromCodeHash, - /// Address is calculated from code hash and sender. Used by CREATE_P2SH instruction. + /// Address is calculated from sender, salt and code hash. EIP-86 CREATE2 scheme. + FromSenderSaltAndCodeHash(H256), + /// Address is calculated from code hash and sender. Used by pwasm create ext. FromSenderAndCodeHash, } diff --git a/ethcore/vm/src/schedule.rs b/ethcore/vm/src/schedule.rs index 6215aed78d..757d8a16d5 100644 --- a/ethcore/vm/src/schedule.rs +++ b/ethcore/vm/src/schedule.rs @@ -22,7 +22,7 @@ pub struct Schedule { pub exceptional_failed_code_deposit: bool, /// Does it have a delegate cal pub have_delegate_call: bool, - /// Does it have a CREATE_P2SH instruction + /// Does it have a CREATE2 instruction pub have_create2: bool, /// Does it have a REVERT instruction pub have_revert: bool, diff --git a/rpc/src/v1/helpers/dispatch.rs b/rpc/src/v1/helpers/dispatch.rs index c6f10400a5..9b789a56bb 100644 --- a/rpc/src/v1/helpers/dispatch.rs +++ b/rpc/src/v1/helpers/dispatch.rs @@ -178,8 +178,7 @@ impl Dispatcher } fn enrich(&self, signed_transaction: SignedTransaction) -> RpcRichRawTransaction { - let block_number = self.client.best_block_header().number(); - RpcRichRawTransaction::from_signed(signed_transaction, block_number, self.client.eip86_transition()) + RpcRichRawTransaction::from_signed(signed_transaction) } fn dispatch_transaction(&self, signed_transaction: PendingTransaction) -> Result { @@ -405,8 +404,7 @@ impl Dispatcher for LightDispatcher { } fn enrich(&self, signed_transaction: SignedTransaction) -> RpcRichRawTransaction { - let block_number = self.client.best_block_header().number(); - RpcRichRawTransaction::from_signed(signed_transaction, block_number, self.client.eip86_transition()) + RpcRichRawTransaction::from_signed(signed_transaction) } fn dispatch_transaction(&self, signed_transaction: PendingTransaction) -> Result { diff --git a/rpc/src/v1/helpers/light_fetch.rs b/rpc/src/v1/helpers/light_fetch.rs index ae8aadf94a..1da2fdf1ad 100644 --- a/rpc/src/v1/helpers/light_fetch.rs +++ b/rpc/src/v1/helpers/light_fetch.rs @@ -66,7 +66,7 @@ pub struct LightFetch { } /// Extract a transaction at given index. -pub fn extract_transaction_at_index(block: encoded::Block, index: usize, eip86_transition: u64) -> Option { +pub fn extract_transaction_at_index(block: encoded::Block, index: usize) -> Option { block.transactions().into_iter().nth(index) // Verify if transaction signature is correct. .and_then(|tx| SignedTransaction::new(tx).ok()) @@ -85,7 +85,7 @@ pub fn extract_transaction_at_index(block: encoded::Block, index: usize, eip86_t cached_sender, } }) - .map(|tx| Transaction::from_localized(tx, eip86_transition)) + .map(|tx| Transaction::from_localized(tx)) } // extract the header indicated by the given `HeaderRef` from the given responses. @@ -365,7 +365,7 @@ impl LightFetch { // Get a transaction by hash. also returns the index in the block. // Only returns transactions in the canonical chain. - pub fn transaction_by_hash(&self, tx_hash: H256, eip86_transition: u64) + pub fn transaction_by_hash(&self, tx_hash: H256) -> impl Future, Error = Error> + Send { let params = (self.sync.clone(), self.on_demand.clone()); @@ -397,7 +397,7 @@ impl LightFetch { } let index = index.index as usize; - let transaction = extract_transaction_at_index(blk, index, eip86_transition); + let transaction = extract_transaction_at_index(blk, index); if transaction.as_ref().map_or(true, |tx| tx.hash != tx_hash.into()) { // index is actively wrong: indicated block has diff --git a/rpc/src/v1/impls/eth.rs b/rpc/src/v1/impls/eth.rs index f8934b26e6..84c0aa6ed9 100644 --- a/rpc/src/v1/impls/eth.rs +++ b/rpc/src/v1/impls/eth.rs @@ -107,7 +107,6 @@ pub struct EthClient where external_miner: Arc, seed_compute: Mutex, options: EthClientOptions, - eip86_transition: u64, } #[derive(Debug)] @@ -169,7 +168,6 @@ impl EthClient EthClient BlockTransactions::Full(block.view().localized_transactions().into_iter().map(|t| Transaction::from_localized(t, self.eip86_transition)).collect()), + true => BlockTransactions::Full(block.view().localized_transactions().into_iter().map(|t| Transaction::from_localized(t)).collect()), false => BlockTransactions::Hashes(block.transaction_hashes().into_iter().map(Into::into).collect()), }, extra_data: Bytes::new(view.extra_data()), @@ -268,7 +266,7 @@ impl EthClient Result> { let client_transaction = |id| match self.client.transaction(id) { - Some(t) => Ok(Some(Transaction::from_localized(t, self.eip86_transition))), + Some(t) => Ok(Some(Transaction::from_localized(t))), None => Ok(None), }; @@ -305,7 +303,7 @@ impl EthClient Eth for EthClient< fn transaction_by_hash(&self, hash: RpcH256) -> BoxFuture> { let hash: H256 = hash.into(); - let block_number = self.client.chain_info().best_block_number; let tx = try_bf!(self.transaction(PendingTransactionId::Hash(hash))).or_else(|| { self.miner.transaction(&hash) - .map(|t| Transaction::from_pending(t.pending().clone(), block_number + 1, self.eip86_transition)) + .map(|t| Transaction::from_pending(t.pending().clone())) }); Box::new(future::ok(tx)) diff --git a/rpc/src/v1/impls/light/eth.rs b/rpc/src/v1/impls/light/eth.rs index e88ac2dab3..042720c5ca 100644 --- a/rpc/src/v1/impls/light/eth.rs +++ b/rpc/src/v1/impls/light/eth.rs @@ -142,7 +142,6 @@ impl EthClient { fn rich_block(&self, id: BlockId, include_txs: bool) -> BoxFuture { let (on_demand, sync) = (self.on_demand.clone(), self.sync.clone()); let (client, engine) = (self.client.clone(), self.client.engine().clone()); - let eip86_transition = self.client.eip86_transition(); // helper for filling out a rich block once we've got a block and a score. let fill_rich = move |block: encoded::Block, score: Option| { @@ -169,7 +168,7 @@ impl EthClient { seal_fields: header.seal().into_iter().cloned().map(Into::into).collect(), uncles: block.uncle_hashes().into_iter().map(Into::into).collect(), transactions: match include_txs { - true => BlockTransactions::Full(block.view().localized_transactions().into_iter().map(|t| Transaction::from_localized(t, eip86_transition)).collect()), + true => BlockTransactions::Full(block.view().localized_transactions().into_iter().map(|t| Transaction::from_localized(t)).collect()), _ => BlockTransactions::Hashes(block.transaction_hashes().into_iter().map(Into::into).collect()), }, extra_data: Bytes::new(header.extra_data().clone()), @@ -419,40 +418,34 @@ impl Eth for EthClient { fn transaction_by_hash(&self, hash: RpcH256) -> BoxFuture> { let hash = hash.into(); - let eip86 = self.client.eip86_transition(); { let tx_queue = self.transaction_queue.read(); if let Some(tx) = tx_queue.get(&hash) { return Box::new(future::ok(Some(Transaction::from_pending( tx.clone(), - self.client.chain_info().best_block_number, - eip86, )))); } } - Box::new(self.fetcher().transaction_by_hash(hash, eip86).map(|x| x.map(|(tx, _)| tx))) + Box::new(self.fetcher().transaction_by_hash(hash).map(|x| x.map(|(tx, _)| tx))) } fn transaction_by_block_hash_and_index(&self, hash: RpcH256, idx: Index) -> BoxFuture> { - let eip86 = self.client.eip86_transition(); Box::new(self.fetcher().block(BlockId::Hash(hash.into())).map(move |block| { - light_fetch::extract_transaction_at_index(block, idx.value(), eip86) + light_fetch::extract_transaction_at_index(block, idx.value()) })) } fn transaction_by_block_number_and_index(&self, num: BlockNumber, idx: Index) -> BoxFuture> { - let eip86 = self.client.eip86_transition(); Box::new(self.fetcher().block(Self::num_to_id(num)).map(move |block| { - light_fetch::extract_transaction_at_index(block, idx.value(), eip86) + light_fetch::extract_transaction_at_index(block, idx.value()) })) } fn transaction_receipt(&self, hash: RpcH256) -> BoxFuture> { - let eip86 = self.client.eip86_transition(); let fetcher = self.fetcher(); - Box::new(fetcher.transaction_by_hash(hash.clone().into(), eip86).and_then(move |tx| { + Box::new(fetcher.transaction_by_hash(hash.clone().into()).and_then(move |tx| { // the block hash included in the transaction object here has // already been checked for canonicality and whether it contains // the transaction. diff --git a/rpc/src/v1/impls/light/parity.rs b/rpc/src/v1/impls/light/parity.rs index e7dcbe9e9a..2045a4a595 100644 --- a/rpc/src/v1/impls/light/parity.rs +++ b/rpc/src/v1/impls/light/parity.rs @@ -57,7 +57,6 @@ pub struct ParityClient { settings: Arc, signer: Option>, ws_address: Option, - eip86_transition: u64, gas_price_percentile: usize, } @@ -80,7 +79,6 @@ impl ParityClient { settings, signer, ws_address, - eip86_transition: client.eip86_transition(), client, gas_price_percentile, } @@ -264,7 +262,7 @@ impl Parity for ParityClient { txq.ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp) .into_iter() .take(limit.unwrap_or_else(usize::max_value)) - .map(|tx| Transaction::from_pending(tx, chain_info.best_block_number, self.eip86_transition)) + .map(|tx| Transaction::from_pending(tx)) .collect::>() ) } @@ -279,7 +277,7 @@ impl Parity for ParityClient { current .into_iter() .chain(future.into_iter()) - .map(|tx| Transaction::from_pending(tx, chain_info.best_block_number, self.eip86_transition)) + .map(|tx| Transaction::from_pending(tx)) .collect::>() ) } @@ -290,7 +288,7 @@ impl Parity for ParityClient { Ok( txq.future_transactions(chain_info.best_block_number, chain_info.best_block_timestamp) .into_iter() - .map(|tx| Transaction::from_pending(tx, chain_info.best_block_number, self.eip86_transition)) + .map(|tx| Transaction::from_pending(tx)) .collect::>() ) } diff --git a/rpc/src/v1/impls/parity.rs b/rpc/src/v1/impls/parity.rs index c4c2ac9dba..2bdf09df48 100644 --- a/rpc/src/v1/impls/parity.rs +++ b/rpc/src/v1/impls/parity.rs @@ -62,7 +62,6 @@ pub struct ParityClient { settings: Arc, signer: Option>, ws_address: Option, - eip86_transition: u64, } impl ParityClient where @@ -81,7 +80,6 @@ impl ParityClient where signer: Option>, ws_address: Option, ) -> Self { - let eip86_transition = client.eip86_transition(); ParityClient { client, miner, @@ -93,7 +91,6 @@ impl ParityClient where settings, signer, ws_address, - eip86_transition, } } } @@ -296,7 +293,6 @@ impl Parity for ParityClient where } fn pending_transactions(&self, limit: Trailing) -> Result> { - let block_number = self.client.chain_info().best_block_number; let ready_transactions = self.miner.ready_transactions( &*self.client, limit.unwrap_or_else(usize::max_value), @@ -305,18 +301,17 @@ impl Parity for ParityClient where Ok(ready_transactions .into_iter() - .map(|t| Transaction::from_pending(t.pending().clone(), block_number, self.eip86_transition)) + .map(|t| Transaction::from_pending(t.pending().clone())) .collect() ) } fn all_transactions(&self) -> Result> { - let block_number = self.client.chain_info().best_block_number; let all_transactions = self.miner.queued_transactions(); Ok(all_transactions .into_iter() - .map(|t| Transaction::from_pending(t.pending().clone(), block_number, self.eip86_transition)) + .map(|t| Transaction::from_pending(t.pending().clone())) .collect() ) } @@ -335,10 +330,9 @@ impl Parity for ParityClient where fn local_transactions(&self) -> Result> { let transactions = self.miner.local_transactions(); - let block_number = self.client.chain_info().best_block_number; Ok(transactions .into_iter() - .map(|(hash, status)| (hash.into(), LocalTransactionStatus::from(status, block_number, self.eip86_transition))) + .map(|(hash, status)| (hash.into(), LocalTransactionStatus::from(status))) .collect() ) } diff --git a/rpc/src/v1/impls/parity_set.rs b/rpc/src/v1/impls/parity_set.rs index c811b3e5da..9bbb7ceab1 100644 --- a/rpc/src/v1/impls/parity_set.rs +++ b/rpc/src/v1/impls/parity_set.rs @@ -41,7 +41,6 @@ pub struct ParitySetClient { net: Arc, fetch: F, pool: CpuPool, - eip86_transition: u64, } impl ParitySetClient @@ -63,7 +62,6 @@ impl ParitySetClient net: net.clone(), fetch: fetch, pool: pool, - eip86_transition: client.eip86_transition(), } } } @@ -191,11 +189,10 @@ impl ParitySet for ParitySetClient where } fn remove_transaction(&self, hash: H256) -> Result> { - let block_number = self.client.chain_info().best_block_number; let hash = hash.into(); Ok(self.miner.remove_transaction(&hash) - .map(|t| Transaction::from_pending(t.pending().clone(), block_number + 1, self.eip86_transition)) + .map(|t| Transaction::from_pending(t.pending().clone())) ) } } diff --git a/rpc/src/v1/tests/mocked/signing.rs b/rpc/src/v1/tests/mocked/signing.rs index 632d8fb76b..c063ee0960 100644 --- a/rpc/src/v1/tests/mocked/signing.rs +++ b/rpc/src/v1/tests/mocked/signing.rs @@ -339,7 +339,7 @@ fn should_add_sign_transaction_to_the_queue() { // respond let sender = signer.take(&1.into()).unwrap(); signer.request_confirmed(sender, Ok(ConfirmationResponse::SignTransaction( - RichRawTransaction::from_signed(t.into(), 0x0, u64::max_value()) + RichRawTransaction::from_signed(t.into()) ))); break } diff --git a/rpc/src/v1/types/transaction.rs b/rpc/src/v1/types/transaction.rs index d41fc84e00..4266f60b62 100644 --- a/rpc/src/v1/types/transaction.rs +++ b/rpc/src/v1/types/transaction.rs @@ -161,8 +161,8 @@ pub struct RichRawTransaction { impl RichRawTransaction { /// Creates new `RichRawTransaction` from `SignedTransaction`. - pub fn from_signed(tx: SignedTransaction, block_number: u64, eip86_transition: u64) -> Self { - let tx = Transaction::from_signed(tx, block_number, eip86_transition); + pub fn from_signed(tx: SignedTransaction) -> Self { + let tx = Transaction::from_signed(tx); RichRawTransaction { raw: tx.raw.clone(), transaction: tx, @@ -172,9 +172,9 @@ impl RichRawTransaction { impl Transaction { /// Convert `LocalizedTransaction` into RPC Transaction. - pub fn from_localized(mut t: LocalizedTransaction, eip86_transition: u64) -> Transaction { + pub fn from_localized(mut t: LocalizedTransaction) -> Transaction { let signature = t.signature(); - let scheme = if t.block_number >= eip86_transition { CreateContractAddress::FromCodeHash } else { CreateContractAddress::FromSenderAndNonce }; + let scheme = CreateContractAddress::FromSenderAndNonce; Transaction { hash: t.hash().into(), nonce: t.nonce.into(), @@ -206,9 +206,9 @@ impl Transaction { } /// Convert `SignedTransaction` into RPC Transaction. - pub fn from_signed(t: SignedTransaction, block_number: u64, eip86_transition: u64) -> Transaction { + pub fn from_signed(t: SignedTransaction) -> Transaction { let signature = t.signature(); - let scheme = if block_number >= eip86_transition { CreateContractAddress::FromCodeHash } else { CreateContractAddress::FromSenderAndNonce }; + let scheme = CreateContractAddress::FromSenderAndNonce; Transaction { hash: t.hash().into(), nonce: t.nonce.into(), @@ -240,8 +240,8 @@ impl Transaction { } /// Convert `PendingTransaction` into RPC Transaction. - pub fn from_pending(t: PendingTransaction, block_number: u64, eip86_transition: u64) -> Transaction { - let mut r = Transaction::from_signed(t.transaction, block_number, eip86_transition); + pub fn from_pending(t: PendingTransaction) -> Transaction { + let mut r = Transaction::from_signed(t.transaction); r.condition = t.condition.map(|b| b.into()); r } @@ -249,9 +249,9 @@ impl Transaction { impl LocalTransactionStatus { /// Convert `LocalTransactionStatus` into RPC `LocalTransactionStatus`. - pub fn from(s: miner::pool::local_transactions::Status, block_number: u64, eip86_transition: u64) -> Self { + pub fn from(s: miner::pool::local_transactions::Status) -> Self { let convert = |tx: Arc| { - Transaction::from_signed(tx.signed().clone(), block_number, eip86_transition) + Transaction::from_signed(tx.signed().clone()) }; use miner::pool::local_transactions::Status::*; match s { -- GitLab From c22498066b6546c4a2bd58f1ff4a664d00142f43 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Wed, 1 Aug 2018 18:03:41 +0200 Subject: [PATCH 188/191] Update ref to `parity-common` and update `seek` behaviour (#9257) * Update ref to `parity-common` and update `seek` behaviour * Remove reference to `ng-fix-triedb-seek` branch --- Cargo.lock | 38 ++++++++++++++++++------------------ ethcore/src/client/client.rs | 8 +++++++- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ecec53882..54a05ba05b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -532,7 +532,7 @@ dependencies = [ "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "macros 0.1.0", "memory-cache 0.1.0", - "memorydb 0.2.0 (git+https://github.com/paritytech/parity-common)", + "memorydb 0.2.1 (git+https://github.com/paritytech/parity-common)", "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", @@ -607,7 +607,7 @@ dependencies = [ "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "memory-cache 0.1.0", - "memorydb 0.2.0 (git+https://github.com/paritytech/parity-common)", + "memorydb 0.2.1 (git+https://github.com/paritytech/parity-common)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "patricia-trie 0.2.1 (git+https://github.com/paritytech/parity-common)", @@ -1172,7 +1172,7 @@ dependencies = [ [[package]] name = "hashdb" version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1330,7 +1330,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common)", "kvdb-memorydb 0.1.0 (git+https://github.com/paritytech/parity-common)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memorydb 0.2.0 (git+https://github.com/paritytech/parity-common)", + "memorydb 0.2.1 (git+https://github.com/paritytech/parity-common)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "plain_hasher 0.1.0 (git+https://github.com/paritytech/parity-common)", @@ -1436,7 +1436,7 @@ dependencies = [ [[package]] name = "keccak-hash" version = "0.1.2" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1464,7 +1464,7 @@ dependencies = [ [[package]] name = "kvdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common)", @@ -1473,7 +1473,7 @@ dependencies = [ [[package]] name = "kvdb-memorydb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1482,7 +1482,7 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1652,8 +1652,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memorydb" -version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +version = "0.2.1" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.0 (git+https://github.com/paritytech/parity-common)", @@ -1922,7 +1922,7 @@ dependencies = [ [[package]] name = "parity-bytes" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" [[package]] name = "parity-clib" @@ -1934,7 +1934,7 @@ dependencies = [ [[package]] name = "parity-crypto" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2297,12 +2297,12 @@ dependencies = [ [[package]] name = "path" version = "0.1.1" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" [[package]] name = "patricia-trie" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashdb 0.2.0 (git+https://github.com/paritytech/parity-common)", @@ -2377,7 +2377,7 @@ dependencies = [ [[package]] name = "plain_hasher" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2630,7 +2630,7 @@ dependencies = [ [[package]] name = "rlp" version = "0.2.1" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3307,7 +3307,7 @@ dependencies = [ [[package]] name = "trie-standardmap" version = "0.1.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (git+https://github.com/paritytech/parity-common)", @@ -3318,7 +3318,7 @@ dependencies = [ [[package]] name = "triehash" version = "0.2.0" -source = "git+https://github.com/paritytech/parity-common#5f05acd90cf173f2e1ce477665be2a40502fef42" +source = "git+https://github.com/paritytech/parity-common#0045887fecd2fec39e56c962a0b27e2caf3b9474" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3729,7 +3729,7 @@ dependencies = [ "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum memorydb 0.2.0 (git+https://github.com/paritytech/parity-common)" = "" +"checksum memorydb 0.2.1 (git+https://github.com/paritytech/parity-common)" = "" "checksum mime 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e3d709ffbb330e1566dc2f2a3c9b58a5ad4a381f740b810cd305dc3f089bc160" "checksum mime_guess 2.0.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)" = "27a5e6679a0614e25adc14c6434ba84e41632b765a6d9cb2031a0cca682699ae" "checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index f63615701e..d69803980a 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1692,6 +1692,9 @@ impl BlockChainClient for Client { if let Some(after) = after { if let Err(e) = iter.seek(after) { trace!(target: "fatdb", "list_accounts: Couldn't seek the DB: {:?}", e); + } else { + // Position the iterator after the `after` element + iter.next(); } } @@ -1735,7 +1738,10 @@ impl BlockChainClient for Client { if let Some(after) = after { if let Err(e) = iter.seek(after) { - trace!(target: "fatdb", "list_accounts: Couldn't seek the DB: {:?}", e); + trace!(target: "fatdb", "list_storage: Couldn't seek the DB: {:?}", e); + } else { + // Position the iterator after the `after` element + iter.next(); } } -- GitLab From f442665c461cbfef5ac35ab7c0fbd6ca22976efb Mon Sep 17 00:00:00 2001 From: cheme Date: Thu, 2 Aug 2018 11:15:22 +0200 Subject: [PATCH 189/191] Fix eternalities tests can_create (missing parameter) (#9270) --- ethcore/src/externalities.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index 2dbc82f604..68d2c0817f 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -592,7 +592,7 @@ mod tests { let mut vm_tracer = NoopVMTracer; let address = { - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); match ext.create(&U256::max_value(), &U256::zero(), &[], CreateContractAddress::FromSenderAndNonce) { ContractCreateResult::Created(address, _) => address, _ => panic!("Test create failed; expected Created, got Failed/Reverted."), @@ -612,7 +612,8 @@ mod tests { let mut vm_tracer = NoopVMTracer; let address = { - let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + let mut ext = Externalities::new(state, &setup.env_info, &setup.machine, &setup.schedule, 0, get_test_origin(), &mut setup.sub_state, OutputPolicy::InitContract(None), &mut tracer, &mut vm_tracer, false); + match ext.create(&U256::max_value(), &U256::zero(), &[], CreateContractAddress::FromSenderSaltAndCodeHash(H256::default())) { ContractCreateResult::Created(address, _) => address, _ => panic!("Test create failed; expected Created, got Failed/Reverted."), -- GitLab From b4ae1b6528fb13821ea6524cc67fded852f776e2 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Thu, 2 Aug 2018 11:20:46 +0200 Subject: [PATCH 190/191] decode block rlp less often (#9252) in total: - removed 4 redundant rlp deserializations - avoid 1 redundant block data copy --- ethcore/src/block.rs | 59 +++++-------------- ethcore/src/client/client.rs | 55 ++++++++--------- ethcore/src/client/test_client.rs | 16 ++--- ethcore/src/client/traits.rs | 5 +- ethcore/src/engines/validator_set/multi.rs | 3 +- .../engines/validator_set/safe_contract.rs | 3 +- ethcore/src/json_tests/chain.rs | 8 +-- ethcore/src/miner/miner.rs | 2 +- ethcore/src/test_helpers.rs | 9 +-- ethcore/src/tests/client.rs | 22 +------ ethcore/src/tests/trace.rs | 7 ++- ethcore/sync/src/block_sync.rs | 24 ++++---- ethcore/sync/src/blocks.rs | 2 +- ethcore/sync/src/chain/handler.rs | 44 +++++++------- parity/blockchain.rs | 4 +- rpc/src/lib.rs | 1 - rpc/src/v1/tests/eth.rs | 17 +++--- 17 files changed, 116 insertions(+), 165 deletions(-) diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index 6f1ba7a2f0..9fd3957fb3 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -40,7 +40,7 @@ use engines::EthEngine; use error::{Error, BlockError}; use ethereum_types::{H256, U256, Address, Bloom}; use factory::Factories; -use hash::{keccak, KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP}; +use hash::keccak; use header::{Header, ExtendedHeader}; use receipt::{Receipt, TransactionOutcome}; use rlp::{Rlp, RlpStream, Encodable, Decodable, DecoderError, encode_list}; @@ -51,7 +51,6 @@ use transaction::{UnverifiedTransaction, SignedTransaction, Error as Transaction use triehash::ordered_trie_root; use unexpected::{Mismatch, OutOfBounds}; use verification::PreverifiedBlock; -use views::BlockView; use vm::{EnvInfo, LastHashes}; /// A block, encoded as it is on the block chain. @@ -66,11 +65,6 @@ pub struct Block { } impl Block { - /// Returns true if the given bytes form a valid encoding of a block in RLP. - pub fn is_good(b: &[u8]) -> bool { - Rlp::new(b).as_val::().is_ok() - } - /// Get the RLP-encoding of the block with the seal. pub fn rlp_bytes(&self) -> Bytes { let mut block_rlp = RlpStream::new_list(3); @@ -398,26 +392,11 @@ impl<'x> OpenBlock<'x> { /// Turn this into a `ClosedBlock`. pub fn close(self) -> Result { - let mut s = self; - - let unclosed_state = s.block.state.clone(); - - s.engine.on_close_block(&mut s.block)?; - s.block.state.commit()?; - - s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); - let uncle_bytes = encode_list(&s.block.uncles); - s.block.header.set_uncles_hash(keccak(&uncle_bytes)); - s.block.header.set_state_root(s.block.state.root().clone()); - s.block.header.set_receipts_root(ordered_trie_root(s.block.receipts.iter().map(|r| r.rlp_bytes()))); - s.block.header.set_log_bloom(s.block.receipts.iter().fold(Bloom::zero(), |mut b, r| { - b.accrue_bloom(&r.log_bloom); - b - })); - s.block.header.set_gas_used(s.block.receipts.last().map_or_else(U256::zero, |r| r.gas_used)); + let unclosed_state = self.block.state.clone(); + let locked = self.close_and_lock()?; Ok(ClosedBlock { - block: s.block, + block: locked.block, unclosed_state, }) } @@ -429,18 +408,11 @@ impl<'x> OpenBlock<'x> { s.engine.on_close_block(&mut s.block)?; s.block.state.commit()?; - if s.block.header.transactions_root().is_zero() || s.block.header.transactions_root() == &KECCAK_NULL_RLP { - s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); - } - if s.block.header.uncles_hash().is_zero() || s.block.header.uncles_hash() == &KECCAK_EMPTY_LIST_RLP { - let uncle_bytes = encode_list(&s.block.uncles); - s.block.header.set_uncles_hash(keccak(&uncle_bytes)); - } - if s.block.header.receipts_root().is_zero() || s.block.header.receipts_root() == &KECCAK_NULL_RLP { - s.block.header.set_receipts_root(ordered_trie_root(s.block.receipts.iter().map(|r| r.rlp_bytes()))); - } - + s.block.header.set_transactions_root(ordered_trie_root(s.block.transactions.iter().map(|e| e.rlp_bytes()))); + let uncle_bytes = encode_list(&s.block.uncles); + s.block.header.set_uncles_hash(keccak(&uncle_bytes)); s.block.header.set_state_root(s.block.state.root().clone()); + s.block.header.set_receipts_root(ordered_trie_root(s.block.receipts.iter().map(|r| r.rlp_bytes()))); s.block.header.set_log_bloom(s.block.receipts.iter().fold(Bloom::zero(), |mut b, r| { b.accrue_bloom(&r.log_bloom); b @@ -537,18 +509,16 @@ impl LockedBlock { self, engine: &EthEngine, seal: Vec, - ) -> Result { + ) -> Result { let mut s = self; s.block.header.set_seal(seal); s.block.header.compute_hash(); // TODO: passing state context to avoid engines owning it? - match engine.verify_local_seal(&s.block.header) { - Err(e) => Err((e, s)), - _ => Ok(SealedBlock { - block: s.block - }), - } + engine.verify_local_seal(&s.block.header)?; + Ok(SealedBlock { + block: s.block + }) } } @@ -637,12 +607,11 @@ pub fn enact_verified( is_epoch_begin: bool, ancestry: &mut Iterator, ) -> Result { - let view = view!(BlockView, &block.bytes); enact( block.header, block.transactions, - view.uncles(), + block.uncles, engine, tracing, db, diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index d69803980a..02af5ff0ad 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -73,6 +73,8 @@ use types::filter::Filter; use types::ancestry_action::AncestryAction; use verification; use verification::{PreverifiedBlock, Verifier, BlockQueue}; +use verification::queue::kind::blocks::Unverified; +use verification::queue::kind::BlockLike; // re-export pub use types::blockchain_info::BlockChainInfo; @@ -208,7 +210,7 @@ pub struct Client { /// Queued ancient blocks, make sure they are imported in order. queued_ancient_blocks: Arc, - VecDeque<(Header, encoded::Block, Bytes)> + VecDeque<(Unverified, Bytes)> )>>, ancient_blocks_import_lock: Arc>, /// Consensus messages import queue @@ -428,7 +430,7 @@ impl Importer { /// /// The block is guaranteed to be the next best blocks in the /// first block sequence. Does no sealing or transaction validation. - fn import_old_block(&self, header: &Header, block: encoded::Block, receipts_bytes: &[u8], db: &KeyValueDB, chain: &BlockChain) -> Result<(), ::error::Error> { + fn import_old_block(&self, unverified: Unverified, receipts_bytes: &[u8], db: &KeyValueDB, chain: &BlockChain) -> Result<(), ::error::Error> { let receipts = ::rlp::decode_list(receipts_bytes); let _import_lock = self.import_lock.lock(); @@ -436,11 +438,11 @@ impl Importer { trace_time!("import_old_block"); // verify the block, passing the chain for updating the epoch verifier. let mut rng = OsRng::new()?; - self.ancient_verifier.verify(&mut rng, &header, &chain)?; + self.ancient_verifier.verify(&mut rng, &unverified.header, &chain)?; // Commit results let mut batch = DBTransaction::new(); - chain.insert_unordered_block(&mut batch, block, receipts, None, false, true); + chain.insert_unordered_block(&mut batch, encoded::Block::new(unverified.bytes), receipts, None, false, true); // Final commit to the DB db.write_buffered(batch); chain.commit(); @@ -1381,22 +1383,15 @@ impl CallContract for Client { } impl ImportBlock for Client { - fn import_block(&self, bytes: Bytes) -> Result { - use verification::queue::kind::BlockLike; - use verification::queue::kind::blocks::Unverified; - - // create unverified block here so the `keccak` calculation can be cached. - let unverified = Unverified::from_rlp(bytes)?; - - { - if self.chain.read().is_known(&unverified.hash()) { - bail!(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain)); - } - let status = self.block_status(BlockId::Hash(unverified.parent_hash())); - if status == BlockStatus::Unknown || status == BlockStatus::Pending { - bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(unverified.parent_hash()))); - } + fn import_block(&self, unverified: Unverified) -> Result { + if self.chain.read().is_known(&unverified.hash()) { + bail!(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain)); + } + let status = self.block_status(BlockId::Hash(unverified.parent_hash())); + if status == BlockStatus::Unknown || status == BlockStatus::Pending { + bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(unverified.parent_hash()))); } + Ok(self.importer.block_queue.import(unverified)?) } } @@ -2027,24 +2022,23 @@ impl IoClient for Client { }); } - fn queue_ancient_block(&self, block_bytes: Bytes, receipts_bytes: Bytes) -> Result { + fn queue_ancient_block(&self, unverified: Unverified, receipts_bytes: Bytes) -> Result { trace_time!("queue_ancient_block"); - let header: Header = ::rlp::Rlp::new(&block_bytes).val_at(0)?; - let hash = header.hash(); + let hash = unverified.hash(); { // check block order if self.chain.read().is_known(&hash) { bail!(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain)); } - let parent_hash = header.parent_hash(); + let parent_hash = unverified.parent_hash(); // NOTE To prevent race condition with import, make sure to check queued blocks first // (and attempt to acquire lock) - let is_parent_pending = self.queued_ancient_blocks.read().0.contains(parent_hash); + let is_parent_pending = self.queued_ancient_blocks.read().0.contains(&parent_hash); if !is_parent_pending { - let status = self.block_status(BlockId::Hash(*parent_hash)); + let status = self.block_status(BlockId::Hash(parent_hash)); if status == BlockStatus::Unknown || status == BlockStatus::Pending { - bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(*parent_hash))); + bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(parent_hash))); } } } @@ -2053,7 +2047,7 @@ impl IoClient for Client { { let mut queued = self.queued_ancient_blocks.write(); queued.0.insert(hash); - queued.1.push_back((header, encoded::Block::new(block_bytes), receipts_bytes)); + queued.1.push_back((unverified, receipts_bytes)); } let queued = self.queued_ancient_blocks.clone(); @@ -2065,11 +2059,10 @@ impl IoClient for Client { let _lock = lock.lock(); for _i in 0..MAX_ANCIENT_BLOCKS_TO_IMPORT { let first = queued.write().1.pop_front(); - if let Some((header, block_bytes, receipts_bytes)) = first { - let hash = header.hash(); + if let Some((unverified, receipts_bytes)) = first { + let hash = unverified.hash(); let result = client.importer.import_old_block( - &header, - block_bytes, + unverified, &receipts_bytes, &**client.db.read().key_value(), &*client.chain.read(), diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 7a3dfcd007..627d844aeb 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -53,6 +53,7 @@ use spec::Spec; use types::basic_account::BasicAccount; use types::pruning_info::PruningInfo; use verification::queue::QueueInfo; +use verification::queue::kind::blocks::Unverified; use block::{OpenBlock, SealedBlock, ClosedBlock}; use executive::Executed; use error::CallError; @@ -280,7 +281,8 @@ impl TestBlockChainClient { rlp.append(&header); rlp.append_raw(&txs, 1); rlp.append_raw(uncles.as_raw(), 1); - self.import_block(rlp.as_raw().to_vec()).unwrap(); + let unverified = Unverified::from_rlp(rlp.out()).unwrap(); + self.import_block(unverified).unwrap(); } } @@ -512,8 +514,8 @@ impl RegistryInfo for TestBlockChainClient { } impl ImportBlock for TestBlockChainClient { - fn import_block(&self, b: Bytes) -> Result { - let header = view!(BlockView, &b).header(); + fn import_block(&self, unverified: Unverified) -> Result { + let header = unverified.header; let h = header.hash(); let number: usize = header.number() as usize; if number > self.blocks.read().len() { @@ -539,7 +541,7 @@ impl ImportBlock for TestBlockChainClient { *difficulty = *difficulty + header.difficulty().clone(); } mem::replace(&mut *self.last_hash.write(), h.clone()); - self.blocks.write().insert(h.clone(), b); + self.blocks.write().insert(h.clone(), unverified.bytes); self.numbers.write().insert(number, h.clone()); let mut parent_hash = header.parent_hash().clone(); if number > 0 { @@ -552,7 +554,7 @@ impl ImportBlock for TestBlockChainClient { } } else { - self.blocks.write().insert(h.clone(), b.to_vec()); + self.blocks.write().insert(h.clone(), unverified.bytes); } Ok(h) } @@ -856,8 +858,8 @@ impl IoClient for TestBlockChainClient { self.miner.import_external_transactions(self, txs); } - fn queue_ancient_block(&self, b: Bytes, _r: Bytes) -> Result { - self.import_block(b) + fn queue_ancient_block(&self, unverified: Unverified, _r: Bytes) -> Result { + self.import_block(unverified) } fn queue_consensus_message(&self, message: Bytes) { diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 65bf009211..3f5595f619 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -34,6 +34,7 @@ use receipt::LocalizedReceipt; use trace::LocalizedTrace; use transaction::{self, LocalizedTransaction, SignedTransaction}; use verification::queue::QueueInfo as BlockQueueInfo; +use verification::queue::kind::blocks::Unverified; use state::StateInfo; use header::Header; use engines::EthEngine; @@ -167,7 +168,7 @@ pub trait RegistryInfo { /// Provides methods to import block into blockchain pub trait ImportBlock { /// Import a block into the blockchain. - fn import_block(&self, bytes: Bytes) -> Result; + fn import_block(&self, block: Unverified) -> Result; } /// Provides `call_contract` method @@ -204,7 +205,7 @@ pub trait IoClient: Sync + Send { fn queue_transactions(&self, transactions: Vec, peer_id: usize); /// Queue block import with transaction receipts. Does no sealing and transaction validation. - fn queue_ancient_block(&self, block_bytes: Bytes, receipts_bytes: Bytes) -> Result; + fn queue_ancient_block(&self, block_bytes: Unverified, receipts_bytes: Bytes) -> Result; /// Queue conensus engine message. fn queue_consensus_message(&self, message: Bytes); diff --git a/ethcore/src/engines/validator_set/multi.rs b/ethcore/src/engines/validator_set/multi.rs index a23208cd2a..24fb2d890b 100644 --- a/ethcore/src/engines/validator_set/multi.rs +++ b/ethcore/src/engines/validator_set/multi.rs @@ -158,6 +158,7 @@ mod tests { use test_helpers::{generate_dummy_client_with_spec_and_accounts, generate_dummy_client_with_spec_and_data}; use types::ids::BlockId; use ethereum_types::Address; + use verification::queue::kind::blocks::Unverified; use super::Multi; @@ -198,7 +199,7 @@ mod tests { let sync_client = generate_dummy_client_with_spec_and_data(Spec::new_validator_multi, 0, 0, &[]); sync_client.engine().register_client(Arc::downgrade(&sync_client) as _); for i in 1..4 { - sync_client.import_block(client.block(BlockId::Number(i)).unwrap().into_inner()).unwrap(); + sync_client.import_block(Unverified::from_rlp(client.block(BlockId::Number(i)).unwrap().into_inner()).unwrap()).unwrap(); } sync_client.flush_queue(); assert_eq!(sync_client.chain_info().best_block_number, 3); diff --git a/ethcore/src/engines/validator_set/safe_contract.rs b/ethcore/src/engines/validator_set/safe_contract.rs index a7f4f2c731..adaa63f0b4 100644 --- a/ethcore/src/engines/validator_set/safe_contract.rs +++ b/ethcore/src/engines/validator_set/safe_contract.rs @@ -458,6 +458,7 @@ mod tests { use test_helpers::{generate_dummy_client_with_spec_and_accounts, generate_dummy_client_with_spec_and_data}; use super::super::ValidatorSet; use super::{ValidatorSafeContract, EVENT_NAME_HASH}; + use verification::queue::kind::blocks::Unverified; #[test] fn fetches_validators() { @@ -530,7 +531,7 @@ mod tests { let sync_client = generate_dummy_client_with_spec_and_data(Spec::new_validator_safe_contract, 0, 0, &[]); sync_client.engine().register_client(Arc::downgrade(&sync_client) as _); for i in 1..4 { - sync_client.import_block(client.block(BlockId::Number(i)).unwrap().into_inner()).unwrap(); + sync_client.import_block(Unverified::from_rlp(client.block(BlockId::Number(i)).unwrap().into_inner()).unwrap()).unwrap(); } sync_client.flush_queue(); assert_eq!(sync_client.chain_info().best_block_number, 3); diff --git a/ethcore/src/json_tests/chain.rs b/ethcore/src/json_tests/chain.rs index 2d643e75fe..83a940fcb6 100644 --- a/ethcore/src/json_tests/chain.rs +++ b/ethcore/src/json_tests/chain.rs @@ -17,12 +17,12 @@ use std::path::Path; use std::sync::Arc; use client::{EvmTestClient, Client, ClientConfig, ChainInfo, ImportBlock}; -use block::Block; use spec::Genesis; use ethjson; use miner::Miner; use io::IoChannel; use test_helpers; +use verification::queue::kind::blocks::Unverified; use super::HookType; @@ -83,9 +83,9 @@ pub fn json_chain_test(json_data: &[u8], start_stop_ho Arc::new(Miner::new_for_tests(&spec, None)), IoChannel::disconnected(), ).unwrap(); - for b in &blockchain.blocks_rlp() { - if Block::is_good(&b) { - let _ = client.import_block(b.clone()); + for b in blockchain.blocks_rlp() { + if let Ok(block) = Unverified::from_rlp(b) { + let _ = client.import_block(block); client.flush_queue(); client.import_verified_blocks(); } diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 233e28139b..38acf9e1e5 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1148,7 +1148,7 @@ impl miner::MinerService for Miner { |b| &b.hash() == &block_hash ) { trace!(target: "miner", "Submitted block {}={}={} with seal {:?}", block_hash, b.hash(), b.header().bare_hash(), seal); - b.lock().try_seal(&*self.engine, seal).or_else(|(e, _)| { + b.lock().try_seal(&*self.engine, seal).or_else(|e| { warn!(target: "miner", "Mined solution rejected: {}", e); Err(ErrorKind::PowInvalid.into()) }) diff --git a/ethcore/src/test_helpers.rs b/ethcore/src/test_helpers.rs index 408714571e..c873db5d14 100644 --- a/ethcore/src/test_helpers.rs +++ b/ethcore/src/test_helpers.rs @@ -43,6 +43,7 @@ use blooms_db; use kvdb::KeyValueDB; use kvdb_rocksdb; use tempdir::TempDir; +use verification::queue::kind::blocks::Unverified; use encoded; /// Creates test block with corresponding header @@ -175,7 +176,7 @@ pub fn generate_dummy_client_with_spec_accounts_and_data(test_spec: F, accoun let b = b.close_and_lock().unwrap().seal(test_engine, vec![]).unwrap(); - if let Err(e) = client.import_block(b.rlp_bytes()) { + if let Err(e) = client.import_block(Unverified::from_rlp(b.rlp_bytes()).unwrap()) { panic!("error importing block which is valid by definition: {:?}", e); } @@ -211,7 +212,7 @@ pub fn push_blocks_to_client(client: &Arc, timestamp_salt: u64, starting rolling_block_number = rolling_block_number + 1; rolling_timestamp = rolling_timestamp + 10; - if let Err(e) = client.import_block(create_test_block(&header)) { + if let Err(e) = client.import_block(Unverified::from_rlp(create_test_block(&header)).unwrap()) { panic!("error importing block which is valid by definition: {:?}", e); } } @@ -231,7 +232,7 @@ pub fn push_block_with_transactions(client: &Arc, transactions: &[Signed } let b = b.close_and_lock().unwrap().seal(test_engine, vec![]).unwrap(); - if let Err(e) = client.import_block(b.rlp_bytes()) { + if let Err(e) = client.import_block(Unverified::from_rlp(b.rlp_bytes()).unwrap()) { panic!("error importing block which is valid by definition: {:?}", e); } @@ -253,7 +254,7 @@ pub fn get_test_client_with_blocks(blocks: Vec) -> Arc { ).unwrap(); for block in blocks { - if let Err(e) = client.import_block(block) { + if let Err(e) = client.import_block(Unverified::from_rlp(block).unwrap()) { panic!("error importing block which is well-formed: {:?}", e); } } diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index a7629313d1..4031d30b08 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -35,9 +35,9 @@ use views::BlockView; use ethkey::KeyPair; use transaction::{PendingTransaction, Transaction, Action, Condition}; use miner::MinerService; -use rlp::{RlpStream, EMPTY_LIST_RLP}; use tempdir::TempDir; use test_helpers; +use verification::queue::kind::blocks::Unverified; #[test] fn imports_from_empty() { @@ -97,7 +97,7 @@ fn imports_good_block() { IoChannel::disconnected(), ).unwrap(); let good_block = get_good_dummy_block(); - if client.import_block(good_block).is_err() { + if client.import_block(Unverified::from_rlp(good_block).unwrap()).is_err() { panic!("error importing block being good by definition"); } client.flush_queue(); @@ -107,24 +107,6 @@ fn imports_good_block() { assert!(!block.into_inner().is_empty()); } -#[test] -fn fails_to_import_block_with_invalid_rlp() { - use error::{BlockImportError, BlockImportErrorKind}; - - let client = generate_dummy_client(6); - let mut rlp = RlpStream::new_list(3); - rlp.append_raw(&EMPTY_LIST_RLP, 1); // empty header - rlp.append_raw(&EMPTY_LIST_RLP, 1); - rlp.append_raw(&EMPTY_LIST_RLP, 1); - let invalid_header_block = rlp.out(); - - match client.import_block(invalid_header_block) { - Err(BlockImportError(BlockImportErrorKind::Decoder(_), _)) => (), // all good - Err(_) => panic!("Should fail with a decoder error"), - Ok(_) => panic!("Should not import block with invalid header"), - } -} - #[test] fn query_none_block() { let db = test_helpers::new_db(); diff --git a/ethcore/src/tests/trace.rs b/ethcore/src/tests/trace.rs index fd7c932cbd..24ef378004 100644 --- a/ethcore/src/tests/trace.rs +++ b/ethcore/src/tests/trace.rs @@ -33,6 +33,7 @@ use views::BlockView; use trace::{RewardType, LocalizedTrace}; use trace::trace::Action::Reward; use test_helpers; +use verification::queue::kind::blocks::Unverified; #[test] fn can_trace_block_and_uncle_reward() { @@ -91,7 +92,7 @@ fn can_trace_block_and_uncle_reward() { let root_block = root_block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); - if let Err(e) = client.import_block(root_block.rlp_bytes()) { + if let Err(e) = client.import_block(Unverified::from_rlp(root_block.rlp_bytes()).unwrap()) { panic!("error importing block which is valid by definition: {:?}", e); } @@ -120,7 +121,7 @@ fn can_trace_block_and_uncle_reward() { let parent_block = parent_block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); - if let Err(e) = client.import_block(parent_block.rlp_bytes()) { + if let Err(e) = client.import_block(Unverified::from_rlp(parent_block.rlp_bytes()).unwrap()) { panic!("error importing block which is valid by definition: {:?}", e); } @@ -170,7 +171,7 @@ fn can_trace_block_and_uncle_reward() { let block = block.close_and_lock().unwrap().seal(engine, vec![]).unwrap(); - let res = client.import_block(block.rlp_bytes()); + let res = client.import_block(Unverified::from_rlp(block.rlp_bytes()).unwrap()); if res.is_err() { panic!("error importing block: {:#?}", res.err().unwrap()); } diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index cc04fb04d7..588bfc0c71 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -23,11 +23,10 @@ use std::cmp; use heapsize::HeapSizeOf; use ethereum_types::H256; use rlp::{self, Rlp}; -use ethcore::views::BlockView; use ethcore::header::{BlockNumber, Header as BlockHeader}; use ethcore::client::{BlockStatus, BlockId, BlockImportError, BlockImportErrorKind}; -use ethcore::block::Block; use ethcore::error::{ImportErrorKind, BlockError}; +use ethcore::verification::queue::kind::blocks::Unverified; use sync_io::SyncIo; use blocks::BlockCollection; @@ -484,18 +483,19 @@ impl BlockDownloader { let block = block_and_receipts.block; let receipts = block_and_receipts.receipts; - // Perform basic block verification - if !Block::is_good(&block) { - debug!(target: "sync", "Bad block rlp: {:?}", block); - bad = true; - break; - } - - let (h, number, parent) = { - let header = view!(BlockView, &block).header_view(); - (header.hash(), header.number(), header.parent_hash()) + let block = match Unverified::from_rlp(block) { + Ok(block) => block, + Err(_) => { + debug!(target: "sync", "Bad block rlp"); + bad = true; + break; + } }; + let h = block.header.hash(); + let number = block.header.number(); + let parent = *block.header.parent_hash(); + if self.target_hash.as_ref().map_or(false, |t| t == &h) { self.state = State::Complete; trace!(target: "sync", "Sync target reached"); diff --git a/ethcore/sync/src/blocks.rs b/ethcore/sync/src/blocks.rs index df7d7a3bfd..248180b281 100644 --- a/ethcore/sync/src/blocks.rs +++ b/ethcore/sync/src/blocks.rs @@ -294,7 +294,7 @@ impl BlockCollection { let header = view!(HeaderView, &block.header); let block_view = Block::new_from_header_and_body(&header, &body); drained.push(BlockAndReceipts { - block: block_view.rlp().as_raw().to_vec(), + block: block_view.into_inner(), receipts: block.receipts.clone(), }); } diff --git a/ethcore/sync/src/chain/handler.rs b/ethcore/sync/src/chain/handler.rs index 136ff3395a..8547be7b3f 100644 --- a/ethcore/sync/src/chain/handler.rs +++ b/ethcore/sync/src/chain/handler.rs @@ -19,8 +19,9 @@ use block_sync::{BlockDownloaderImportError as DownloaderImportError, DownloadAc use bytes::Bytes; use ethcore::client::{BlockStatus, BlockId, BlockImportError, BlockImportErrorKind}; use ethcore::error::*; -use ethcore::header::{BlockNumber, Header as BlockHeader}; +use ethcore::header::BlockNumber; use ethcore::snapshot::{ManifestData, RestorationStatus}; +use ethcore::verification::queue::kind::blocks::Unverified; use ethereum_types::{H256, U256}; use hash::keccak; use network::PeerId; @@ -162,44 +163,43 @@ impl SyncHandler { peer.difficulty = Some(difficulty); } } - let block_rlp = r.at(0)?; - let header_rlp = block_rlp.at(0)?; - let h = keccak(&header_rlp.as_raw()); - trace!(target: "sync", "{} -> NewBlock ({})", peer_id, h); - let header: BlockHeader = header_rlp.as_val()?; - if header.number() > sync.highest_block.unwrap_or(0) { - sync.highest_block = Some(header.number()); + let block = Unverified::from_rlp(r.at(0)?.as_raw().to_vec())?; + let hash = block.header.hash(); + let number = block.header.number(); + trace!(target: "sync", "{} -> NewBlock ({})", peer_id, hash); + if number > sync.highest_block.unwrap_or(0) { + sync.highest_block = Some(number); } let mut unknown = false; - { - if let Some(ref mut peer) = sync.peers.get_mut(&peer_id) { - peer.latest_hash = header.hash(); - } + + if let Some(ref mut peer) = sync.peers.get_mut(&peer_id) { + peer.latest_hash = hash; } + let last_imported_number = sync.new_blocks.last_imported_block_number(); - if last_imported_number > header.number() && last_imported_number - header.number() > MAX_NEW_BLOCK_AGE { - trace!(target: "sync", "Ignored ancient new block {:?}", h); + if last_imported_number > number && last_imported_number - number > MAX_NEW_BLOCK_AGE { + trace!(target: "sync", "Ignored ancient new block {:?}", hash); return Err(DownloaderImportError::Invalid); } - match io.chain().import_block(block_rlp.as_raw().to_vec()) { + match io.chain().import_block(block) { Err(BlockImportError(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain), _)) => { - trace!(target: "sync", "New block already in chain {:?}", h); + trace!(target: "sync", "New block already in chain {:?}", hash); }, Err(BlockImportError(BlockImportErrorKind::Import(ImportErrorKind::AlreadyQueued), _)) => { - trace!(target: "sync", "New block already queued {:?}", h); + trace!(target: "sync", "New block already queued {:?}", hash); }, Ok(_) => { // abort current download of the same block sync.complete_sync(io); - sync.new_blocks.mark_as_known(&header.hash(), header.number()); - trace!(target: "sync", "New block queued {:?} ({})", h, header.number()); + sync.new_blocks.mark_as_known(&hash, number); + trace!(target: "sync", "New block queued {:?} ({})", hash, number); }, Err(BlockImportError(BlockImportErrorKind::Block(BlockError::UnknownParent(p)), _)) => { unknown = true; - trace!(target: "sync", "New block with unknown parent ({:?}) {:?}", p, h); + trace!(target: "sync", "New block with unknown parent ({:?}) {:?}", p, hash); }, Err(e) => { - debug!(target: "sync", "Bad new block {:?} : {:?}", h, e); + debug!(target: "sync", "Bad new block {:?} : {:?}", hash, e); return Err(DownloaderImportError::Invalid); } }; @@ -207,7 +207,7 @@ impl SyncHandler { if sync.state != SyncState::Idle { trace!(target: "sync", "NewBlock ignored while seeking"); } else { - trace!(target: "sync", "New unknown block {:?}", h); + trace!(target: "sync", "New unknown block {:?}", hash); //TODO: handle too many unknown blocks sync.sync_peer(io, peer_id, true); } diff --git a/parity/blockchain.rs b/parity/blockchain.rs index 21af2968ef..cc92419dab 100644 --- a/parity/blockchain.rs +++ b/parity/blockchain.rs @@ -30,6 +30,7 @@ use ethcore::client::{Mode, DatabaseCompactionProfile, VMType, BlockImportError, use ethcore::error::{ImportErrorKind, BlockImportErrorKind}; use ethcore::miner::Miner; use ethcore::verification::queue::VerifierSettings; +use ethcore::verification::queue::kind::blocks::Unverified; use ethcore_service::ClientService; use cache::CacheConfig; use informant::{Informant, FullNodeInformantData, MillisecondDuration}; @@ -417,8 +418,9 @@ fn execute_import(cmd: ImportBlockchain) -> Result<(), String> { service.register_io_handler(informant).map_err(|_| "Unable to register informant handler".to_owned())?; let do_import = |bytes| { + let block = Unverified::from_rlp(bytes).map_err(|_| "Invalid block rlp")?; while client.queue_info().is_full() { sleep(Duration::from_secs(1)); } - match client.import_block(bytes) { + match client.import_block(block) { Err(BlockImportError(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain), _)) => { trace!("Skipping block already in chain."); } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index 96926700c0..2e731cd347 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -43,7 +43,6 @@ extern crate jsonrpc_ipc_server as ipc; extern crate jsonrpc_pubsub; extern crate ethash; -#[cfg_attr(test, macro_use)] extern crate ethcore; extern crate parity_bytes as bytes; extern crate parity_crypto as crypto; diff --git a/rpc/src/v1/tests/eth.rs b/rpc/src/v1/tests/eth.rs index 6e3b9855d6..217e032902 100644 --- a/rpc/src/v1/tests/eth.rs +++ b/rpc/src/v1/tests/eth.rs @@ -20,14 +20,13 @@ use std::sync::Arc; use ethereum_types::{H256, Address}; use ethcore::account_provider::AccountProvider; -use ethcore::block::Block; use ethcore::client::{BlockChainClient, Client, ClientConfig, ChainInfo, ImportBlock}; use ethcore::ethereum; use ethcore::ids::BlockId; use ethcore::miner::Miner; use ethcore::spec::{Genesis, Spec}; use ethcore::test_helpers; -use ethcore::views::BlockView; +use ethcore::verification::queue::kind::blocks::Unverified; use ethjson::blockchain::BlockChain; use ethjson::state::test::ForkSpec; use io::IoChannel; @@ -85,9 +84,9 @@ impl EthTester { fn from_chain(chain: &BlockChain) -> Self { let tester = Self::from_spec(make_spec(chain)); - for b in &chain.blocks_rlp() { - if Block::is_good(&b) { - let _ = tester.client.import_block(b.clone()); + for b in chain.blocks_rlp() { + if let Ok(block) = Unverified::from_rlp(b) { + let _ = tester.client.import_block(block); tester.client.flush_queue(); tester.client.import_verified_blocks(); } @@ -423,11 +422,11 @@ fn verify_transaction_counts(name: String, chain: BlockChain) { let tester = EthTester::from_chain(&chain); let mut id = 1; - for b in chain.blocks_rlp().iter().filter(|b| Block::is_good(b)).map(|b| view!(BlockView, b)) { - let count = b.transactions_count(); + for b in chain.blocks_rlp().into_iter().filter_map(|b| Unverified::from_rlp(b).ok()) { + let count = b.transactions.len(); - let hash = b.hash(); - let number = b.header_view().number(); + let hash = b.header.hash(); + let number = b.header.number(); let (req, res) = by_hash(hash, count, &mut id); assert_eq!(tester.handler.handle_request_sync(&req), Some(res)); -- GitLab From 90d7823acb3ff1e46520a5bae5c0c170f3b69b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 2 Aug 2018 12:58:02 +0200 Subject: [PATCH 191/191] Propagate transactions for next 4 blocks. (#9265) Closes #9255 This PR also removes the limit of max 64 transactions per packet, currently we only attempt to prevent the packet size to go over 8MB. This will only be the case for super-large transactions or high-block-gas-limit chains. Patching this is important only for chains that have blocks that can fit more than 4k transactions (over 86M block gas limit) For mainnet, we should actually see a tiny bit faster propagation since instead of computing 4k pending set, we only need `4 * 8M / 21k = 1523` transactions. Running some tests on `dekompile` node right now, to check how it performs in the wild. --- ethcore/light/src/net/mod.rs | 5 +---- ethcore/light/src/net/tests/mod.rs | 4 ++-- ethcore/light/src/provider.rs | 14 ++++++-------- ethcore/src/client/client.rs | 21 ++++++++++++++++++++- ethcore/src/client/test_client.rs | 4 ++-- ethcore/src/client/traits.rs | 4 ++-- ethcore/src/tests/client.rs | 4 ++-- ethcore/sync/src/chain/mod.rs | 6 ------ ethcore/sync/src/chain/propagator.rs | 7 ++----- 9 files changed, 37 insertions(+), 32 deletions(-) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index 27d240feda..5e73681a55 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -70,9 +70,6 @@ const PROPAGATE_TIMEOUT_INTERVAL: Duration = Duration::from_secs(5); const RECALCULATE_COSTS_TIMEOUT: TimerToken = 3; const RECALCULATE_COSTS_INTERVAL: Duration = Duration::from_secs(60 * 60); -/// Max number of transactions in a single packet. -const MAX_TRANSACTIONS_TO_PROPAGATE: usize = 64; - // minimum interval between updates. const UPDATE_INTERVAL: Duration = Duration::from_millis(5000); @@ -648,7 +645,7 @@ impl LightProtocol { fn propagate_transactions(&self, io: &IoContext) { if self.capabilities.read().tx_relay { return } - let ready_transactions = self.provider.ready_transactions(MAX_TRANSACTIONS_TO_PROPAGATE); + let ready_transactions = self.provider.transactions_to_propagate(); if ready_transactions.is_empty() { return } trace!(target: "pip", "propagate transactions: {} ready", ready_transactions.len()); diff --git a/ethcore/light/src/net/tests/mod.rs b/ethcore/light/src/net/tests/mod.rs index 0c9971d75b..6bc6751b1c 100644 --- a/ethcore/light/src/net/tests/mod.rs +++ b/ethcore/light/src/net/tests/mod.rs @@ -171,8 +171,8 @@ impl Provider for TestProvider { }) } - fn ready_transactions(&self, max_len: usize) -> Vec { - self.0.client.ready_transactions(max_len) + fn transactions_to_propagate(&self) -> Vec { + self.0.client.transactions_to_propagate() } } diff --git a/ethcore/light/src/provider.rs b/ethcore/light/src/provider.rs index 84e7b72839..a066cefb52 100644 --- a/ethcore/light/src/provider.rs +++ b/ethcore/light/src/provider.rs @@ -128,7 +128,7 @@ pub trait Provider: Send + Sync { fn header_proof(&self, req: request::CompleteHeaderProofRequest) -> Option; /// Provide pending transactions. - fn ready_transactions(&self, max_len: usize) -> Vec; + fn transactions_to_propagate(&self) -> Vec; /// Provide a proof-of-execution for the given transaction proof request. /// Returns a vector of all state items necessary to execute the transaction. @@ -283,8 +283,8 @@ impl Provider for T { .map(|(_, proof)| ::request::ExecutionResponse { items: proof }) } - fn ready_transactions(&self, max_len: usize) -> Vec { - BlockChainClient::ready_transactions(self, max_len) + fn transactions_to_propagate(&self) -> Vec { + BlockChainClient::transactions_to_propagate(self) .into_iter() .map(|tx| tx.pending().clone()) .collect() @@ -370,12 +370,10 @@ impl Provider for LightProvider { None } - fn ready_transactions(&self, max_len: usize) -> Vec { + fn transactions_to_propagate(&self) -> Vec { let chain_info = self.chain_info(); - let mut transactions = self.txqueue.read() - .ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp); - transactions.truncate(max_len); - transactions + self.txqueue.read() + .ready_transactions(chain_info.best_block_number, chain_info.best_block_timestamp) } } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 02af5ff0ad..3a7fd0d0c7 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -15,6 +15,7 @@ // along with Parity. If not, see . use std::collections::{HashSet, BTreeMap, VecDeque}; +use std::cmp; use std::fmt; use std::str::FromStr; use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering as AtomicOrdering}; @@ -1945,7 +1946,25 @@ impl BlockChainClient for Client { (*self.build_last_hashes(&self.chain.read().best_block_hash())).clone() } - fn ready_transactions(&self, max_len: usize) -> Vec> { + fn transactions_to_propagate(&self) -> Vec> { + const PROPAGATE_FOR_BLOCKS: u32 = 4; + const MIN_TX_TO_PROPAGATE: usize = 256; + + let block_gas_limit = *self.best_block_header().gas_limit(); + let min_tx_gas: U256 = self.latest_schedule().tx_gas.into(); + + let max_len = if min_tx_gas.is_zero() { + usize::max_value() + } else { + cmp::max( + MIN_TX_TO_PROPAGATE, + cmp::min( + (block_gas_limit / min_tx_gas) * PROPAGATE_FOR_BLOCKS, + // never more than usize + usize::max_value().into() + ).as_u64() as usize + ) + }; self.importer.miner.ready_transactions(self, max_len, ::miner::PendingOrdering::Priority) } diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 627d844aeb..f729b15b7f 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -807,8 +807,8 @@ impl BlockChainClient for TestBlockChainClient { self.traces.read().clone() } - fn ready_transactions(&self, max_len: usize) -> Vec> { - self.miner.ready_transactions(self, max_len, miner::PendingOrdering::Priority) + fn transactions_to_propagate(&self) -> Vec> { + self.miner.ready_transactions(self, 4096, miner::PendingOrdering::Priority) } fn signing_chain_id(&self) -> Option { None } diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 3f5595f619..6ccba5e0f8 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -321,8 +321,8 @@ pub trait BlockChainClient : Sync + Send + AccountData + BlockChain + CallContra /// Get last hashes starting from best block. fn last_hashes(&self) -> LastHashes; - /// List all transactions that are allowed into the next block. - fn ready_transactions(&self, max_len: usize) -> Vec>; + /// List all ready transactions that should be propagated to other peers. + fn transactions_to_propagate(&self) -> Vec>; /// Sorted list of transaction gas prices from at least last sample_size blocks. fn gas_price_corpus(&self, sample_size: usize) -> ::stats::Corpus { diff --git a/ethcore/src/tests/client.rs b/ethcore/src/tests/client.rs index 4031d30b08..24801cb575 100644 --- a/ethcore/src/tests/client.rs +++ b/ethcore/src/tests/client.rs @@ -316,11 +316,11 @@ fn does_not_propagate_delayed_transactions() { client.miner().import_own_transaction(&*client, tx0).unwrap(); client.miner().import_own_transaction(&*client, tx1).unwrap(); - assert_eq!(0, client.ready_transactions(10).len()); + assert_eq!(0, client.transactions_to_propagate().len()); assert_eq!(0, client.miner().ready_transactions(&*client, 10, PendingOrdering::Priority).len()); push_blocks_to_client(&client, 53, 2, 2); client.flush_queue(); - assert_eq!(2, client.ready_transactions(10).len()); + assert_eq!(2, client.transactions_to_propagate().len()); assert_eq!(2, client.miner().ready_transactions(&*client, 10, PendingOrdering::Priority).len()); } diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index ef5146f91d..520226a9c7 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -149,12 +149,6 @@ const MAX_NEW_HASHES: usize = 64; const MAX_NEW_BLOCK_AGE: BlockNumber = 20; // maximal packet size with transactions (cannot be greater than 16MB - protocol limitation). const MAX_TRANSACTION_PACKET_SIZE: usize = 8 * 1024 * 1024; -// Maximal number of transactions queried from miner to propagate. -// This set is used to diff with transactions known by the peer and -// we will send a difference of length up to `MAX_TRANSACTIONS_TO_PROPAGATE`. -const MAX_TRANSACTIONS_TO_QUERY: usize = 4096; -// Maximal number of transactions in sent in single packet. -const MAX_TRANSACTIONS_TO_PROPAGATE: usize = 64; // Min number of blocks to be behind for a snapshot sync const SNAPSHOT_RESTORE_THRESHOLD: BlockNumber = 30000; const SNAPSHOT_MIN_PEERS: usize = 3; diff --git a/ethcore/sync/src/chain/propagator.rs b/ethcore/sync/src/chain/propagator.rs index ef5e700bfe..7cb145f362 100644 --- a/ethcore/sync/src/chain/propagator.rs +++ b/ethcore/sync/src/chain/propagator.rs @@ -29,11 +29,9 @@ use transaction::SignedTransaction; use super::{ random, ChainSync, + MAX_TRANSACTION_PACKET_SIZE, MAX_PEER_LAG_PROPAGATION, MAX_PEERS_PROPAGATION, - MAX_TRANSACTION_PACKET_SIZE, - MAX_TRANSACTIONS_TO_PROPAGATE, - MAX_TRANSACTIONS_TO_QUERY, MIN_PEERS_PROPAGATION, CONSENSUS_DATA_PACKET, NEW_BLOCK_HASHES_PACKET, @@ -121,7 +119,7 @@ impl SyncPropagator { return 0; } - let transactions = io.chain().ready_transactions(MAX_TRANSACTIONS_TO_QUERY); + let transactions = io.chain().transactions_to_propagate(); if transactions.is_empty() { return 0; } @@ -184,7 +182,6 @@ impl SyncPropagator { // Get hashes of all transactions to send to this peer let to_send = all_transactions_hashes.difference(&peer_info.last_sent_transactions) - .take(MAX_TRANSACTIONS_TO_PROPAGATE) .cloned() .collect::>(); if to_send.is_empty() { -- GitLab