mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
chore: Replace reth-provider with reth-storage-api in reth-rpc-api (#16322)
This commit is contained in:
@@ -12,10 +12,10 @@ use alloy_rpc_types_eth::{Block, BlockTransactions, Header, Index};
|
||||
use futures::Future;
|
||||
use reth_node_api::BlockBody;
|
||||
use reth_primitives_traits::{RecoveredBlock, SealedBlock};
|
||||
use reth_provider::{
|
||||
use reth_rpc_types_compat::block::from_block;
|
||||
use reth_storage_api::{
|
||||
BlockIdReader, BlockReader, BlockReaderIdExt, ProviderHeader, ProviderReceipt, ProviderTx,
|
||||
};
|
||||
use reth_rpc_types_compat::block::from_block;
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionPool};
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ use reth_evm::{
|
||||
};
|
||||
use reth_node_api::{BlockBody, NodePrimitives};
|
||||
use reth_primitives_traits::{Recovered, SealedHeader, SignedTransaction};
|
||||
use reth_provider::{BlockIdReader, ProviderHeader, ProviderTx};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase,
|
||||
db::{CacheDB, State},
|
||||
@@ -35,6 +34,7 @@ use reth_rpc_eth_types::{
|
||||
simulate::{self, EthSimulateError},
|
||||
EthApiError, RevertError, RpcInvalidTransactionError, StateCacheDb,
|
||||
};
|
||||
use reth_storage_api::{BlockIdReader, ProviderHeader, ProviderTx};
|
||||
use revm::{
|
||||
context_interface::{
|
||||
result::{ExecutionResult, ResultAndState},
|
||||
|
||||
@@ -8,7 +8,6 @@ use futures::Future;
|
||||
use reth_chainspec::MIN_TRANSACTION_GAS;
|
||||
use reth_errors::ProviderError;
|
||||
use reth_evm::{Database, EvmEnvFor, TransactionEnv, TxEnvFor};
|
||||
use reth_provider::StateProvider;
|
||||
use reth_revm::{database::StateProviderDatabase, db::CacheDB};
|
||||
use reth_rpc_eth_types::{
|
||||
error::api::FromEvmHalt,
|
||||
@@ -16,6 +15,7 @@ use reth_rpc_eth_types::{
|
||||
EthApiError, RevertError, RpcInvalidTransactionError,
|
||||
};
|
||||
use reth_rpc_server_types::constants::gas_oracle::{CALL_STIPEND_GAS, ESTIMATE_GAS_ERROR_RATIO};
|
||||
use reth_storage_api::StateProvider;
|
||||
use revm::context_interface::{result::ExecutionResult, Transaction};
|
||||
use tracing::trace;
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ use alloy_eips::eip7840::BlobParams;
|
||||
use alloy_primitives::U256;
|
||||
use alloy_rpc_types_eth::{BlockNumberOrTag, FeeHistory};
|
||||
use futures::Future;
|
||||
use reth_chainspec::EthChainSpec;
|
||||
use reth_chainspec::{ChainSpecProvider, EthChainSpec};
|
||||
use reth_primitives_traits::BlockBody;
|
||||
use reth_provider::{BlockIdReader, ChainSpecProvider, HeaderProvider};
|
||||
use reth_rpc_eth_types::{
|
||||
fee_history::calculate_reward_percentiles_for_block, EthApiError, FeeHistoryCache,
|
||||
FeeHistoryEntry, GasPriceOracle, RpcInvalidTransactionError,
|
||||
};
|
||||
use reth_storage_api::{BlockIdReader, HeaderProvider};
|
||||
use tracing::debug;
|
||||
|
||||
/// Fee related functions for the [`EthApiServer`](crate::EthApiServer) trait in the
|
||||
|
||||
@@ -7,8 +7,8 @@ use alloy_consensus::{BlockHeader, Transaction};
|
||||
use alloy_eips::eip7840::BlobParams;
|
||||
use alloy_rpc_types_eth::BlockNumberOrTag;
|
||||
use futures::Future;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_errors::{BlockExecutionError, BlockValidationError, RethError};
|
||||
use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks};
|
||||
use reth_errors::{BlockExecutionError, BlockValidationError, ProviderError, RethError};
|
||||
use reth_evm::{
|
||||
execute::{BlockBuilder, BlockBuilderOutcome},
|
||||
ConfigureEvm, Evm, SpecFor,
|
||||
@@ -17,12 +17,12 @@ use reth_node_api::NodePrimitives;
|
||||
use reth_primitives_traits::{
|
||||
transaction::error::InvalidTransactionError, Receipt, RecoveredBlock, SealedHeader,
|
||||
};
|
||||
use reth_provider::{
|
||||
BlockReader, BlockReaderIdExt, ChainSpecProvider, ProviderBlock, ProviderError, ProviderHeader,
|
||||
ProviderReceipt, ProviderTx, ReceiptProvider, StateProviderFactory,
|
||||
};
|
||||
use reth_revm::{database::StateProviderDatabase, db::State};
|
||||
use reth_rpc_eth_types::{EthApiError, PendingBlock, PendingBlockEnv, PendingBlockEnvOrigin};
|
||||
use reth_storage_api::{
|
||||
BlockReader, BlockReaderIdExt, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx,
|
||||
ReceiptProvider, StateProviderFactory,
|
||||
};
|
||||
use reth_transaction_pool::{
|
||||
error::InvalidPoolTransactionError, BestTransactionsAttributes, PoolTransaction,
|
||||
TransactionPool,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use alloy_consensus::transaction::TransactionMeta;
|
||||
use futures::Future;
|
||||
use reth_provider::{ProviderReceipt, ProviderTx, ReceiptProvider, TransactionsProvider};
|
||||
use reth_storage_api::{ProviderReceipt, ProviderTx, ReceiptProvider, TransactionsProvider};
|
||||
|
||||
use crate::{EthApiTypes, RpcNodeCoreExt, RpcReceipt};
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
use alloy_primitives::{Address, U256, U64};
|
||||
use alloy_rpc_types_eth::{Stage, SyncInfo, SyncStatus};
|
||||
use futures::Future;
|
||||
use reth_chainspec::{ChainInfo, EthereumHardforks};
|
||||
use reth_chainspec::{ChainInfo, ChainSpecProvider, EthereumHardforks};
|
||||
use reth_errors::{RethError, RethResult};
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_provider::{BlockNumReader, ChainSpecProvider, StageCheckpointReader};
|
||||
use reth_storage_api::{BlockNumReader, StageCheckpointReader};
|
||||
|
||||
use crate::{helpers::EthSigner, RpcNodeCore};
|
||||
|
||||
|
||||
@@ -8,14 +8,13 @@ use alloy_primitives::{Address, Bytes, B256, U256};
|
||||
use alloy_rpc_types_eth::{Account, AccountInfo, EIP1186AccountProofResponse};
|
||||
use alloy_serde::JsonStorageKey;
|
||||
use futures::Future;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks};
|
||||
use reth_errors::RethError;
|
||||
use reth_evm::{ConfigureEvm, EvmEnvFor};
|
||||
use reth_provider::{
|
||||
BlockIdReader, BlockNumReader, ChainSpecProvider, StateProvider, StateProviderBox,
|
||||
StateProviderFactory,
|
||||
};
|
||||
use reth_rpc_eth_types::{EthApiError, PendingBlockEnv, RpcInvalidTransactionError};
|
||||
use reth_storage_api::{
|
||||
BlockIdReader, BlockNumReader, StateProvider, StateProviderBox, StateProviderFactory,
|
||||
};
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
|
||||
/// Helper methods for `eth_` methods relating to state (accounts).
|
||||
|
||||
@@ -14,12 +14,12 @@ use reth_evm::{
|
||||
};
|
||||
use reth_node_api::NodePrimitives;
|
||||
use reth_primitives_traits::{BlockBody, RecoveredBlock, SignedTransaction};
|
||||
use reth_provider::{BlockReader, ProviderBlock, ProviderHeader, ProviderTx};
|
||||
use reth_revm::{database::StateProviderDatabase, db::CacheDB};
|
||||
use reth_rpc_eth_types::{
|
||||
cache::db::{StateCacheDb, StateCacheDbRefMutWrapper, StateProviderTraitObjWrapper},
|
||||
EthApiError,
|
||||
};
|
||||
use reth_storage_api::{BlockReader, ProviderBlock, ProviderHeader, ProviderTx};
|
||||
use revm::{
|
||||
context_interface::result::{ExecutionResult, ResultAndState},
|
||||
state::EvmState,
|
||||
|
||||
@@ -18,12 +18,12 @@ use alloy_rpc_types_eth::{transaction::TransactionRequest, BlockNumberOrTag, Tra
|
||||
use futures::Future;
|
||||
use reth_node_api::BlockBody;
|
||||
use reth_primitives_traits::{RecoveredBlock, SignedTransaction};
|
||||
use reth_provider::{
|
||||
use reth_rpc_eth_types::{utils::binary_search, EthApiError, SignError, TransactionSource};
|
||||
use reth_rpc_types_compat::transaction::TransactionCompat;
|
||||
use reth_storage_api::{
|
||||
BlockNumReader, BlockReaderIdExt, ProviderBlock, ProviderReceipt, ProviderTx, ReceiptProvider,
|
||||
TransactionsProvider,
|
||||
};
|
||||
use reth_rpc_eth_types::{utils::binary_search, EthApiError, SignError, TransactionSource};
|
||||
use reth_rpc_types_compat::transaction::TransactionCompat;
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool};
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes, PrimitivesTy};
|
||||
use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_provider::{BlockReader, ProviderBlock, ProviderReceipt};
|
||||
use reth_rpc_eth_types::EthStateCache;
|
||||
use reth_storage_api::{BlockReader, ProviderBlock, ProviderReceipt};
|
||||
|
||||
/// Helper trait to relax trait bounds on [`FullNodeComponents`].
|
||||
///
|
||||
|
||||
@@ -4,8 +4,8 @@ use crate::{AsEthApiError, FromEthApiError, RpcNodeCore};
|
||||
use alloy_json_rpc::RpcObject;
|
||||
use alloy_network::{Network, ReceiptResponse, TransactionResponse};
|
||||
use alloy_rpc_types_eth::Block;
|
||||
use reth_provider::{ProviderTx, ReceiptProvider, TransactionsProvider};
|
||||
use reth_rpc_types_compat::TransactionCompat;
|
||||
use reth_storage_api::{ProviderTx, ReceiptProvider, TransactionsProvider};
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionPool};
|
||||
use std::{
|
||||
error::Error,
|
||||
|
||||
Reference in New Issue
Block a user