diff --git a/crates/consensus/auto-seal/src/task.rs b/crates/consensus/auto-seal/src/task.rs index 8979428be..dbbdc4463 100644 --- a/crates/consensus/auto-seal/src/task.rs +++ b/crates/consensus/auto-seal/src/task.rs @@ -5,7 +5,6 @@ use reth_beacon_consensus::{BeaconEngineMessage, ForkchoiceStatus}; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_engine_primitives::EngineTypes; use reth_evm::execute::BlockExecutorProvider; -use reth_primitives::IntoRecoveredTransaction; use reth_provider::{CanonChainTracker, StateProviderFactory}; use reth_stages_api::PipelineEvent; use reth_tokio_util::EventStream; diff --git a/crates/ethereum/payload/src/lib.rs b/crates/ethereum/payload/src/lib.rs index ecce558f1..2593e8336 100644 --- a/crates/ethereum/payload/src/lib.rs +++ b/crates/ethereum/payload/src/lib.rs @@ -33,8 +33,7 @@ use reth_primitives::{ constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE}, proofs::{self, calculate_requests_root}, revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg}, - Block, BlockBody, EthereumHardforks, Header, IntoRecoveredTransaction, Receipt, - EMPTY_OMMER_ROOT_HASH, + Block, BlockBody, EthereumHardforks, Header, Receipt, EMPTY_OMMER_ROOT_HASH, }; use reth_provider::{ChainSpecProvider, StateProviderFactory}; use reth_revm::database::StateProviderDatabase; diff --git a/crates/optimism/payload/src/builder.rs b/crates/optimism/payload/src/builder.rs index 5e443a4f5..18c1ece8f 100644 --- a/crates/optimism/payload/src/builder.rs +++ b/crates/optimism/payload/src/builder.rs @@ -17,7 +17,7 @@ use reth_primitives::{ constants::BEACON_NONCE, proofs, revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg}, - Block, BlockBody, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH, + Block, BlockBody, Header, Receipt, TxType, EMPTY_OMMER_ROOT_HASH, }; use reth_provider::StateProviderFactory; use reth_revm::database::StateProviderDatabase; diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index cdcf642c0..c350c5066 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -62,9 +62,9 @@ pub use transaction::BlobTransactionValidationError; pub use transaction::{ util::secp256k1::{public_key_to_address, recover_signer_unchecked, sign_message}, - IntoRecoveredTransaction, InvalidTransactionError, Signature, Transaction, TransactionMeta, - TransactionSigned, TransactionSignedEcRecovered, TransactionSignedNoHash, TxHashOrNumber, - TxType, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID, + InvalidTransactionError, Signature, Transaction, TransactionMeta, TransactionSigned, + TransactionSignedEcRecovered, TransactionSignedNoHash, TxHashOrNumber, TxType, + EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID, LEGACY_TX_TYPE_ID, }; diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index f1dae00fe..fc055adb2 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -1634,15 +1634,6 @@ impl Decodable for TransactionSignedEcRecovered { } } -/// Ensures the transaction can be sent over the -/// network -pub trait IntoRecoveredTransaction { - /// Converts to this type into a [`TransactionSignedEcRecovered`]. - /// - /// Note: this takes `&self` since indented usage is via `Arc`. - fn to_recovered_transaction(&self) -> TransactionSignedEcRecovered; -} - /// Generic wrapper with encoded Bytes, such as transaction data. #[derive(Debug, Clone, PartialEq, Eq)] pub struct WithEncoded(Bytes, pub T); diff --git a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs index d4d5fd23d..3f5d54072 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs @@ -20,8 +20,8 @@ use reth_primitives::{ BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EVMError, Env, ExecutionResult, InvalidTransaction, ResultAndState, SpecId, }, - Block, BlockBody, Header, IntoRecoveredTransaction, Receipt, Requests, SealedBlockWithSenders, - SealedHeader, TransactionSignedEcRecovered, EMPTY_OMMER_ROOT_HASH, + Block, BlockBody, Header, Receipt, Requests, SealedBlockWithSenders, SealedHeader, + TransactionSignedEcRecovered, EMPTY_OMMER_ROOT_HASH, }; use reth_provider::{ BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderError, diff --git a/crates/rpc/rpc/src/eth/filter.rs b/crates/rpc/rpc/src/eth/filter.rs index c4caa7300..23bf0b58f 100644 --- a/crates/rpc/rpc/src/eth/filter.rs +++ b/crates/rpc/rpc/src/eth/filter.rs @@ -19,7 +19,7 @@ use async_trait::async_trait; use jsonrpsee::{core::RpcResult, server::IdProvider}; use reth_chainspec::ChainInfo; use reth_node_api::EthApiTypes; -use reth_primitives::{IntoRecoveredTransaction, TransactionSignedEcRecovered}; +use reth_primitives::TransactionSignedEcRecovered; use reth_provider::{BlockIdReader, BlockReader, EvmEnvProvider, ProviderError}; use reth_rpc_eth_api::{EthFilterApiServer, FullEthApiTypes, RpcTransaction, TransactionCompat}; use reth_rpc_eth_types::{ diff --git a/crates/rpc/rpc/src/eth/pubsub.rs b/crates/rpc/rpc/src/eth/pubsub.rs index 17c4f7b74..7bd1fd03d 100644 --- a/crates/rpc/rpc/src/eth/pubsub.rs +++ b/crates/rpc/rpc/src/eth/pubsub.rs @@ -16,7 +16,6 @@ use jsonrpsee::{ server::SubscriptionMessage, types::ErrorObject, PendingSubscriptionSink, SubscriptionSink, }; use reth_network_api::NetworkInfo; -use reth_primitives::IntoRecoveredTransaction; use reth_provider::{BlockReader, CanonStateSubscriptions, EvmEnvProvider}; use reth_rpc_eth_api::{pubsub::EthPubSubApiServer, FullEthApiTypes, RpcTransaction}; use reth_rpc_eth_types::logs_utils; diff --git a/crates/transaction-pool/src/maintain.rs b/crates/transaction-pool/src/maintain.rs index 5a68b1660..e961d0370 100644 --- a/crates/transaction-pool/src/maintain.rs +++ b/crates/transaction-pool/src/maintain.rs @@ -17,8 +17,8 @@ use reth_chainspec::{ChainSpec, ChainSpecProvider}; use reth_execution_types::ChangedAccount; use reth_fs_util::FsPathError; use reth_primitives::{ - alloy_primitives::Sealable, BlockNumberOrTag, IntoRecoveredTransaction, - PooledTransactionsElementEcRecovered, SealedHeader, TransactionSigned, + alloy_primitives::Sealable, BlockNumberOrTag, PooledTransactionsElementEcRecovered, + SealedHeader, TransactionSigned, }; use reth_storage_api::{errors::provider::ProviderError, BlockReaderIdExt, StateProviderFactory}; use reth_tasks::TaskSpawner; diff --git a/crates/transaction-pool/src/pool/mod.rs b/crates/transaction-pool/src/pool/mod.rs index cfe38ea31..2ba101721 100644 --- a/crates/transaction-pool/src/pool/mod.rs +++ b/crates/transaction-pool/src/pool/mod.rs @@ -87,8 +87,7 @@ use reth_eth_wire_types::HandleMempoolData; use reth_execution_types::ChangedAccount; use reth_primitives::{ - BlobTransaction, BlobTransactionSidecar, IntoRecoveredTransaction, PooledTransactionsElement, - TransactionSigned, + BlobTransaction, BlobTransactionSidecar, PooledTransactionsElement, TransactionSigned, }; use std::{ collections::{HashMap, HashSet}, diff --git a/crates/transaction-pool/src/validate/mod.rs b/crates/transaction-pool/src/validate/mod.rs index 7baa5e3f3..80aee0afe 100644 --- a/crates/transaction-pool/src/validate/mod.rs +++ b/crates/transaction-pool/src/validate/mod.rs @@ -8,8 +8,8 @@ use crate::{ use alloy_primitives::{Address, TxHash, B256, U256}; use futures_util::future::Either; use reth_primitives::{ - BlobTransactionSidecar, IntoRecoveredTransaction, PooledTransactionsElementEcRecovered, - SealedBlock, TransactionSignedEcRecovered, + BlobTransactionSidecar, PooledTransactionsElementEcRecovered, SealedBlock, + TransactionSignedEcRecovered, }; use std::{fmt, future::Future, time::Instant}; @@ -380,10 +380,11 @@ impl ValidPoolTransaction { } } -impl> IntoRecoveredTransaction - for ValidPoolTransaction -{ - fn to_recovered_transaction(&self) -> TransactionSignedEcRecovered { +impl> ValidPoolTransaction { + /// Converts to this type into a [`TransactionSignedEcRecovered`]. + /// + /// Note: this takes `&self` since indented usage is via `Arc`. + pub fn to_recovered_transaction(&self) -> TransactionSignedEcRecovered { self.transaction.clone().into_consensus() } } diff --git a/examples/custom-inspector/src/main.rs b/examples/custom-inspector/src/main.rs index 87f8dd7e9..ce159c75c 100644 --- a/examples/custom-inspector/src/main.rs +++ b/examples/custom-inspector/src/main.rs @@ -17,7 +17,7 @@ use reth::{ args::utils::DefaultChainSpecParser, builder::NodeHandle, cli::Cli, - primitives::{Address, BlockNumberOrTag, IntoRecoveredTransaction}, + primitives::{Address, BlockNumberOrTag}, revm::{ inspector_handle_register, interpreter::{Interpreter, OpCode}, diff --git a/examples/txpool-tracing/src/main.rs b/examples/txpool-tracing/src/main.rs index c9d27089d..cf721c51f 100644 --- a/examples/txpool-tracing/src/main.rs +++ b/examples/txpool-tracing/src/main.rs @@ -14,12 +14,8 @@ use alloy_rpc_types_trace::{parity::TraceType, tracerequest::TraceCallRequest}; use clap::Parser; use futures_util::StreamExt; use reth::{ - args::utils::DefaultChainSpecParser, - builder::NodeHandle, - cli::Cli, - primitives::{Address, IntoRecoveredTransaction}, - rpc::compat::transaction::transaction_to_call_request, - transaction_pool::TransactionPool, + args::utils::DefaultChainSpecParser, builder::NodeHandle, cli::Cli, primitives::Address, + rpc::compat::transaction::transaction_to_call_request, transaction_pool::TransactionPool, }; use reth_node_ethereum::node::EthereumNode;