diff --git a/Cargo.lock b/Cargo.lock index dc9c4e930529..5db2c22312a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2878,6 +2878,7 @@ version = "0.0.0" dependencies = [ "eyre", "reth", + "reth-execution-types", "reth-exex", "reth-exex-test-utils", "reth-node-api", @@ -2894,6 +2895,7 @@ dependencies = [ "eyre", "futures", "reth", + "reth-execution-types", "reth-exex", "reth-exex-test-utils", "reth-node-api", @@ -2911,12 +2913,12 @@ dependencies = [ "futures", "rand 0.8.5", "reth", + "reth-execution-types", "reth-exex", "reth-exex-test-utils", "reth-node-api", "reth-node-ethereum", "reth-primitives", - "reth-provider", "reth-testing-utils", "reth-tracing", "rusqlite", @@ -2937,6 +2939,7 @@ dependencies = [ "reth", "reth-chainspec", "reth-execution-errors", + "reth-execution-types", "reth-exex", "reth-node-api", "reth-node-ethereum", @@ -6323,6 +6326,7 @@ dependencies = [ "reth-errors", "reth-ethereum-payload-builder", "reth-evm", + "reth-execution-types", "reth-exex", "reth-fs-util", "reth-net-common", @@ -6377,6 +6381,7 @@ dependencies = [ "reth-engine-primitives", "reth-evm", "reth-execution-errors", + "reth-execution-types", "reth-network-p2p", "reth-network-peers", "reth-primitives", @@ -6521,6 +6526,7 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-execution-errors", + "reth-execution-types", "reth-metrics", "reth-network", "reth-primitives", @@ -7061,6 +7067,7 @@ dependencies = [ "reth-errors", "reth-evm", "reth-evm-ethereum", + "reth-execution-types", "reth-payload-builder", "reth-primitives", "reth-provider", @@ -7124,9 +7131,9 @@ dependencies = [ "reth-consensus-common", "reth-evm", "reth-execution-errors", + "reth-execution-types", "reth-optimism-consensus", "reth-primitives", - "reth-provider", "reth-prune-types", "reth-revm", "revm", @@ -7196,6 +7203,7 @@ dependencies = [ "reth-db", "reth-db-common", "reth-evm", + "reth-execution-types", "reth-exex", "reth-network", "reth-node-api", @@ -7693,6 +7701,7 @@ dependencies = [ "reth-chainspec", "reth-evm", "reth-evm-optimism", + "reth-execution-types", "reth-payload-builder", "reth-payload-primitives", "reth-primitives", @@ -7963,6 +7972,7 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-evm-optimism", + "reth-execution-types", "reth-metrics", "reth-network-api", "reth-network-peers", @@ -8183,6 +8193,7 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-execution-errors", + "reth-execution-types", "reth-exex", "reth-network-p2p", "reth-network-peers", @@ -8375,6 +8386,7 @@ dependencies = [ "rand 0.8.5", "reth-chainspec", "reth-eth-wire-types", + "reth-execution-types", "reth-fs-util", "reth-metrics", "reth-primitives", diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 5e0e7d2de091..882c1afed705 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -25,6 +25,7 @@ reth-provider = { workspace = true } reth-evm.workspace = true reth-revm.workspace = true reth-stages.workspace = true +reth-execution-types.workspace = true reth-errors.workspace = true reth-transaction-pool.workspace = true reth-beacon-consensus.workspace = true diff --git a/bin/reth/src/commands/debug_cmd/build_block.rs b/bin/reth/src/commands/debug_cmd/build_block.rs index 119a6d98f642..40b9722ae4b5 100644 --- a/bin/reth/src/commands/debug_cmd/build_block.rs +++ b/bin/reth/src/commands/debug_cmd/build_block.rs @@ -19,6 +19,7 @@ use reth_consensus::Consensus; use reth_db::DatabaseEnv; use reth_errors::RethResult; use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor}; +use reth_execution_types::ExecutionOutcome; use reth_fs_util as fs; use reth_node_api::PayloadBuilderAttributes; use reth_payload_builder::database::CachedReads; @@ -30,7 +31,7 @@ use reth_primitives::{ }; use reth_provider::{ providers::BlockchainProvider, BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider, - ExecutionOutcome, ProviderFactory, StageCheckpointReader, StateProviderFactory, + ProviderFactory, StageCheckpointReader, StateProviderFactory, }; use reth_revm::database::StateProviderDatabase; use reth_rpc_types::engine::{BlobsBundleV1, PayloadAttributes}; diff --git a/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs b/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs index aef62326a1a5..8f78d6711073 100644 --- a/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs +++ b/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs @@ -13,13 +13,14 @@ use reth_config::Config; use reth_db::DatabaseEnv; use reth_errors::BlockValidationError; use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor}; +use reth_execution_types::ExecutionOutcome; use reth_network::NetworkHandle; use reth_network_api::NetworkInfo; use reth_primitives::BlockHashOrNumber; use reth_provider::{ - AccountExtReader, ChainSpecProvider, ExecutionOutcome, HashingWriter, HeaderProvider, - LatestStateProviderRef, OriginalValuesKnown, ProviderFactory, StageCheckpointReader, - StateWriter, StaticFileProviderFactory, StorageReader, + AccountExtReader, ChainSpecProvider, HashingWriter, HeaderProvider, LatestStateProviderRef, + OriginalValuesKnown, ProviderFactory, StageCheckpointReader, StateWriter, + StaticFileProviderFactory, StorageReader, }; use reth_revm::database::StateProviderDatabase; use reth_stages::StageId; diff --git a/bin/reth/src/commands/import_receipts_op.rs b/bin/reth/src/commands/import_receipts_op.rs index 9d84cdd01fc0..62cff7017744 100644 --- a/bin/reth/src/commands/import_receipts_op.rs +++ b/bin/reth/src/commands/import_receipts_op.rs @@ -9,11 +9,12 @@ use reth_downloaders::{ file_client::{ChunkedFileReader, DEFAULT_BYTE_LEN_CHUNK_CHAIN_FILE}, receipt_file_client::ReceiptFileClient, }; +use reth_execution_types::ExecutionOutcome; use reth_node_core::version::SHORT_VERSION; use reth_optimism_primitives::bedrock_import::is_dup_tx; use reth_primitives::{Receipts, StaticFileSegment}; use reth_provider::{ - ExecutionOutcome, OriginalValuesKnown, ProviderFactory, StageCheckpointReader, StateWriter, + OriginalValuesKnown, ProviderFactory, StageCheckpointReader, StateWriter, StaticFileProviderFactory, StaticFileWriter, StatsReader, }; use reth_stages::StageId; diff --git a/crates/blockchain-tree/Cargo.toml b/crates/blockchain-tree/Cargo.toml index 033b20225997..a90f36add053 100644 --- a/crates/blockchain-tree/Cargo.toml +++ b/crates/blockchain-tree/Cargo.toml @@ -21,6 +21,7 @@ reth-db-api.workspace = true reth-evm.workspace = true reth-revm.workspace = true reth-provider.workspace = true +reth-execution-types.workspace = true reth-prune-types.workspace = true reth-stages-api.workspace = true reth-trie = { workspace = true, features = ["metrics"] } diff --git a/crates/blockchain-tree/src/block_indices.rs b/crates/blockchain-tree/src/block_indices.rs index 494b6fc98d62..b080f26bda33 100644 --- a/crates/blockchain-tree/src/block_indices.rs +++ b/crates/blockchain-tree/src/block_indices.rs @@ -3,8 +3,8 @@ use super::state::BlockchainId; use crate::canonical_chain::CanonicalChain; use linked_hash_set::LinkedHashSet; +use reth_execution_types::Chain; use reth_primitives::{BlockHash, BlockNumHash, BlockNumber, SealedBlockWithSenders}; -use reth_provider::Chain; use std::collections::{btree_map, hash_map, BTreeMap, BTreeSet, HashMap, HashSet}; /// Internal indices of the blocks and chains. diff --git a/crates/blockchain-tree/src/blockchain_tree.rs b/crates/blockchain-tree/src/blockchain_tree.rs index bafeb6ffcba9..4c92e1fd8bf1 100644 --- a/crates/blockchain-tree/src/blockchain_tree.rs +++ b/crates/blockchain-tree/src/blockchain_tree.rs @@ -13,15 +13,15 @@ use reth_consensus::{Consensus, ConsensusError}; use reth_db_api::database::Database; use reth_evm::execute::BlockExecutorProvider; use reth_execution_errors::{BlockExecutionError, BlockValidationError}; +use reth_execution_types::{Chain, ExecutionOutcome}; use reth_primitives::{ BlockHash, BlockNumHash, BlockNumber, ForkBlock, GotExpected, Hardfork, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader, StaticFileSegment, B256, U256, }; use reth_provider::{ BlockExecutionWriter, BlockNumReader, BlockWriter, CanonStateNotification, - CanonStateNotificationSender, CanonStateNotifications, Chain, ChainSpecProvider, ChainSplit, - ChainSplitTarget, DisplayBlocksChain, ExecutionOutcome, HeaderProvider, ProviderError, - StaticFileProviderFactory, + CanonStateNotificationSender, CanonStateNotifications, ChainSpecProvider, ChainSplit, + ChainSplitTarget, DisplayBlocksChain, HeaderProvider, ProviderError, StaticFileProviderFactory, }; use reth_prune_types::PruneModes; use reth_stages_api::{MetricEvent, MetricEventsSender}; diff --git a/crates/blockchain-tree/src/chain.rs b/crates/blockchain-tree/src/chain.rs index 613cb59cdd34..dbc0c1d04b5f 100644 --- a/crates/blockchain-tree/src/chain.rs +++ b/crates/blockchain-tree/src/chain.rs @@ -13,12 +13,13 @@ use reth_consensus::{Consensus, ConsensusError, PostExecutionInput}; use reth_db_api::database::Database; use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor}; use reth_execution_errors::BlockExecutionError; +use reth_execution_types::{Chain, ExecutionOutcome}; use reth_primitives::{ BlockHash, BlockNumber, ForkBlock, GotExpected, SealedBlockWithSenders, SealedHeader, U256, }; use reth_provider::{ providers::{BundleStateProvider, ConsistentDbView}, - Chain, ExecutionOutcome, FullExecutionDataProvider, ProviderError, StateRootProvider, + FullExecutionDataProvider, ProviderError, StateRootProvider, }; use reth_revm::database::StateProviderDatabase; use reth_trie::updates::TrieUpdates; diff --git a/crates/consensus/auto-seal/Cargo.toml b/crates/consensus/auto-seal/Cargo.toml index f5f29b9051ac..edf9f84389dc 100644 --- a/crates/consensus/auto-seal/Cargo.toml +++ b/crates/consensus/auto-seal/Cargo.toml @@ -17,6 +17,7 @@ reth-chainspec.workspace = true reth-beacon-consensus.workspace = true reth-primitives.workspace = true reth-execution-errors.workspace = true +reth-execution-types.workspace = true reth-network-p2p.workspace = true reth-provider.workspace = true reth-stages-api.workspace = true diff --git a/crates/consensus/auto-seal/src/lib.rs b/crates/consensus/auto-seal/src/lib.rs index cd4c09e10f51..ba6c67487e20 100644 --- a/crates/consensus/auto-seal/src/lib.rs +++ b/crates/consensus/auto-seal/src/lib.rs @@ -20,12 +20,13 @@ use reth_chainspec::ChainSpec; use reth_consensus::{Consensus, ConsensusError, PostExecutionInput}; use reth_engine_primitives::EngineTypes; use reth_execution_errors::{BlockExecutionError, BlockValidationError}; +use reth_execution_types::ExecutionOutcome; use reth_primitives::{ constants::ETHEREUM_BLOCK_GAS_LIMIT, eip4844::calculate_excess_blob_gas, proofs, Block, BlockBody, BlockHash, BlockHashOrNumber, BlockNumber, BlockWithSenders, Bloom, Header, Requests, SealedBlock, SealedHeader, TransactionSigned, Withdrawals, B256, U256, }; -use reth_provider::{BlockReaderIdExt, ExecutionOutcome, StateProviderFactory, StateRootProvider}; +use reth_provider::{BlockReaderIdExt, StateProviderFactory, StateRootProvider}; use reth_revm::database::StateProviderDatabase; use reth_transaction_pool::TransactionPool; use std::{ diff --git a/crates/ethereum/payload/Cargo.toml b/crates/ethereum/payload/Cargo.toml index 883752a9681c..e41c8a407c33 100644 --- a/crates/ethereum/payload/Cargo.toml +++ b/crates/ethereum/payload/Cargo.toml @@ -18,6 +18,7 @@ reth-revm.workspace = true reth-transaction-pool.workspace = true reth-provider.workspace = true reth-payload-builder.workspace = true +reth-execution-types.workspace = true reth-basic-payload-builder.workspace = true reth-evm.workspace = true reth-evm-ethereum.workspace = true diff --git a/crates/ethereum/payload/src/lib.rs b/crates/ethereum/payload/src/lib.rs index c979397d7553..1e53180d99bb 100644 --- a/crates/ethereum/payload/src/lib.rs +++ b/crates/ethereum/payload/src/lib.rs @@ -17,6 +17,7 @@ use reth_basic_payload_builder::{ use reth_errors::RethError; use reth_evm::ConfigureEvm; use reth_evm_ethereum::{eip6110::parse_deposits_from_receipts, EthEvmConfig}; +use reth_execution_types::ExecutionOutcome; use reth_payload_builder::{ error::PayloadBuilderError, EthBuiltPayload, EthPayloadBuilderAttributes, }; @@ -29,7 +30,7 @@ use reth_primitives::{ revm::env::tx_env_with_recovered, Block, Header, IntoRecoveredTransaction, Receipt, EMPTY_OMMER_ROOT_HASH, U256, }; -use reth_provider::{ExecutionOutcome, StateProviderFactory}; +use reth_provider::StateProviderFactory; use reth_revm::{database::StateProviderDatabase, state_change::apply_blockhashes_update}; use reth_transaction_pool::{BestTransactionsAttributes, TransactionPool}; use revm::{ diff --git a/crates/exex/test-utils/Cargo.toml b/crates/exex/test-utils/Cargo.toml index 7c49c43612db..b7db9a98f02c 100644 --- a/crates/exex/test-utils/Cargo.toml +++ b/crates/exex/test-utils/Cargo.toml @@ -19,6 +19,7 @@ reth-consensus = { workspace = true, features = ["test-utils"] } reth-db = { workspace = true, features = ["test-utils"] } reth-db-common.workspace = true reth-evm = { workspace = true, features = ["test-utils"] } +reth-execution-types.workspace = true reth-exex.workspace = true reth-network.workspace = true reth-node-api.workspace = true diff --git a/crates/exex/test-utils/src/lib.rs b/crates/exex/test-utils/src/lib.rs index b8ca75c9e4d4..cba6e01246e6 100644 --- a/crates/exex/test-utils/src/lib.rs +++ b/crates/exex/test-utils/src/lib.rs @@ -15,6 +15,7 @@ use reth_consensus::test_utils::TestConsensus; use reth_db::{test_utils::TempDatabase, DatabaseEnv}; use reth_db_common::init::init_genesis; use reth_evm::test_utils::MockExecutorProvider; +use reth_execution_types::Chain; use reth_exex::{ExExContext, ExExEvent, ExExNotification}; use reth_network::{config::SecretKey, NetworkConfigBuilder, NetworkManager}; use reth_node_api::{FullNodeTypes, FullNodeTypesAdapter, NodeTypes}; @@ -34,7 +35,7 @@ use reth_payload_builder::noop::NoopPayloadBuilderService; use reth_primitives::{Head, SealedBlockWithSenders}; use reth_provider::{ providers::BlockchainProvider, test_utils::create_test_provider_factory_with_chain_spec, - BlockReader, Chain, ProviderFactory, + BlockReader, ProviderFactory, }; use reth_tasks::TaskManager; use reth_transaction_pool::test_utils::{testing_pool, TestPool}; diff --git a/crates/optimism/evm/Cargo.toml b/crates/optimism/evm/Cargo.toml index c7886ebf2845..47c8cedee294 100644 --- a/crates/optimism/evm/Cargo.toml +++ b/crates/optimism/evm/Cargo.toml @@ -17,7 +17,7 @@ reth-evm.workspace = true reth-primitives.workspace = true reth-revm.workspace = true reth-execution-errors.workspace = true -reth-provider.workspace = true +reth-execution-types.workspace = true reth-prune-types.workspace = true reth-consensus-common.workspace = true @@ -38,7 +38,7 @@ reth-revm = { workspace = true, features = ["test-utils"] } [features] optimism = [ "reth-primitives/optimism", - "reth-provider/optimism", + "reth-execution-types/optimism", "reth-optimism-consensus/optimism", "reth-revm/optimism", ] diff --git a/crates/optimism/evm/src/execute.rs b/crates/optimism/evm/src/execute.rs index a3062b89aae8..e6130295f455 100644 --- a/crates/optimism/evm/src/execute.rs +++ b/crates/optimism/evm/src/execute.rs @@ -9,11 +9,11 @@ use reth_evm::{ }, ConfigureEvm, }; +use reth_execution_types::ExecutionOutcome; use reth_optimism_consensus::validate_block_post_execution; use reth_primitives::{ BlockNumber, BlockWithSenders, Header, Receipt, Receipts, TxType, Withdrawals, U256, }; -use reth_provider::ExecutionOutcome; use reth_prune_types::PruneModes; use reth_revm::{ batch::{BlockBatchRecord, BlockExecutorStats}, diff --git a/crates/optimism/payload/Cargo.toml b/crates/optimism/payload/Cargo.toml index 357f13956e1a..6aaec1076779 100644 --- a/crates/optimism/payload/Cargo.toml +++ b/crates/optimism/payload/Cargo.toml @@ -22,6 +22,7 @@ reth-rpc-types.workspace = true reth-rpc-types-compat.workspace = true reth-evm.workspace = true reth-evm-optimism.workspace = true +reth-execution-types.workspace = true reth-payload-builder.workspace = true reth-payload-primitives.workspace = true reth-basic-payload-builder.workspace = true diff --git a/crates/optimism/payload/src/builder.rs b/crates/optimism/payload/src/builder.rs index d0289efc8bd6..fa17982cb8c6 100644 --- a/crates/optimism/payload/src/builder.rs +++ b/crates/optimism/payload/src/builder.rs @@ -7,6 +7,7 @@ use crate::{ use reth_basic_payload_builder::*; use reth_chainspec::ChainSpec; use reth_evm::ConfigureEvm; +use reth_execution_types::ExecutionOutcome; use reth_payload_builder::error::PayloadBuilderError; use reth_primitives::{ constants::{BEACON_NONCE, EMPTY_RECEIPTS, EMPTY_TRANSACTIONS}, @@ -16,7 +17,7 @@ use reth_primitives::{ Block, Hardfork, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH, U256, }; -use reth_provider::{ExecutionOutcome, StateProviderFactory}; +use reth_provider::StateProviderFactory; use reth_revm::database::StateProviderDatabase; use reth_transaction_pool::{BestTransactionsAttributes, TransactionPool}; use revm::{ diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 096409ab251b..2c08a0fd6a7e 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -30,6 +30,7 @@ reth-rpc-types-compat.workspace = true revm-inspectors = { workspace = true, features = ["js-tracer"] } reth-evm.workspace = true reth-network-peers.workspace = true +reth-execution-types.workspace = true reth-evm-optimism = { workspace = true, optional = true } diff --git a/crates/rpc/rpc/src/eth/api/pending_block.rs b/crates/rpc/rpc/src/eth/api/pending_block.rs index c3645b3c85a1..4f9a616dece8 100644 --- a/crates/rpc/rpc/src/eth/api/pending_block.rs +++ b/crates/rpc/rpc/src/eth/api/pending_block.rs @@ -3,6 +3,7 @@ use crate::eth::error::{EthApiError, EthResult}; use reth_chainspec::ChainSpec; use reth_errors::ProviderError; +use reth_execution_types::ExecutionOutcome; use reth_primitives::{ constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE, EMPTY_ROOT_HASH}, proofs, @@ -13,7 +14,7 @@ use reth_primitives::{ Block, BlockId, BlockNumberOrTag, Header, IntoRecoveredTransaction, Receipt, Requests, SealedBlockWithSenders, SealedHeader, B256, EMPTY_OMMER_ROOT_HASH, U256, }; -use reth_provider::{ChainSpecProvider, ExecutionOutcome, StateProviderFactory}; +use reth_provider::{ChainSpecProvider, StateProviderFactory}; use reth_revm::{ database::StateProviderDatabase, state_change::{ diff --git a/crates/rpc/rpc/src/eth/cache/mod.rs b/crates/rpc/rpc/src/eth/cache/mod.rs index 5d6ae6508485..cfbe68311ee3 100644 --- a/crates/rpc/rpc/src/eth/cache/mod.rs +++ b/crates/rpc/rpc/src/eth/cache/mod.rs @@ -3,13 +3,13 @@ use futures::{future::Either, Stream, StreamExt}; use reth_errors::{ProviderError, ProviderResult}; use reth_evm::ConfigureEvm; +use reth_execution_types::Chain; use reth_primitives::{ Block, BlockHashOrNumber, BlockWithSenders, Receipt, SealedBlock, SealedBlockWithSenders, TransactionSigned, TransactionSignedEcRecovered, B256, }; use reth_provider::{ - BlockReader, CanonStateNotification, Chain, EvmEnvProvider, StateProviderFactory, - TransactionVariant, + BlockReader, CanonStateNotification, EvmEnvProvider, StateProviderFactory, TransactionVariant, }; use reth_tasks::{TaskSpawner, TokioTaskExecutor}; use revm::primitives::{BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, SpecId}; diff --git a/crates/stages/stages/Cargo.toml b/crates/stages/stages/Cargo.toml index be203b43a18a..ab0dd6c689a7 100644 --- a/crates/stages/stages/Cargo.toml +++ b/crates/stages/stages/Cargo.toml @@ -25,6 +25,7 @@ reth-exex.workspace = true reth-network-p2p.workspace = true reth-primitives.workspace = true reth-provider.workspace = true +reth-execution-types.workspace = true reth-prune-types.workspace = true reth-storage-errors.workspace = true reth-revm.workspace = true diff --git a/crates/stages/stages/src/stages/execution.rs b/crates/stages/stages/src/stages/execution.rs index 9f3b229268ed..a37c081b4da7 100644 --- a/crates/stages/stages/src/stages/execution.rs +++ b/crates/stages/stages/src/stages/execution.rs @@ -4,6 +4,7 @@ use reth_config::config::ExecutionConfig; use reth_db::{static_file::HeaderMask, tables}; use reth_db_api::{cursor::DbCursorRO, database::Database, transaction::DbTx}; use reth_evm::execute::{BatchExecutor, BlockExecutorProvider}; +use reth_execution_types::{Chain, ExecutionOutcome}; use reth_exex::{ExExManagerHandle, ExExNotification}; use reth_primitives::{ constants::gas_units::{GIGAGAS, KILOGAS, MEGAGAS}, @@ -11,9 +12,8 @@ use reth_primitives::{ }; use reth_provider::{ providers::{StaticFileProvider, StaticFileProviderRWRefMut, StaticFileWriter}, - BlockReader, Chain, DatabaseProviderRW, ExecutionOutcome, HeaderProvider, - LatestStateProviderRef, OriginalValuesKnown, ProviderError, StateWriter, StatsReader, - TransactionVariant, + BlockReader, DatabaseProviderRW, HeaderProvider, LatestStateProviderRef, OriginalValuesKnown, + ProviderError, StateWriter, StatsReader, TransactionVariant, }; use reth_prune_types::PruneModes; use reth_revm::database::StateProviderDatabase; diff --git a/crates/stages/stages/src/stages/headers.rs b/crates/stages/stages/src/stages/headers.rs index 58c578e34d99..3d05ea52d960 100644 --- a/crates/stages/stages/src/stages/headers.rs +++ b/crates/stages/stages/src/stages/headers.rs @@ -376,10 +376,9 @@ mod tests { stage_test_suite, ExecuteStageTestRunner, StageTestRunner, UnwindStageTestRunner, }; use assert_matches::assert_matches; + use reth_execution_types::ExecutionOutcome; use reth_primitives::{BlockBody, SealedBlock, SealedBlockWithSenders, B256}; - use reth_provider::{ - BlockWriter, ExecutionOutcome, ProviderFactory, StaticFileProviderFactory, - }; + use reth_provider::{BlockWriter, ProviderFactory, StaticFileProviderFactory}; use reth_stages_api::StageUnitCheckpoint; use reth_testing_utils::generators::{self, random_header, random_header_range}; use reth_trie::{updates::TrieUpdates, HashedPostState}; diff --git a/crates/storage/provider/src/bundle_state/mod.rs b/crates/storage/provider/src/bundle_state/mod.rs index 1b3965a14a45..d1a9e9b2a14d 100644 --- a/crates/storage/provider/src/bundle_state/mod.rs +++ b/crates/storage/provider/src/bundle_state/mod.rs @@ -6,7 +6,7 @@ mod state_changes; mod state_reverts; pub use bundle_state_with_receipts::{ - AccountRevertInit, BundleStateInit, ExecutionOutcome, OriginalValuesKnown, RevertsInit, + AccountRevertInit, BundleStateInit, OriginalValuesKnown, RevertsInit, }; pub use hashed_state_changes::HashedStateChanges; pub use state_changes::StateChanges; diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index f0932f45dbf4..02287b96cad0 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -1,13 +1,13 @@ use crate::{ - bundle_state::{BundleStateInit, ExecutionOutcome, HashedStateChanges, RevertsInit}, + bundle_state::{BundleStateInit, HashedStateChanges, RevertsInit}, providers::{database::metrics, static_file::StaticFileWriter, StaticFileProvider}, to_range, traits::{ AccountExtReader, BlockSource, ChangeSetReader, ReceiptProvider, StageCheckpointWriter, }, AccountReader, BlockExecutionWriter, BlockHashReader, BlockNumReader, BlockReader, BlockWriter, - Chain, EvmEnvProvider, FinalizedBlockReader, FinalizedBlockWriter, HashingWriter, - HeaderProvider, HeaderSyncGap, HeaderSyncGapProvider, HistoricalStateProvider, HistoryWriter, + EvmEnvProvider, FinalizedBlockReader, FinalizedBlockWriter, HashingWriter, HeaderProvider, + HeaderSyncGap, HeaderSyncGapProvider, HistoricalStateProvider, HistoryWriter, LatestStateProvider, OriginalValuesKnown, ProviderError, PruneCheckpointReader, PruneCheckpointWriter, RequestsProvider, StageCheckpointReader, StateProviderBox, StateWriter, StatsReader, StorageReader, TransactionVariant, TransactionsProvider, TransactionsProviderExt, @@ -29,6 +29,7 @@ use reth_db_api::{ DatabaseError, }; use reth_evm::ConfigureEvmEnv; +use reth_execution_types::{Chain, ExecutionOutcome}; use reth_network_p2p::headers::downloader::SyncTarget; use reth_primitives::{ keccak256, diff --git a/crates/storage/provider/src/traits/block.rs b/crates/storage/provider/src/traits/block.rs index 56255969e97b..7211cb691fb6 100644 --- a/crates/storage/provider/src/traits/block.rs +++ b/crates/storage/provider/src/traits/block.rs @@ -1,5 +1,5 @@ -use crate::{Chain, ExecutionOutcome}; use reth_db_api::models::StoredBlockBodyIndices; +use reth_execution_types::{Chain, ExecutionOutcome}; use reth_primitives::{BlockNumber, SealedBlockWithSenders}; use reth_prune_types::PruneModes; use reth_storage_api::BlockReader; diff --git a/crates/transaction-pool/Cargo.toml b/crates/transaction-pool/Cargo.toml index a90b16083f42..eee2a083357c 100644 --- a/crates/transaction-pool/Cargo.toml +++ b/crates/transaction-pool/Cargo.toml @@ -16,6 +16,7 @@ workspace = true reth-chainspec.workspace = true reth-eth-wire-types.workspace = true reth-primitives.workspace = true +reth-execution-types.workspace = true reth-fs-util.workspace = true reth-provider.workspace = true reth-tasks.workspace = true diff --git a/crates/transaction-pool/src/maintain.rs b/crates/transaction-pool/src/maintain.rs index 99b29ed01289..10f2ea2e59f9 100644 --- a/crates/transaction-pool/src/maintain.rs +++ b/crates/transaction-pool/src/maintain.rs @@ -11,6 +11,7 @@ use futures_util::{ future::{BoxFuture, Fuse, FusedFuture}, FutureExt, Stream, StreamExt, }; +use reth_execution_types::ExecutionOutcome; use reth_fs_util::FsPathError; use reth_primitives::{ Address, BlockHash, BlockNumber, BlockNumberOrTag, FromRecoveredPooledTransaction, @@ -18,7 +19,7 @@ use reth_primitives::{ TryFromRecoveredTransaction, }; use reth_provider::{ - BlockReaderIdExt, CanonStateNotification, ChainSpecProvider, ExecutionOutcome, ProviderError, + BlockReaderIdExt, CanonStateNotification, ChainSpecProvider, ProviderError, StateProviderFactory, }; use reth_tasks::TaskSpawner; diff --git a/examples/exex/in-memory-state/Cargo.toml b/examples/exex/in-memory-state/Cargo.toml index 1ea633b071eb..b79808cb1392 100644 --- a/examples/exex/in-memory-state/Cargo.toml +++ b/examples/exex/in-memory-state/Cargo.toml @@ -11,6 +11,7 @@ reth-exex.workspace = true reth-node-api.workspace = true reth-node-ethereum.workspace = true reth-tracing.workspace = true +reth-execution-types.workspace = true eyre.workspace = true diff --git a/examples/exex/in-memory-state/src/main.rs b/examples/exex/in-memory-state/src/main.rs index cd683147ff05..c56cdcf5044b 100644 --- a/examples/exex/in-memory-state/src/main.rs +++ b/examples/exex/in-memory-state/src/main.rs @@ -1,6 +1,6 @@ #![warn(unused_crate_dependencies)] -use reth::providers::ExecutionOutcome; +use reth_execution_types::ExecutionOutcome; use reth_exex::{ExExContext, ExExEvent, ExExNotification}; use reth_node_api::FullNodeComponents; use reth_node_ethereum::EthereumNode; @@ -73,14 +73,11 @@ fn main() -> eyre::Result<()> { #[cfg(test)] mod tests { - use std::pin::pin; - - use reth::{ - providers::{Chain, ExecutionOutcome}, - revm::db::BundleState, - }; + use reth::revm::db::BundleState; + use reth_execution_types::{Chain, ExecutionOutcome}; use reth_exex_test_utils::{test_exex_context, PollOnce}; use reth_testing_utils::generators::{self, random_block, random_receipt}; + use std::pin::pin; #[tokio::test] async fn test_exex() -> eyre::Result<()> { diff --git a/examples/exex/minimal/Cargo.toml b/examples/exex/minimal/Cargo.toml index 5759b41e514d..6cf958904129 100644 --- a/examples/exex/minimal/Cargo.toml +++ b/examples/exex/minimal/Cargo.toml @@ -11,6 +11,7 @@ reth-exex.workspace = true reth-node-api.workspace = true reth-node-ethereum.workspace = true reth-tracing.workspace = true +reth-execution-types.workspace = true eyre.workspace = true futures.workspace = true diff --git a/examples/exex/minimal/src/main.rs b/examples/exex/minimal/src/main.rs index 7f6d4585559e..cb7af242e65d 100644 --- a/examples/exex/minimal/src/main.rs +++ b/examples/exex/minimal/src/main.rs @@ -54,7 +54,7 @@ fn main() -> eyre::Result<()> { #[cfg(test)] mod tests { - use reth::providers::{Chain, ExecutionOutcome}; + use reth_execution_types::{Chain, ExecutionOutcome}; use reth_exex_test_utils::{test_exex_context, PollOnce}; use std::pin::pin; diff --git a/examples/exex/op-bridge/Cargo.toml b/examples/exex/op-bridge/Cargo.toml index a1c8d98c5b2b..38693a2c57d8 100644 --- a/examples/exex/op-bridge/Cargo.toml +++ b/examples/exex/op-bridge/Cargo.toml @@ -11,7 +11,7 @@ reth-exex.workspace = true reth-node-api.workspace = true reth-node-ethereum.workspace = true reth-primitives.workspace = true -reth-provider.workspace = true +reth-execution-types.workspace = true reth-tracing.workspace = true eyre.workspace = true diff --git a/examples/exex/op-bridge/src/main.rs b/examples/exex/op-bridge/src/main.rs index aebe90e193c5..3c69572f24ae 100644 --- a/examples/exex/op-bridge/src/main.rs +++ b/examples/exex/op-bridge/src/main.rs @@ -1,10 +1,10 @@ use alloy_sol_types::{sol, SolEventInterface}; use futures::Future; +use reth_execution_types::Chain; use reth_exex::{ExExContext, ExExEvent}; use reth_node_api::FullNodeComponents; use reth_node_ethereum::EthereumNode; use reth_primitives::{address, Address, Log, SealedBlockWithSenders, TransactionSigned}; -use reth_provider::Chain; use reth_tracing::tracing::info; use rusqlite::Connection; @@ -259,12 +259,12 @@ mod tests { use alloy_sol_types::SolEvent; use reth::revm::db::BundleState; + use reth_execution_types::{Chain, ExecutionOutcome}; use reth_exex_test_utils::{test_exex_context, PollOnce}; use reth_primitives::{ Address, Block, Header, Log, Receipt, Transaction, TransactionSigned, TxKind, TxLegacy, TxType, U256, }; - use reth_provider::{Chain, ExecutionOutcome}; use reth_testing_utils::generators::sign_tx_with_random_key_pair; use rusqlite::Connection; diff --git a/examples/exex/rollup/Cargo.toml b/examples/exex/rollup/Cargo.toml index f22a8eeca07d..c9623ce2206d 100644 --- a/examples/exex/rollup/Cargo.toml +++ b/examples/exex/rollup/Cargo.toml @@ -14,6 +14,7 @@ reth-node-api.workspace = true reth-node-ethereum.workspace = true reth-primitives.workspace = true reth-execution-errors.workspace = true +reth-execution-types.workspace = true reth-provider.workspace = true reth-revm.workspace = true reth-tracing.workspace = true diff --git a/examples/exex/rollup/src/main.rs b/examples/exex/rollup/src/main.rs index f8a2ffc401f6..a07b3fa3301f 100644 --- a/examples/exex/rollup/src/main.rs +++ b/examples/exex/rollup/src/main.rs @@ -9,11 +9,11 @@ use db::Database; use execution::execute_block; use once_cell::sync::Lazy; use reth_chainspec::{ChainSpec, ChainSpecBuilder}; +use reth_execution_types::Chain; use reth_exex::{ExExContext, ExExEvent}; use reth_node_api::FullNodeComponents; use reth_node_ethereum::EthereumNode; use reth_primitives::{address, Address, Genesis, SealedBlockWithSenders, TransactionSigned, U256}; -use reth_provider::Chain; use reth_tracing::tracing::{error, info}; use rusqlite::Connection; use std::sync::Arc;