mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 23:58:46 -05:00
chore: replace reth-provider with reth-storage-api in optimism-rpc-crate (#15310)
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -8951,6 +8951,7 @@ dependencies = [
|
||||
"op-revm",
|
||||
"parking_lot",
|
||||
"reqwest",
|
||||
"reth-chain-state",
|
||||
"reth-chainspec",
|
||||
"reth-evm",
|
||||
"reth-network-api",
|
||||
@@ -8963,13 +8964,13 @@ dependencies = [
|
||||
"reth-optimism-primitives",
|
||||
"reth-optimism-txpool",
|
||||
"reth-primitives-traits",
|
||||
"reth-provider",
|
||||
"reth-rpc",
|
||||
"reth-rpc-api",
|
||||
"reth-rpc-engine-api",
|
||||
"reth-rpc-eth-api",
|
||||
"reth-rpc-eth-types",
|
||||
"reth-rpc-server-types",
|
||||
"reth-storage-api",
|
||||
"reth-tasks",
|
||||
"reth-transaction-pool",
|
||||
"revm",
|
||||
|
||||
@@ -15,7 +15,8 @@ workspace = true
|
||||
# reth
|
||||
reth-evm.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-provider.workspace = true
|
||||
reth-storage-api.workspace = true
|
||||
reth-chain-state.workspace = true
|
||||
reth-rpc-eth-api.workspace = true
|
||||
reth-rpc-eth-types.workspace = true
|
||||
reth-rpc-server-types.workspace = true
|
||||
|
||||
@@ -14,10 +14,10 @@ use op_alloy_rpc_types_engine::{
|
||||
};
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_node_api::{EngineTypes, EngineValidator};
|
||||
use reth_provider::{BlockReader, HeaderProvider, StateProviderFactory};
|
||||
use reth_rpc_api::IntoEngineApiRpcModule;
|
||||
use reth_rpc_engine_api::EngineApi;
|
||||
use reth_rpc_server_types::result::internal_rpc_err;
|
||||
use reth_storage_api::{BlockReader, HeaderProvider, StateProviderFactory};
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
use tracing::trace;
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ use reth_node_api::BlockBody;
|
||||
use reth_optimism_chainspec::OpChainSpec;
|
||||
use reth_optimism_primitives::{OpReceipt, OpTransactionSigned};
|
||||
use reth_primitives_traits::SignedTransaction;
|
||||
use reth_provider::{BlockReader, HeaderProvider};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking},
|
||||
types::RpcTypes,
|
||||
RpcReceipt,
|
||||
};
|
||||
use reth_storage_api::{BlockReader, HeaderProvider};
|
||||
|
||||
use crate::{eth::OpNodeCore, OpEthApi, OpEthApiError, OpReceiptBuilder};
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ use alloy_rpc_types_eth::transaction::TransactionRequest;
|
||||
use op_revm::OpTransaction;
|
||||
use reth_evm::{execute::BlockExecutorFactory, ConfigureEvm, EvmEnv, EvmFactory, SpecFor};
|
||||
use reth_node_api::NodePrimitives;
|
||||
use reth_provider::{ProviderHeader, ProviderTx};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{estimate::EstimateCall, Call, EthCall, LoadBlock, LoadState, SpawnBlocking},
|
||||
FromEthApiError, FromEvmError, FullEthApiTypes, IntoEthApiError,
|
||||
};
|
||||
use reth_rpc_eth_types::{revm_utils::CallFees, EthApiError, RpcInvalidTransactionError};
|
||||
use reth_storage_api::{ProviderHeader, ProviderTx};
|
||||
use revm::{context::TxEnv, context_interface::Block, Database};
|
||||
|
||||
impl<N> EthCall for OpEthApi<N>
|
||||
|
||||
@@ -7,9 +7,9 @@ use alloy_primitives::{Bytes, StorageKey, B256, U256};
|
||||
use alloy_rpc_types_eth::erc4337::{AccountStorage, TransactionConditional};
|
||||
use jsonrpsee_core::RpcResult;
|
||||
use reth_optimism_txpool::conditional::MaybeConditionalTransaction;
|
||||
use reth_provider::{BlockReaderIdExt, StateProviderFactory};
|
||||
use reth_rpc_eth_api::L2EthApiExtServer;
|
||||
use reth_rpc_eth_types::utils::recover_raw_transaction;
|
||||
use reth_storage_api::{BlockReaderIdExt, StateProviderFactory};
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Semaphore;
|
||||
|
||||
@@ -11,17 +11,13 @@ mod pending_block;
|
||||
use alloy_primitives::U256;
|
||||
use op_alloy_network::Optimism;
|
||||
pub use receipt::{OpReceiptBuilder, OpReceiptFieldsBuilder};
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_chain_state::CanonStateSubscriptions;
|
||||
use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks};
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_node_api::{FullNodeComponents, NodePrimitives};
|
||||
use reth_node_builder::rpc::{EthApiBuilder, EthApiCtx};
|
||||
use reth_optimism_primitives::OpPrimitives;
|
||||
use reth_provider::{
|
||||
BlockNumReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider,
|
||||
ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx, StageCheckpointReader,
|
||||
StateProviderFactory,
|
||||
};
|
||||
use reth_rpc::eth::{core::EthApiInner, DevSigner};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{
|
||||
@@ -31,6 +27,10 @@ use reth_rpc_eth_api::{
|
||||
EthApiTypes, FromEvmError, FullEthApiServer, RpcNodeCore, RpcNodeCoreExt,
|
||||
};
|
||||
use reth_rpc_eth_types::{EthStateCache, FeeHistoryCache, GasPriceOracle};
|
||||
use reth_storage_api::{
|
||||
BlockNumReader, BlockReader, BlockReaderIdExt, ProviderBlock, ProviderHeader, ProviderReceipt,
|
||||
ProviderTx, StageCheckpointReader, StateProviderFactory,
|
||||
};
|
||||
use reth_tasks::{
|
||||
pool::{BlockingTaskGuard, BlockingTaskPool},
|
||||
TaskSpawner,
|
||||
|
||||
@@ -4,23 +4,23 @@ use crate::OpEthApi;
|
||||
use alloy_consensus::BlockHeader;
|
||||
use alloy_eips::BlockNumberOrTag;
|
||||
use alloy_primitives::B256;
|
||||
use reth_chainspec::EthChainSpec;
|
||||
use reth_chainspec::{ChainSpecProvider, EthChainSpec};
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_node_api::NodePrimitives;
|
||||
use reth_optimism_evm::OpNextBlockEnvAttributes;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::{OpBlock, OpReceipt, OpTransactionSigned};
|
||||
use reth_primitives_traits::{RecoveredBlock, SealedHeader};
|
||||
use reth_provider::{
|
||||
BlockReader, BlockReaderIdExt, ChainSpecProvider, ProviderBlock, ProviderHeader,
|
||||
ProviderReceipt, ProviderTx, ReceiptProvider, StateProviderFactory,
|
||||
};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{LoadPendingBlock, SpawnBlocking},
|
||||
types::RpcTypes,
|
||||
EthApiTypes, FromEthApiError, FromEvmError, RpcNodeCore,
|
||||
};
|
||||
use reth_rpc_eth_types::{EthApiError, PendingBlock};
|
||||
use reth_storage_api::{
|
||||
BlockReader, BlockReaderIdExt, ProviderBlock, ProviderHeader, ProviderReceipt, ProviderTx,
|
||||
ReceiptProvider, StateProviderFactory,
|
||||
};
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionPool};
|
||||
|
||||
impl<N> LoadPendingBlock for OpEthApi<N>
|
||||
|
||||
@@ -5,14 +5,15 @@ use alloy_eips::eip2718::Encodable2718;
|
||||
use alloy_rpc_types_eth::{Log, TransactionReceipt};
|
||||
use op_alloy_consensus::{OpDepositReceipt, OpDepositReceiptWithBloom, OpReceiptEnvelope};
|
||||
use op_alloy_rpc_types::{L1BlockInfo, OpTransactionReceipt, OpTransactionReceiptFields};
|
||||
use reth_chainspec::ChainSpecProvider;
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes};
|
||||
use reth_optimism_chainspec::OpChainSpec;
|
||||
use reth_optimism_evm::RethL1BlockInfo;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::{OpReceipt, OpTransactionSigned};
|
||||
use reth_provider::{ChainSpecProvider, ReceiptProvider, TransactionsProvider};
|
||||
use reth_rpc_eth_api::{helpers::LoadReceipt, FromEthApiError, RpcReceipt};
|
||||
use reth_rpc_eth_types::{receipt::build_receipt, EthApiError};
|
||||
use reth_storage_api::{ReceiptProvider, TransactionsProvider};
|
||||
|
||||
use crate::{OpEthApi, OpEthApiError};
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ use op_alloy_consensus::OpTxEnvelope;
|
||||
use op_alloy_rpc_types::{OpTransactionRequest, Transaction};
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_optimism_primitives::{OpReceipt, OpTransactionSigned};
|
||||
use reth_provider::{
|
||||
BlockReader, BlockReaderIdExt, ProviderTx, ReceiptProvider, TransactionsProvider,
|
||||
};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking},
|
||||
FromEthApiError, FullEthApiTypes, RpcNodeCore, RpcNodeCoreExt, TransactionCompat,
|
||||
};
|
||||
use reth_rpc_eth_types::{utils::recover_raw_transaction, EthApiError};
|
||||
use reth_storage_api::{
|
||||
BlockReader, BlockReaderIdExt, ProviderTx, ReceiptProvider, TransactionsProvider,
|
||||
};
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool};
|
||||
|
||||
use crate::{eth::OpNodeCore, OpEthApi, OpEthApiError, SequencerClient};
|
||||
|
||||
@@ -12,11 +12,12 @@ use reth_optimism_evm::OpNextBlockEnvAttributes;
|
||||
use reth_optimism_payload_builder::{OpPayloadBuilder, OpPayloadPrimitives};
|
||||
use reth_optimism_txpool::OpPooledTx;
|
||||
use reth_primitives_traits::SealedHeader;
|
||||
use reth_provider::{
|
||||
BlockReaderIdExt, NodePrimitivesProvider, ProviderError, ProviderResult, StateProviderFactory,
|
||||
};
|
||||
pub use reth_rpc_api::DebugExecutionWitnessApiServer;
|
||||
use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult};
|
||||
use reth_storage_api::{
|
||||
errors::{ProviderError, ProviderResult},
|
||||
BlockReaderIdExt, NodePrimitivesProvider, StateProviderFactory,
|
||||
};
|
||||
use reth_tasks::TaskSpawner;
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
use std::{fmt::Debug, sync::Arc};
|
||||
|
||||
Reference in New Issue
Block a user