Extract blockchain from ethcore (#10114)
* Split blockchain & db from ethcore. * Clean up blockchain deps. * Missing docs. * Fix blockchain tests. * Make other crates compile. * Remove some re-exports. * Remove types re-export from ethcore. * Remove EVM dependency from transaction. * Merge ethcore-transaction with common-types. * Clean-up ethcore deps a bit. * remove ethcore from cargo.toml * Update ethcore/blockchain/src/lib.rs Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Address review comments. * Update DB comment. * Add tracking issue to the TODO and fix typo. * Common naming for common types. * Update ethcore/db/src/keys.rs Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Update ethcore/blockchain/src/generator.rs Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Try to fix beta tests.
This commit is contained in:
committed by
Afri Schoedon
parent
3090324366
commit
3650f2d51c
@@ -19,7 +19,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::client::BlockChainClient;
|
||||
use transaction::LocalizedTransaction;
|
||||
use types::transaction::LocalizedTransaction;
|
||||
|
||||
use jsonrpc_core::Result;
|
||||
use v1::traits::Debug;
|
||||
|
||||
@@ -27,15 +27,15 @@ use parking_lot::Mutex;
|
||||
use ethash::{self, SeedHashCompute};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{BlockChainClient, BlockId, TransactionId, UncleId, StateOrBlock, StateClient, StateInfo, Call, EngineInfo, ProvingBlockChainClient};
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::header::{BlockNumber as EthBlockNumber};
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethcore::snapshot::SnapshotService;
|
||||
use ethcore::encoded;
|
||||
use sync::SyncProvider;
|
||||
use miner::external::ExternalMinerService;
|
||||
use transaction::{SignedTransaction, LocalizedTransaction};
|
||||
use hash::keccak;
|
||||
use miner::external::ExternalMinerService;
|
||||
use sync::SyncProvider;
|
||||
use types::transaction::{SignedTransaction, LocalizedTransaction};
|
||||
use types::BlockNumber as EthBlockNumber;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use jsonrpc_core::futures::future;
|
||||
@@ -466,7 +466,7 @@ pub fn pending_logs<M>(miner: &M, best_block: EthBlockNumber, filter: &EthcoreFi
|
||||
}
|
||||
|
||||
fn check_known<C>(client: &C, number: BlockNumber) -> Result<()> where C: BlockChainClient {
|
||||
use ethcore::block_status::BlockStatus;
|
||||
use types::block_status::BlockStatus;
|
||||
|
||||
let id = match number {
|
||||
BlockNumber::Pending => return Ok(()),
|
||||
@@ -625,7 +625,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> Eth for EthClient<
|
||||
Box::new(future::done(res))
|
||||
}
|
||||
|
||||
|
||||
|
||||
fn storage_at(&self, address: RpcH160, pos: RpcU256, num: Trailing<BlockNumber>) -> BoxFuture<RpcH256> {
|
||||
let address: Address = RpcH160::into(address);
|
||||
let position: U256 = RpcU256::into(pos);
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
use std::sync::Arc;
|
||||
use std::collections::{BTreeSet, VecDeque};
|
||||
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::client::{BlockChainClient, BlockId};
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::Mutex;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use jsonrpc_core::futures::{future, Future};
|
||||
|
||||
@@ -31,16 +31,16 @@ use v1::metadata::Metadata;
|
||||
use v1::traits::EthPubSub;
|
||||
use v1::types::{pubsub, RichHeader, Log};
|
||||
|
||||
use ethcore::encoded;
|
||||
use ethcore::filter::Filter as EthFilter;
|
||||
use ethcore::client::{BlockChainClient, ChainNotify, NewBlocks, ChainRouteType, BlockId};
|
||||
use sync::LightSync;
|
||||
use light::cache::Cache;
|
||||
use light::on_demand::OnDemand;
|
||||
use light::client::{LightChainClient, LightChainNotify};
|
||||
use parity_runtime::Executor;
|
||||
use ethereum_types::H256;
|
||||
use light::cache::Cache;
|
||||
use light::client::{LightChainClient, LightChainNotify};
|
||||
use light::on_demand::OnDemand;
|
||||
use parity_runtime::Executor;
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
use sync::LightSync;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthFilter;
|
||||
|
||||
type Client = Sink<pubsub::Result>;
|
||||
|
||||
|
||||
@@ -30,15 +30,15 @@ use light::{cht, TransactionQueue};
|
||||
use light::on_demand::{request, OnDemand};
|
||||
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::encoded;
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::ids::BlockId;
|
||||
use sync::LightSync;
|
||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
||||
use ethereum_types::U256;
|
||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
use rlp::Rlp;
|
||||
use transaction::SignedTransaction;
|
||||
use sync::LightSync;
|
||||
use types::transaction::SignedTransaction;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
use types::ids::BlockId;
|
||||
|
||||
use v1::impls::eth_filter::Filterable;
|
||||
use v1::helpers::{errors, limit_logs};
|
||||
|
||||
@@ -366,7 +366,7 @@ impl Parity for ParityClient {
|
||||
}
|
||||
|
||||
fn block_header(&self, number: Trailing<BlockNumber>) -> BoxFuture<RichHeader> {
|
||||
use ethcore::encoded;
|
||||
use types::encoded;
|
||||
|
||||
let engine = self.light_dispatch.client.engine().clone();
|
||||
let from_encoded = move |encoded: encoded::Header| {
|
||||
|
||||
@@ -23,20 +23,20 @@ use ethereum_types::Address;
|
||||
use version::version_data;
|
||||
|
||||
use crypto::DEFAULT_MAC;
|
||||
use ethkey::{crypto::ecies, Brain, Generator};
|
||||
use ethstore::random_phrase;
|
||||
use sync::{SyncProvider, ManageNetwork};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{BlockChainClient, StateClient, Call};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethcore::snapshot::{SnapshotService, RestorationStatus};
|
||||
use ethcore::state::StateInfo;
|
||||
use ethcore_logger::RotatingLogger;
|
||||
use updater::{Service as UpdateService};
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use ethkey::{crypto::ecies, Brain, Generator};
|
||||
use ethstore::random_phrase;
|
||||
use jsonrpc_core::futures::future;
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use jsonrpc_macros::Trailing;
|
||||
use sync::{SyncProvider, ManageNetwork};
|
||||
use types::ids::BlockId;
|
||||
use updater::{Service as UpdateService};
|
||||
|
||||
use v1::helpers::block_import::is_major_importing;
|
||||
use v1::helpers::{self, errors, fake_sign, ipfs, SigningQueue, SignerService, NetworkSettings, verify_signature};
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::time::Duration;
|
||||
|
||||
use bytes::{Bytes, ToPretty};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use transaction::PendingTransaction;
|
||||
use types::transaction::PendingTransaction;
|
||||
use ethereum_types::{H520, U128, Address};
|
||||
use ethkey::{public_to_address, recover, Signature};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use rlp::Rlp;
|
||||
|
||||
use ethcore_private_tx::Provider as PrivateTransactionManager;
|
||||
use ethereum_types::Address;
|
||||
use transaction::SignedTransaction;
|
||||
use types::transaction::SignedTransaction;
|
||||
|
||||
use jsonrpc_core::{Error};
|
||||
use v1::types::{Bytes, PrivateTransactionReceipt, H160, H256, TransactionRequest, U256,
|
||||
|
||||
@@ -23,7 +23,7 @@ use ethkey;
|
||||
use parity_runtime::Executor;
|
||||
use parking_lot::Mutex;
|
||||
use rlp::Rlp;
|
||||
use transaction::{SignedTransaction, PendingTransaction};
|
||||
use types::transaction::{SignedTransaction, PendingTransaction};
|
||||
|
||||
use jsonrpc_core::{Result, BoxFuture, Error};
|
||||
use jsonrpc_core::futures::{future, Future, IntoFuture};
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::sync::Arc;
|
||||
|
||||
use ethcore::client::{BlockChainClient, CallAnalytics, TransactionId, TraceId, StateClient, StateInfo, Call, BlockId};
|
||||
use rlp::Rlp;
|
||||
use transaction::SignedTransaction;
|
||||
use types::transaction::SignedTransaction;
|
||||
|
||||
use jsonrpc_core::Result;
|
||||
use jsonrpc_macros::Trailing;
|
||||
|
||||
Reference in New Issue
Block a user