From 4a0ee3e29b0245c8bf14a8803ae51fc23930f666 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Fri, 11 Jan 2019 15:33:33 +0100 Subject: [PATCH 01/15] Create call-contract crate --- ethcore/call-contract/Cargo.toml | 11 +++++++++++ ethcore/call-contract/src/call_contract.rs | 9 +++++++++ ethcore/call-contract/src/lib.rs | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 ethcore/call-contract/Cargo.toml create mode 100644 ethcore/call-contract/src/call_contract.rs create mode 100644 ethcore/call-contract/src/lib.rs diff --git a/ethcore/call-contract/Cargo.toml b/ethcore/call-contract/Cargo.toml new file mode 100644 index 00000000000..6f42883d84b --- /dev/null +++ b/ethcore/call-contract/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "call-contract" +version = "0.1.0" +license = "GPL-3.0" +authors = ["Parity Technologies "] +edition = "2018" + +[dependencies] +common-types = { path = "../types" } +ethereum-types = "0.4" +parity-bytes = "0.1" diff --git a/ethcore/call-contract/src/call_contract.rs b/ethcore/call-contract/src/call_contract.rs new file mode 100644 index 00000000000..4eab6e6a5ed --- /dev/null +++ b/ethcore/call-contract/src/call_contract.rs @@ -0,0 +1,9 @@ +use bytes::Bytes; +use ethereum_types::Address; +use types::ids::BlockId; + +/// Provides `call_contract` method +pub trait CallContract { + /// Like `call`, but with various defaults. Designed to be used for calling contracts. + fn call_contract(&self, id: BlockId, address: Address, data: Bytes) -> Result; +} diff --git a/ethcore/call-contract/src/lib.rs b/ethcore/call-contract/src/lib.rs new file mode 100644 index 00000000000..a4c96c40fe3 --- /dev/null +++ b/ethcore/call-contract/src/lib.rs @@ -0,0 +1,5 @@ +extern crate common_types as types; +extern crate ethereum_types; +extern crate parity_bytes as bytes; + +pub mod call_contract; From 39ffa0b119d318d59e6a7b838fb20953f1a6fe8c Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Fri, 11 Jan 2019 15:37:05 +0100 Subject: [PATCH 02/15] Add license --- ethcore/call-contract/src/call_contract.rs | 16 ++++++++++++++++ ethcore/call-contract/src/lib.rs | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/ethcore/call-contract/src/call_contract.rs b/ethcore/call-contract/src/call_contract.rs index 4eab6e6a5ed..70277bd24db 100644 --- a/ethcore/call-contract/src/call_contract.rs +++ b/ethcore/call-contract/src/call_contract.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2019 Parity Technologies (UK) Ltd. +// This file is part of Parity Ethereum. + +// Parity Ethereum 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 Ethereum 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 Ethereum. If not, see . + use bytes::Bytes; use ethereum_types::Address; use types::ids::BlockId; diff --git a/ethcore/call-contract/src/lib.rs b/ethcore/call-contract/src/lib.rs index a4c96c40fe3..11d2ed68b81 100644 --- a/ethcore/call-contract/src/lib.rs +++ b/ethcore/call-contract/src/lib.rs @@ -1,3 +1,19 @@ +// Copyright 2015-2019 Parity Technologies (UK) Ltd. +// This file is part of Parity Ethereum. + +// Parity Ethereum 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 Ethereum 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 Ethereum. If not, see . + extern crate common_types as types; extern crate ethereum_types; extern crate parity_bytes as bytes; From 018b853a4e3f4c819b365db4e016cd29aaa290aa Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Fri, 11 Jan 2019 15:38:28 +0100 Subject: [PATCH 03/15] First attempt at using extracted CallContract trait --- ethcore/Cargo.toml | 1 + ethcore/src/client/client.rs | 4 +++- ethcore/src/client/mod.rs | 3 ++- ethcore/src/client/test_client.rs | 3 ++- ethcore/src/client/traits.rs | 11 ++++++----- ethcore/src/lib.rs | 1 + 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 9a286dcb9b6..4014b242135 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -11,6 +11,7 @@ ansi_term = "0.10" blooms-db = { path = "../util/blooms-db", optional = true } bn = { git = "https://github.com/paritytech/bn", default-features = false } byteorder = "1.0" +call-contract = { path = "./call-contract" } common-types = { path = "types" } crossbeam = "0.4" env_logger = { version = "0.5", optional = true } diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 995b11520f6..9f38fe23195 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -43,10 +43,12 @@ use types::receipt::{Receipt, LocalizedReceipt}; use types::{BlockNumber, header::{Header, ExtendedHeader}}; use vm::{EnvInfo, LastHashes}; +use call_contract::call_contract::CallContract; + use block::{IsBlock, LockedBlock, Drain, ClosedBlock, OpenBlock, enact_verified, SealedBlock}; use client::ancient_import::AncientVerifier; use client::{ - Nonce, Balance, ChainInfo, BlockInfo, CallContract, TransactionInfo, + Nonce, Balance, ChainInfo, BlockInfo, /*CallContract,*/ TransactionInfo, RegistryInfo, ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, StateInfo, StateClient, Call, AccountData, BlockChain as BlockChainTrait, BlockProducer, SealedBlockImporter, diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 9c534d470c6..0498f15efbc 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -36,7 +36,7 @@ pub use self::io_message::ClientIoMessage; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, NewBlocks, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ - Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, PrepareOpenBlock, CallContract, TransactionInfo, RegistryInfo, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, + Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, PrepareOpenBlock, /*CallContract,*/ TransactionInfo, RegistryInfo, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, StateClient, Call, EngineInfo, AccountData, BlockChain, BlockProducer, SealedBlockImporter, BadBlocks, }; pub use state::StateInfo; @@ -46,6 +46,7 @@ pub use types::ids::*; pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; +pub use call_contract::call_contract::CallContract; pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo}; diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 1ca826097f0..b331cf6872c 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -49,8 +49,9 @@ use types::views::BlockView; use vm::Schedule; use block::{OpenBlock, SealedBlock, ClosedBlock}; +use call_contract::call_contract::CallContract; use client::{ - Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, CallContract, TransactionInfo, RegistryInfo, + Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, /* CallContract,*/ TransactionInfo, RegistryInfo, PrepareOpenBlock, BlockChainClient, BlockChainInfo, BlockStatus, BlockId, Mode, TransactionId, UncleId, TraceId, TraceFilter, LastHashes, CallAnalytics, ProvingBlockChainClient, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index ff0148beefc..e54382db00d 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -19,6 +19,7 @@ use std::sync::Arc; use blockchain::{BlockReceipts, TreeRoute}; use bytes::Bytes; +use call_contract::call_contract::CallContract; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, U256, Address}; use evm::Schedule; @@ -170,11 +171,11 @@ pub trait ImportBlock { fn import_block(&self, block: Unverified) -> EthcoreResult; } -/// Provides `call_contract` method -pub trait CallContract { - /// Like `call`, but with various defaults. Designed to be used for calling contracts. - fn call_contract(&self, id: BlockId, address: Address, data: Bytes) -> Result; -} +// /// Provides `call_contract` method +// pub trait CallContract { +// /// Like `call`, but with various defaults. Designed to be used for calling contracts. +// fn call_contract(&self, id: BlockId, address: Address, data: Bytes) -> Result; +// } /// Provides `call` and `call_many` methods pub trait Call { diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 73fdb64fde9..f3e500ba8ac 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -60,6 +60,7 @@ extern crate ansi_term; extern crate bn; extern crate byteorder; +extern crate call_contract; extern crate common_types as types; extern crate crossbeam; extern crate ethabi; From 2ca01e731c7e065f3844eb4e1412cdd60fb8a906 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Fri, 11 Jan 2019 16:58:37 +0100 Subject: [PATCH 04/15] Remove unneeded `extern crate` calls --- ethcore/call-contract/Cargo.toml | 4 ++-- ethcore/call-contract/src/lib.rs | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ethcore/call-contract/Cargo.toml b/ethcore/call-contract/Cargo.toml index 6f42883d84b..649d807e018 100644 --- a/ethcore/call-contract/Cargo.toml +++ b/ethcore/call-contract/Cargo.toml @@ -6,6 +6,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -common-types = { path = "../types" } +types = { path = "../types", package = "common-types" } ethereum-types = "0.4" -parity-bytes = "0.1" +bytes = { version = "0.1", package = "parity-bytes" } diff --git a/ethcore/call-contract/src/lib.rs b/ethcore/call-contract/src/lib.rs index 11d2ed68b81..8a0d6b86c21 100644 --- a/ethcore/call-contract/src/lib.rs +++ b/ethcore/call-contract/src/lib.rs @@ -14,8 +14,4 @@ // You should have received a copy of the GNU General Public License // along with Parity Ethereum. If not, see . -extern crate common_types as types; -extern crate ethereum_types; -extern crate parity_bytes as bytes; - pub mod call_contract; From 9d8fee60d4099f55f101fee5fd9ea0712d897774 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 11:50:16 +0100 Subject: [PATCH 05/15] Move RegistryInfo trait into call-contract crate --- ethcore/call-contract/src/call_contract.rs | 6 ++++++ ethcore/src/client/client.rs | 3 +-- ethcore/src/client/mod.rs | 3 ++- ethcore/src/client/traits.rs | 11 ++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ethcore/call-contract/src/call_contract.rs b/ethcore/call-contract/src/call_contract.rs index 70277bd24db..1b43f772f4b 100644 --- a/ethcore/call-contract/src/call_contract.rs +++ b/ethcore/call-contract/src/call_contract.rs @@ -23,3 +23,9 @@ pub trait CallContract { /// Like `call`, but with various defaults. Designed to be used for calling contracts. fn call_contract(&self, id: BlockId, address: Address, data: Bytes) -> Result; } + +/// Provides information on a blockchain service and it's registry +pub trait RegistryInfo { + /// Get the address of a particular blockchain service, if available. + fn registry_address(&self, name: String, block: BlockId) -> Option
; +} \ No newline at end of file diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 9f38fe23195..584c361ad38 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -23,6 +23,7 @@ use std::time::{Instant, Duration}; use blockchain::{BlockReceipts, BlockChain, BlockChainDB, BlockProvider, TreeRoute, ImportRoute, TransactionAddress, ExtrasInsert}; use bytes::Bytes; +use call_contract::call_contract::CallContract; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, Address, U256}; use evm::Schedule; @@ -43,8 +44,6 @@ use types::receipt::{Receipt, LocalizedReceipt}; use types::{BlockNumber, header::{Header, ExtendedHeader}}; use vm::{EnvInfo, LastHashes}; -use call_contract::call_contract::CallContract; - use block::{IsBlock, LockedBlock, Drain, ClosedBlock, OpenBlock, enact_verified, SealedBlock}; use client::ancient_import::AncientVerifier; use client::{ diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 0498f15efbc..0e2f20587c8 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -36,7 +36,7 @@ pub use self::io_message::ClientIoMessage; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, NewBlocks, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ - Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, PrepareOpenBlock, /*CallContract,*/ TransactionInfo, RegistryInfo, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, + Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, PrepareOpenBlock, /*CallContract,*/ TransactionInfo, /*RegistryInfo,*/ ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, StateClient, Call, EngineInfo, AccountData, BlockChain, BlockProducer, SealedBlockImporter, BadBlocks, }; pub use state::StateInfo; @@ -47,6 +47,7 @@ pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; pub use call_contract::call_contract::CallContract; +pub use call_contract::call_contract::RegistryInfo; pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo}; diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index e54382db00d..2d6e124ff0d 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -20,6 +20,7 @@ use std::sync::Arc; use blockchain::{BlockReceipts, TreeRoute}; use bytes::Bytes; use call_contract::call_contract::CallContract; +use call_contract::call_contract::RegistryInfo; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, U256, Address}; use evm::Schedule; @@ -158,11 +159,11 @@ pub trait StateClient { /// Provides various blockchain information, like block header, chain state etc. pub trait BlockChain: ChainInfo + BlockInfo + TransactionInfo {} -/// Provides information on a blockchain service and it's registry -pub trait RegistryInfo { - /// Get the address of a particular blockchain service, if available. - fn registry_address(&self, name: String, block: BlockId) -> Option
; -} +// /// Provides information on a blockchain service and it's registry +// pub trait RegistryInfo { +// /// Get the address of a particular blockchain service, if available. +// fn registry_address(&self, name: String, block: BlockId) -> Option
; +// } // FIXME Why these methods belong to BlockChainClient and not MiningBlockChainClient? /// Provides methods to import block into blockchain From 3068a7bad20773c94e26e7ef20edabc813ee53ac Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 12:00:52 +0100 Subject: [PATCH 06/15] Move service-transaction-checker from ethcore to ethcore-miner --- ethcore/src/miner/mod.rs | 1 - ethcore/src/miner/pool_client.rs | 2 +- miner/Cargo.toml | 4 ++++ {ethcore => miner}/res/contracts/service_transaction.json | 0 miner/src/lib.rs | 7 +++++++ .../src/miner => miner/src}/service_transaction_checker.rs | 3 ++- 6 files changed, 14 insertions(+), 3 deletions(-) rename {ethcore => miner}/res/contracts/service_transaction.json (100%) rename {ethcore/src/miner => miner/src}/service_transaction_checker.rs (95%) diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 2696306e71d..399d66b5459 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -20,7 +20,6 @@ //! Keeps track of transactions and currently sealed pending block. mod miner; -mod service_transaction_checker; pub mod pool_client; #[cfg(feature = "stratum")] diff --git a/ethcore/src/miner/pool_client.rs b/ethcore/src/miner/pool_client.rs index e748d9bc201..1bccc04f106 100644 --- a/ethcore/src/miner/pool_client.rs +++ b/ethcore/src/miner/pool_client.rs @@ -25,6 +25,7 @@ use std::{ use ethereum_types::{H256, U256, Address}; use ethcore_miner::pool; use ethcore_miner::pool::client::NonceClient; +use ethcore_miner::service_transaction_checker::ServiceTransactionChecker; use types::transaction::{ self, UnverifiedTransaction, @@ -37,7 +38,6 @@ use account_provider::AccountProvider; use client::{TransactionId, BlockInfo, CallContract, Nonce}; use engines::EthEngine; use miner; -use miner::service_transaction_checker::ServiceTransactionChecker; use transaction_ext::Transaction; /// Cache for state nonces. diff --git a/miner/Cargo.toml b/miner/Cargo.toml index d37ed692c73..1aebb3a2a1a 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -15,8 +15,12 @@ url = { version = "1", optional = true } # Miner ansi_term = "0.10" +call-contract = { path = "../ethcore/call-contract" } common-types = { path = "../ethcore/types" } error-chain = "0.12" +ethabi = "6.0" +ethabi-derive = "6.0" +ethabi-contract = "6.0" ethereum-types = "0.4" futures = "0.1" heapsize = "0.4" diff --git a/ethcore/res/contracts/service_transaction.json b/miner/res/contracts/service_transaction.json similarity index 100% rename from ethcore/res/contracts/service_transaction.json rename to miner/res/contracts/service_transaction.json diff --git a/miner/src/lib.rs b/miner/src/lib.rs index 3b2513f678e..c96692042fb 100644 --- a/miner/src/lib.rs +++ b/miner/src/lib.rs @@ -20,7 +20,9 @@ //! Keeps track of transactions and mined block. extern crate ansi_term; +extern crate call_contract; extern crate common_types as types; +extern crate ethabi; extern crate ethereum_types; extern crate futures; extern crate heapsize; @@ -33,6 +35,10 @@ extern crate price_info; extern crate rlp; extern crate transaction_pool as txpool; +#[macro_use] +extern crate ethabi_contract; +#[macro_use] +extern crate ethabi_derive; #[macro_use] extern crate error_chain; #[macro_use] @@ -52,5 +58,6 @@ pub mod external; pub mod gas_price_calibrator; pub mod gas_pricer; pub mod pool; +pub mod service_transaction_checker; #[cfg(feature = "work-notify")] pub mod work_notify; diff --git a/ethcore/src/miner/service_transaction_checker.rs b/miner/src/service_transaction_checker.rs similarity index 95% rename from ethcore/src/miner/service_transaction_checker.rs rename to miner/src/service_transaction_checker.rs index 8d4c461cea2..a12f581e560 100644 --- a/ethcore/src/miner/service_transaction_checker.rs +++ b/miner/src/service_transaction_checker.rs @@ -16,7 +16,8 @@ //! A service transactions contract checker. -use client::{RegistryInfo, CallContract, BlockId}; +use call_contract::call_contract::{CallContract, RegistryInfo}; +use types::ids::BlockId; use types::transaction::SignedTransaction; use ethabi::FunctionOutputDecoder; From ea036e1bf9e3cc048abcbf7cfae8a5f27b169158 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 12:11:38 +0100 Subject: [PATCH 07/15] Update Cargo.lock file --- Cargo.lock | 77 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 29e0f174bf5..dfe9797f5ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -185,6 +185,15 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "call-contract" +version = "0.1.0" +dependencies = [ + "common-types 0.1.0", + "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cast" version = "0.2.2" @@ -405,7 +414,7 @@ dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -419,7 +428,7 @@ dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -432,7 +441,7 @@ dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -539,7 +548,7 @@ name = "docopt" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -561,7 +570,7 @@ dependencies = [ "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lunarity-lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -684,6 +693,7 @@ dependencies = [ "blooms-db 0.1.0", "bn 0.4.4 (git+https://github.com/paritytech/bn)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "call-contract 0.1.0", "common-types 0.1.0", "criterion 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -715,7 +725,7 @@ dependencies = [ "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "len-caching-lock 0.1.1", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -864,7 +874,7 @@ dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -876,9 +886,13 @@ name = "ethcore-miner" version = "1.12.0" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "call-contract 0.1.0", "common-types 0.1.0", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi-contract 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethabi-derive 6.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethash 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", @@ -1008,7 +1022,7 @@ dependencies = [ "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-crypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1135,7 +1149,7 @@ dependencies = [ "edit-distance 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memzero 0.1.0", "parity-crypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1214,7 +1228,7 @@ dependencies = [ "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memory-cache 0.1.0", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1353,7 +1367,7 @@ name = "fs-swap" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1455,7 +1469,7 @@ name = "handlebars" version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1809,7 +1823,7 @@ dependencies = [ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 9.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-2.2)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1912,11 +1926,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "lazycell" @@ -2365,7 +2376,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "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)", ] @@ -2666,7 +2677,7 @@ dependencies = [ "ethcore-sync 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2734,7 +2745,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3131,7 +3142,7 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3218,11 +3229,11 @@ dependencies = [ [[package]] name = "ring" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3253,7 +3264,7 @@ name = "rlp_compress" version = "0.1.0" dependencies = [ "elastic-array 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3330,7 +3341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "sct 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3369,7 +3380,7 @@ name = "sct" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3652,7 +3663,7 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3794,7 +3805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4109,7 +4120,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4123,7 +4134,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4231,7 +4242,7 @@ name = "webpki" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4486,7 +4497,7 @@ dependencies = [ "checksum kvdb-memorydb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45bcdf5eb083602cff61a6f8438dce2a7900d714e893fc48781c39fb119d37aa" "checksum kvdb-rocksdb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "06cf755dc587839ba34d3cbe3f12b6ad55850fbcdfe67336157a021a1a5c43ae" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" +"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" "checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" @@ -4589,7 +4600,7 @@ dependencies = [ "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum ring 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe642b9dd1ba0038d78c4a3999d1ee56178b4d415c1e1fbaba83b06dce012f0" +"checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum rlp 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "524c5ad554859785dfc8469df3ed5e0b5784d4d335877ed47c8d90fc0eb238fe" "checksum rlp 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "16d1effe9845d54f90e7be8420ee49e5c94623140b97ee4bc6fb5bfddb745720" "checksum rpassword 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b273c91bd242ca03ad6d71c143b6f17a48790e61f21a6c78568fa2b6774a24a4" From f2a0e25d62426de9b45492b6e81cc2d116d9531e Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 12:26:17 +0100 Subject: [PATCH 08/15] Re-export call_contract --- ethcore/call-contract/src/lib.rs | 3 +++ ethcore/src/client/client.rs | 2 +- ethcore/src/client/mod.rs | 4 ++-- ethcore/src/client/test_client.rs | 2 +- ethcore/src/client/traits.rs | 4 ++-- miner/src/service_transaction_checker.rs | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ethcore/call-contract/src/lib.rs b/ethcore/call-contract/src/lib.rs index 8a0d6b86c21..13aacde3a34 100644 --- a/ethcore/call-contract/src/lib.rs +++ b/ethcore/call-contract/src/lib.rs @@ -15,3 +15,6 @@ // along with Parity Ethereum. If not, see . pub mod call_contract; + +// Re-export +pub use self::call_contract::*; diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 584c361ad38..412e4c1e7ae 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -23,7 +23,7 @@ use std::time::{Instant, Duration}; use blockchain::{BlockReceipts, BlockChain, BlockChainDB, BlockProvider, TreeRoute, ImportRoute, TransactionAddress, ExtrasInsert}; use bytes::Bytes; -use call_contract::call_contract::CallContract; +use call_contract::CallContract; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, Address, U256}; use evm::Schedule; diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 0e2f20587c8..c2204f3db65 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -46,8 +46,8 @@ pub use types::ids::*; pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; -pub use call_contract::call_contract::CallContract; -pub use call_contract::call_contract::RegistryInfo; +pub use call_contract::CallContract; +pub use call_contract::RegistryInfo; pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo}; diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index b331cf6872c..88b9d0c96c5 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -49,7 +49,7 @@ use types::views::BlockView; use vm::Schedule; use block::{OpenBlock, SealedBlock, ClosedBlock}; -use call_contract::call_contract::CallContract; +use call_contract::CallContract; use client::{ Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, /* CallContract,*/ TransactionInfo, RegistryInfo, PrepareOpenBlock, BlockChainClient, BlockChainInfo, BlockStatus, BlockId, Mode, diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 2d6e124ff0d..32b779ba5e6 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -19,8 +19,8 @@ use std::sync::Arc; use blockchain::{BlockReceipts, TreeRoute}; use bytes::Bytes; -use call_contract::call_contract::CallContract; -use call_contract::call_contract::RegistryInfo; +use call_contract::CallContract; +use call_contract::RegistryInfo; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, U256, Address}; use evm::Schedule; diff --git a/miner/src/service_transaction_checker.rs b/miner/src/service_transaction_checker.rs index a12f581e560..17776f1569e 100644 --- a/miner/src/service_transaction_checker.rs +++ b/miner/src/service_transaction_checker.rs @@ -16,7 +16,7 @@ //! A service transactions contract checker. -use call_contract::call_contract::{CallContract, RegistryInfo}; +use call_contract::{CallContract, RegistryInfo}; use types::ids::BlockId; use types::transaction::SignedTransaction; use ethabi::FunctionOutputDecoder; From e1a27774801e8848d5432f586e7ca606b5f15959 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 14:28:09 +0100 Subject: [PATCH 09/15] Merge CallContract and RegistryInfo imports --- ethcore/src/client/client.rs | 4 ++-- ethcore/src/client/mod.rs | 3 +-- ethcore/src/client/traits.rs | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 412e4c1e7ae..d9f7f9dd549 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -23,7 +23,7 @@ use std::time::{Instant, Duration}; use blockchain::{BlockReceipts, BlockChain, BlockChainDB, BlockProvider, TreeRoute, ImportRoute, TransactionAddress, ExtrasInsert}; use bytes::Bytes; -use call_contract::CallContract; +use call_contract::{CallContract, RegistryInfo}; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, Address, U256}; use evm::Schedule; @@ -48,7 +48,7 @@ use block::{IsBlock, LockedBlock, Drain, ClosedBlock, OpenBlock, enact_verified, use client::ancient_import::AncientVerifier; use client::{ Nonce, Balance, ChainInfo, BlockInfo, /*CallContract,*/ TransactionInfo, - RegistryInfo, ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock, + /*RegistryInfo,*/ ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, StateInfo, StateClient, Call, AccountData, BlockChain as BlockChainTrait, BlockProducer, SealedBlockImporter, ClientIoMessage, diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index c2204f3db65..bd891ab2dca 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -46,8 +46,7 @@ pub use types::ids::*; pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; -pub use call_contract::CallContract; -pub use call_contract::RegistryInfo; +pub use call_contract::{CallContract, RegistryInfo}; pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo}; diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 32b779ba5e6..9f6d300ecdd 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -19,8 +19,7 @@ use std::sync::Arc; use blockchain::{BlockReceipts, TreeRoute}; use bytes::Bytes; -use call_contract::CallContract; -use call_contract::RegistryInfo; +use call_contract::{CallContract, RegistryInfo}; use ethcore_miner::pool::VerifiedTransaction; use ethereum_types::{H256, U256, Address}; use evm::Schedule; From 8415acb4b4447ed4c0dc5acd24225bfadc15c8b7 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 14:38:45 +0100 Subject: [PATCH 10/15] Remove commented code --- ethcore/src/client/client.rs | 4 ++-- ethcore/src/client/mod.rs | 2 +- ethcore/src/client/test_client.rs | 4 ++-- ethcore/src/client/traits.rs | 12 ------------ 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index d9f7f9dd549..68dfe8ca392 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -47,8 +47,8 @@ use vm::{EnvInfo, LastHashes}; use block::{IsBlock, LockedBlock, Drain, ClosedBlock, OpenBlock, enact_verified, SealedBlock}; use client::ancient_import::AncientVerifier; use client::{ - Nonce, Balance, ChainInfo, BlockInfo, /*CallContract,*/ TransactionInfo, - /*RegistryInfo,*/ ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock, + Nonce, Balance, ChainInfo, BlockInfo, TransactionInfo, + ReopenBlock, PrepareOpenBlock, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, StateInfo, StateClient, Call, AccountData, BlockChain as BlockChainTrait, BlockProducer, SealedBlockImporter, ClientIoMessage, diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index bd891ab2dca..f97b2cb7535 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -36,7 +36,7 @@ pub use self::io_message::ClientIoMessage; pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, NewBlocks, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ - Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, PrepareOpenBlock, /*CallContract,*/ TransactionInfo, /*RegistryInfo,*/ ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, + Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, PrepareOpenBlock, TransactionInfo, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, StateClient, Call, EngineInfo, AccountData, BlockChain, BlockProducer, SealedBlockImporter, BadBlocks, }; pub use state::StateInfo; diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 88b9d0c96c5..5236f7cd409 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -49,9 +49,9 @@ use types::views::BlockView; use vm::Schedule; use block::{OpenBlock, SealedBlock, ClosedBlock}; -use call_contract::CallContract; +use call_contract::{CallContract, RegistryInfo}; use client::{ - Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, /* CallContract,*/ TransactionInfo, RegistryInfo, + Nonce, Balance, ChainInfo, BlockInfo, ReopenBlock, TransactionInfo, PrepareOpenBlock, BlockChainClient, BlockChainInfo, BlockStatus, BlockId, Mode, TransactionId, UncleId, TraceId, TraceFilter, LastHashes, CallAnalytics, ProvingBlockChainClient, ScheduleInfo, ImportSealedBlock, BroadcastProposalBlock, ImportBlock, StateOrBlock, diff --git a/ethcore/src/client/traits.rs b/ethcore/src/client/traits.rs index 9f6d300ecdd..b273bd3dcb2 100644 --- a/ethcore/src/client/traits.rs +++ b/ethcore/src/client/traits.rs @@ -158,12 +158,6 @@ pub trait StateClient { /// Provides various blockchain information, like block header, chain state etc. pub trait BlockChain: ChainInfo + BlockInfo + TransactionInfo {} -// /// Provides information on a blockchain service and it's registry -// pub trait RegistryInfo { -// /// Get the address of a particular blockchain service, if available. -// fn registry_address(&self, name: String, block: BlockId) -> Option
; -// } - // FIXME Why these methods belong to BlockChainClient and not MiningBlockChainClient? /// Provides methods to import block into blockchain pub trait ImportBlock { @@ -171,12 +165,6 @@ pub trait ImportBlock { fn import_block(&self, block: Unverified) -> EthcoreResult; } -// /// Provides `call_contract` method -// pub trait CallContract { -// /// Like `call`, but with various defaults. Designed to be used for calling contracts. -// fn call_contract(&self, id: BlockId, address: Address, data: Bytes) -> Result; -// } - /// Provides `call` and `call_many` methods pub trait Call { /// Type representing chain state From 89c0a2a35263791c270049063ce6d5b364ccb0ff Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 14:51:00 +0100 Subject: [PATCH 11/15] Add documentation to call_contract crate --- ethcore/call-contract/src/call_contract.rs | 4 +++- ethcore/call-contract/src/lib.rs | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ethcore/call-contract/src/call_contract.rs b/ethcore/call-contract/src/call_contract.rs index 1b43f772f4b..8b042f0833c 100644 --- a/ethcore/call-contract/src/call_contract.rs +++ b/ethcore/call-contract/src/call_contract.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Parity Ethereum. If not, see . +//! Provides CallContract and RegistryInfo traits + use bytes::Bytes; use ethereum_types::Address; use types::ids::BlockId; @@ -28,4 +30,4 @@ pub trait CallContract { pub trait RegistryInfo { /// Get the address of a particular blockchain service, if available. fn registry_address(&self, name: String, block: BlockId) -> Option
; -} \ No newline at end of file +} diff --git a/ethcore/call-contract/src/lib.rs b/ethcore/call-contract/src/lib.rs index 13aacde3a34..b509edd7ffa 100644 --- a/ethcore/call-contract/src/lib.rs +++ b/ethcore/call-contract/src/lib.rs @@ -14,6 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Parity Ethereum. If not, see . +#![warn(missing_docs)] + +//! Call Contract module +//! Provides CallContract and RegistryInfo traits + pub mod call_contract; // Re-export From bb1c476cef8e67efbb414b91b500cba7dad291af Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Mon, 14 Jan 2019 16:03:43 +0100 Subject: [PATCH 12/15] Add TODO for removal of re-exports --- ethcore/src/client/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index f97b2cb7535..0bb5a2f10d2 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -46,6 +46,8 @@ pub use types::ids::*; pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; + +// TODO: Get rid of re-exports: https://github.com/paritytech/parity-ethereum/issues/10130 pub use call_contract::{CallContract, RegistryInfo}; pub use executive::{Executed, Executive, TransactOptions}; From 5ab599af00f9bc650664b063026af251f84c0e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 14 Jan 2019 16:26:09 +0100 Subject: [PATCH 13/15] Update call-contract crate description Co-Authored-By: HCastano --- ethcore/call-contract/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ethcore/call-contract/src/lib.rs b/ethcore/call-contract/src/lib.rs index b509edd7ffa..1cbfb11378e 100644 --- a/ethcore/call-contract/src/lib.rs +++ b/ethcore/call-contract/src/lib.rs @@ -17,7 +17,9 @@ #![warn(missing_docs)] //! Call Contract module -//! Provides CallContract and RegistryInfo traits +//! +//! This crate exposes traits required to call contracts at particular block. +//! All utilities that depend on on-chain data should use those traits to access it. pub mod call_contract; From 7dde1e8b2e725f6d7db3366b702b529c5f0af80d Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Tue, 15 Jan 2019 12:16:05 +0100 Subject: [PATCH 14/15] Remove re-export of `CallContract` and `RegistryInfo` from `ethcore/client` --- Cargo.lock | 3 +++ Cargo.toml | 1 + ethcore/private-tx/Cargo.toml | 1 + ethcore/private-tx/src/lib.rs | 4 +++- ethcore/src/client/mod.rs | 3 --- ethcore/src/engines/validator_set/contract.rs | 3 ++- ethcore/src/machine.rs | 3 ++- ethcore/src/miner/miner.rs | 3 ++- ethcore/src/miner/mod.rs | 3 ++- ethcore/src/miner/pool_client.rs | 3 ++- ethcore/src/tx_filter.rs | 3 ++- ethcore/src/verification/canon_verifier.rs | 3 ++- ethcore/src/verification/mod.rs | 3 ++- ethcore/src/verification/noop_verifier.rs | 3 ++- ethcore/src/verification/verification.rs | 3 ++- ethcore/src/verification/verifier.rs | 3 ++- parity/lib.rs | 1 + parity/run.rs | 3 ++- secret-store/Cargo.toml | 1 + secret-store/src/acl_storage.rs | 3 ++- secret-store/src/key_server_set.rs | 3 ++- secret-store/src/lib.rs | 1 + secret-store/src/listener/service_contract.rs | 3 ++- secret-store/src/trusted_client.rs | 3 ++- 24 files changed, 43 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8357db3ce21..9c7e13af277 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -969,6 +969,7 @@ dependencies = [ name = "ethcore-private-tx" version = "1.0.0" dependencies = [ + "call-contract 0.1.0", "common-types 0.1.0", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1008,6 +1009,7 @@ name = "ethcore-secretstore" version = "1.0.0" dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "call-contract 0.1.0", "common-types 0.1.0", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2399,6 +2401,7 @@ dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "blooms-db 0.1.0", + "call-contract 0.1.0", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "cli-signer 1.4.0", "common-types 0.1.0", diff --git a/Cargo.toml b/Cargo.toml index be7a916bf14..a62b96b3bf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" } jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-2.2" } ethcore = { path = "ethcore", features = ["parity"] } parity-bytes = "0.1" +call-contract = { path = "ethcore/call-contract"} common-types = { path = "ethcore/types" } ethcore-blockchain = { path = "ethcore/blockchain" } ethcore-db = { path = "ethcore/db" } diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 1dd328e11cb..e1ed7db0147 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -6,6 +6,7 @@ license = "GPL-3.0" authors = ["Parity Technologies "] [dependencies] +call-contract = { path = "../call-contract" } common-types = { path = "../types" } error-chain = { version = "0.12", default-features = false } ethabi = "6.0" diff --git a/ethcore/private-tx/src/lib.rs b/ethcore/private-tx/src/lib.rs index f55a30334a1..e05c42613c0 100644 --- a/ethcore/private-tx/src/lib.rs +++ b/ethcore/private-tx/src/lib.rs @@ -25,6 +25,7 @@ mod private_transactions; mod messages; mod error; +extern crate call_contract; extern crate common_types as types; extern crate ethabi; extern crate ethcore; @@ -82,11 +83,12 @@ use types::transaction::{SignedTransaction, Transaction, Action, UnverifiedTrans use ethcore::{contract_address as ethcore_contract_address}; use ethcore::client::{ Client, ChainNotify, NewBlocks, ChainMessageType, ClientIoMessage, BlockId, - CallContract, Call, BlockInfo + Call, BlockInfo }; use ethcore::account_provider::AccountProvider; use ethcore::miner::{self, Miner, MinerService, pool_client::NonceCache}; use ethcore::trace::{Tracer, VMTracer}; +use call_contract::CallContract; use rustc_hex::FromHex; use ethkey::Password; use ethabi::FunctionOutputDecoder; diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 0bb5a2f10d2..7d9053ca60b 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -47,9 +47,6 @@ pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; -// TODO: Get rid of re-exports: https://github.com/paritytech/parity-ethereum/issues/10130 -pub use call_contract::{CallContract, RegistryInfo}; - pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo}; diff --git a/ethcore/src/engines/validator_set/contract.rs b/ethcore/src/engines/validator_set/contract.rs index 714a092d7e5..b13ebdd105d 100644 --- a/ethcore/src/engines/validator_set/contract.rs +++ b/ethcore/src/engines/validator_set/contract.rs @@ -145,7 +145,8 @@ mod tests { use miner::MinerService; use types::ids::BlockId; use test_helpers::generate_dummy_client_with_spec_and_accounts; - use client::{BlockChainClient, ChainInfo, BlockInfo, CallContract}; + use call_contract::CallContract; + use client::{BlockChainClient, ChainInfo, BlockInfo}; use super::super::ValidatorSet; use super::ValidatorContract; diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 873262d5dc9..a14cb3bd296 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -30,7 +30,8 @@ use vm::{EnvInfo, Schedule, CreateContractAddress}; use block::{ExecutedBlock, IsBlock}; use builtin::Builtin; -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use error::Error; use executive::Executive; use spec::CommonParams; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index d30c5a67d04..998ce628041 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -21,6 +21,7 @@ use std::sync::Arc; use ansi_term::Colour; use bytes::Bytes; +use call_contract::CallContract; use ethcore_miner::gas_pricer::GasPricer; use ethcore_miner::pool::{self, TransactionQueue, VerifiedTransaction, QueueStatus, PrioritizationStrategy}; #[cfg(feature = "work-notify")] @@ -48,7 +49,7 @@ use using_queue::{UsingQueue, GetAction}; use account_provider::{AccountProvider, SignError as AccountError}; use block::{ClosedBlock, IsBlock, SealedBlock}; use client::{ - BlockChain, ChainInfo, CallContract, BlockProducer, SealedBlockImporter, Nonce, TransactionInfo, TransactionId + BlockChain, ChainInfo, BlockProducer, SealedBlockImporter, Nonce, TransactionInfo, TransactionId }; use client::{BlockId, ClientIoMessage}; use engines::{EthEngine, Seal}; diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 399d66b5459..4f5ba4c1f84 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -42,8 +42,9 @@ use types::header::Header; use types::receipt::RichReceipt; use block::SealedBlock; +use call_contract::{CallContract, RegistryInfo}; use client::{ - CallContract, RegistryInfo, ScheduleInfo, + ScheduleInfo, BlockChain, BlockProducer, SealedBlockImporter, ChainInfo, AccountData, Nonce, }; diff --git a/ethcore/src/miner/pool_client.rs b/ethcore/src/miner/pool_client.rs index 1bccc04f106..a75454a3fd5 100644 --- a/ethcore/src/miner/pool_client.rs +++ b/ethcore/src/miner/pool_client.rs @@ -35,7 +35,8 @@ use types::header::Header; use parking_lot::RwLock; use account_provider::AccountProvider; -use client::{TransactionId, BlockInfo, CallContract, Nonce}; +use call_contract::CallContract; +use client::{TransactionId, BlockInfo, Nonce}; use engines::EthEngine; use miner; use transaction_ext::Transaction; diff --git a/ethcore/src/tx_filter.rs b/ethcore/src/tx_filter.rs index 403e4f7bcbe..3f32ab365a8 100644 --- a/ethcore/src/tx_filter.rs +++ b/ethcore/src/tx_filter.rs @@ -20,7 +20,8 @@ use ethereum_types::{H256, U256, Address}; use lru_cache::LruCache; use ethabi::FunctionOutputDecoder; -use client::{BlockInfo, CallContract, BlockId}; +use call_contract::CallContract; +use client::{BlockInfo, BlockId}; use parking_lot::Mutex; use spec::CommonParams; use types::transaction::{Action, SignedTransaction}; diff --git a/ethcore/src/verification/canon_verifier.rs b/ethcore/src/verification/canon_verifier.rs index 4a8ed111c96..03a1c7155f8 100644 --- a/ethcore/src/verification/canon_verifier.rs +++ b/ethcore/src/verification/canon_verifier.rs @@ -16,7 +16,8 @@ //! Canonical verifier. -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::Error; use types::header::Header; diff --git a/ethcore/src/verification/mod.rs b/ethcore/src/verification/mod.rs index acffb8c0a54..5546bd60c91 100644 --- a/ethcore/src/verification/mod.rs +++ b/ethcore/src/verification/mod.rs @@ -28,7 +28,8 @@ pub use self::canon_verifier::CanonVerifier; pub use self::noop_verifier::NoopVerifier; pub use self::queue::{BlockQueue, Config as QueueConfig, VerificationQueue, QueueInfo}; -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; /// Verifier type. #[derive(Debug, PartialEq, Clone)] diff --git a/ethcore/src/verification/noop_verifier.rs b/ethcore/src/verification/noop_verifier.rs index 727e99a66c0..d68f1eb8856 100644 --- a/ethcore/src/verification/noop_verifier.rs +++ b/ethcore/src/verification/noop_verifier.rs @@ -16,7 +16,8 @@ //! No-op verifier. -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::Error; use types::header::Header; diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 31eb9dfa685..827b7143913 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -32,7 +32,8 @@ use triehash::ordered_trie_root; use unexpected::{Mismatch, OutOfBounds}; use blockchain::*; -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::{BlockError, Error}; use types::{BlockNumber, header::Header}; diff --git a/ethcore/src/verification/verifier.rs b/ethcore/src/verification/verifier.rs index a1a5d32bc95..76eb60b9a18 100644 --- a/ethcore/src/verification/verifier.rs +++ b/ethcore/src/verification/verifier.rs @@ -16,7 +16,8 @@ //! A generic verifier trait. -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::Error; use types::header::Header; diff --git a/parity/lib.rs b/parity/lib.rs index 14ec8f98ed2..8a9203cffd9 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -41,6 +41,7 @@ extern crate serde_derive; extern crate toml; extern crate blooms_db; +extern crate call_contract; extern crate cli_signer; extern crate common_types as types; extern crate ethcore; diff --git a/parity/run.rs b/parity/run.rs index 8b4bfff5b95..d0034ed7e4b 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -21,8 +21,9 @@ use std::thread; use ansi_term::Colour; use bytes::Bytes; +use call_contract::CallContract; use ethcore::account_provider::{AccountProvider, AccountProviderSettings}; -use ethcore::client::{BlockId, CallContract, Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; +use ethcore::client::{BlockId, Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; use ethstore::ethkey; use ethcore::miner::{stratum, Miner, MinerService, MinerOptions}; use ethcore::snapshot::{self, SnapshotConfiguration}; diff --git a/secret-store/Cargo.toml b/secret-store/Cargo.toml index 8d41d48a87a..f7ec4feaa52 100644 --- a/secret-store/Cargo.toml +++ b/secret-store/Cargo.toml @@ -7,6 +7,7 @@ authors = ["Parity Technologies "] [dependencies] byteorder = "1.0" +call-contract = { path = "../ethcore/call-contract" } common-types = { path = "../ethcore/types" } log = "0.4" parking_lot = "0.7" diff --git a/secret-store/src/acl_storage.rs b/secret-store/src/acl_storage.rs index 98eab5d932c..8c6656b1084 100644 --- a/secret-store/src/acl_storage.rs +++ b/secret-store/src/acl_storage.rs @@ -17,7 +17,8 @@ use std::sync::Arc; use std::collections::{HashMap, HashSet}; use parking_lot::{Mutex, RwLock}; -use ethcore::client::{BlockId, ChainNotify, NewBlocks, CallContract}; +use call_contract::CallContract; +use ethcore::client::{BlockId, ChainNotify, NewBlocks}; use ethereum_types::Address; use ethabi::FunctionOutputDecoder; use trusted_client::TrustedClient; diff --git a/secret-store/src/key_server_set.rs b/secret-store/src/key_server_set.rs index 50036d04d5d..5b25641aeec 100644 --- a/secret-store/src/key_server_set.rs +++ b/secret-store/src/key_server_set.rs @@ -18,8 +18,9 @@ use std::sync::Arc; use std::net::SocketAddr; use std::collections::{BTreeMap, HashSet}; use parking_lot::Mutex; +use call_contract::CallContract; use ethabi::FunctionOutputDecoder; -use ethcore::client::{Client, BlockChainClient, BlockId, ChainNotify, NewBlocks, CallContract}; +use ethcore::client::{Client, BlockChainClient, BlockId, ChainNotify, NewBlocks}; use ethereum_types::{H256, Address}; use ethkey::public_to_address; use bytes::Bytes; diff --git a/secret-store/src/lib.rs b/secret-store/src/lib.rs index 76ae09ffb34..d52cdafd318 100644 --- a/secret-store/src/lib.rs +++ b/secret-store/src/lib.rs @@ -15,6 +15,7 @@ // along with Parity Ethereum. If not, see . extern crate byteorder; +extern crate call_contract; extern crate common_types; extern crate ethabi; extern crate ethcore; diff --git a/secret-store/src/listener/service_contract.rs b/secret-store/src/listener/service_contract.rs index 47bb996e358..795e75d2c6d 100644 --- a/secret-store/src/listener/service_contract.rs +++ b/secret-store/src/listener/service_contract.rs @@ -19,7 +19,8 @@ use parking_lot::RwLock; use common_types::filter::Filter; use ethabi::RawLog; use ethabi::FunctionOutputDecoder; -use ethcore::client::{Client, BlockChainClient, BlockId, CallContract}; +use call_contract::CallContract; +use ethcore::client::{Client, BlockChainClient, BlockId}; use ethkey::{Public, public_to_address}; use hash::keccak; use bytes::Bytes; diff --git a/secret-store/src/trusted_client.rs b/secret-store/src/trusted_client.rs index d66e7f43dab..a20373ad0d0 100644 --- a/secret-store/src/trusted_client.rs +++ b/secret-store/src/trusted_client.rs @@ -16,9 +16,10 @@ use std::sync::{Arc, Weak}; use bytes::Bytes; +use call_contract::RegistryInfo; use common_types::transaction::{Transaction, SignedTransaction, Action}; use ethereum_types::Address; -use ethcore::client::{Client, BlockChainClient, ChainInfo, Nonce, BlockId, RegistryInfo}; +use ethcore::client::{Client, BlockChainClient, ChainInfo, Nonce, BlockId}; use ethcore::miner::{Miner, MinerService}; use sync::SyncProvider; use helpers::{get_confirmed_block_hash, REQUEST_CONFIRMATIONS_REQUIRED}; From 7f450cc6164bee5eab8628fdddd82ad002bb7001 Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Thu, 17 Jan 2019 12:01:16 +0100 Subject: [PATCH 15/15] Remove CallContract and RegistryInfo re-exports again This was missed while fixing merge conflicts --- ethcore/src/client/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index ccd0d635523..d501ba21fe6 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -48,9 +48,6 @@ pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; -// TODO: Get rid of re-exports: https://github.com/paritytech/parity-ethereum/issues/10130 -pub use call_contract::{CallContract, RegistryInfo}; - pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo};