rpc: rm useless alloy_rpc_types_trace reexport (#11096)

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
Thomas Coratger
2024-09-22 15:14:11 +02:00
committed by GitHub
parent f4d11f48bc
commit f7b895ef4a
19 changed files with 68 additions and 81 deletions

View File

@ -24,6 +24,7 @@ alloy-eips.workspace = true
alloy-json-rpc.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-anvil.workspace = true
alloy-rpc-types-mev.workspace = true
alloy-rpc-types-txpool.workspace = true

View File

@ -1,15 +1,11 @@
use alloy_primitives::{Address, Bytes, B256};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::geth::{
BlockTraceResult, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, TraceResult,
};
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth_primitives::{BlockId, BlockNumberOrTag};
use reth_rpc_types::{
debug::ExecutionWitness,
trace::geth::{
BlockTraceResult, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace,
TraceResult,
},
Block, Bundle, StateContext,
};
use reth_rpc_types::{debug::ExecutionWitness, Block, Bundle, StateContext};
/// Debug rpc interface.
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "debug"))]

View File

@ -1,14 +1,12 @@
use alloy_json_rpc::RpcObject;
use alloy_primitives::{Address, Bytes, TxHash, B256};
use alloy_rpc_types_trace::otterscan::{
BlockDetails, ContractCreator, InternalOperation, OtsBlockTransactions, TraceEntry,
TransactionsWithReceipts,
};
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth_primitives::BlockId;
use reth_rpc_types::{
trace::otterscan::{
BlockDetails, ContractCreator, InternalOperation, OtsBlockTransactions, TraceEntry,
TransactionsWithReceipts,
},
Header,
};
use reth_rpc_types::Header;
/// Otterscan rpc interface.
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "ots"))]

View File

@ -1,16 +1,13 @@
use alloy_primitives::{Bytes, B256};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},
parity::*,
};
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth_primitives::BlockId;
use reth_rpc_types::{
state::StateOverride,
trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},
parity::*,
},
BlockOverrides, Index,
};
use reth_rpc_types::{state::StateOverride, BlockOverrides, Index};
use std::collections::HashSet;
/// Ethereum trace API

View File

@ -70,6 +70,7 @@ reth-rpc-types-compat.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-trace.workspace = true
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
serde_json.workspace = true

View File

@ -4,6 +4,7 @@
use crate::utils::{launch_http, launch_http_ws, launch_ws};
use alloy_primitives::{hex_literal::hex, Address, Bytes, TxHash, B256, B64, U256, U64};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::filter::TraceFilter;
use jsonrpsee::{
core::{
client::{ClientT, SubscriptionClientT},
@ -22,8 +23,8 @@ use reth_rpc_api::{
};
use reth_rpc_server_types::RethRpcModule;
use reth_rpc_types::{
trace::filter::TraceFilter, Block, FeeHistory, Filter, Index, Log,
PendingTransactionFilterKind, SyncStatus, Transaction, TransactionReceipt,
Block, FeeHistory, Filter, Index, Log, PendingTransactionFilterKind, SyncStatus, Transaction,
TransactionReceipt,
};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::Value;

View File

@ -20,6 +20,7 @@ reth-rpc-api = { workspace = true, features = ["client"] }
# ethereum
alloy-primitives.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-trace.workspace = true
# async
futures.workspace = true
@ -35,3 +36,4 @@ similar-asserts.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "rt"] }
reth-rpc-eth-api.workspace = true
jsonrpsee-http-client.workspace = true
alloy-rpc-types-trace.workspace = true

View File

@ -8,17 +8,15 @@ use std::{
use alloy_primitives::{TxHash, B256};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::{
common::TraceResult,
geth::{GethDebugTracerType, GethDebugTracingOptions, GethTrace},
};
use futures::{Stream, StreamExt};
use jsonrpsee::core::client::Error as RpcError;
use reth_primitives::{BlockId, Receipt};
use reth_rpc_api::{clients::DebugApiClient, EthApiClient};
use reth_rpc_types::{
trace::{
common::TraceResult,
geth::{GethDebugTracerType, GethDebugTracingOptions, GethTrace},
},
Block, Transaction,
};
use reth_rpc_types::{Block, Transaction};
const NOOP_TRACER: &str = include_str!("../assets/noop-tracer.js");
const JS_TRACER_TEMPLATE: &str = include_str!("../assets/tracer-template.js");
@ -378,9 +376,9 @@ mod tests {
debug::{DebugApiExt, JsTracerBuilder, NoopJsTracer},
utils::parse_env_url,
};
use alloy_rpc_types_trace::geth::{CallConfig, GethDebugTracingOptions};
use futures::StreamExt;
use jsonrpsee::http_client::HttpClientBuilder;
use reth_rpc_types::trace::geth::{CallConfig, GethDebugTracingOptions};
// random tx <https://sepolia.etherscan.io/tx/0x5525c63a805df2b83c113ebcc8c7672a3b290673c4e81335b410cd9ebc64e085>
const TX_1: &str = "0x5525c63a805df2b83c113ebcc8c7672a3b290673c4e81335b410cd9ebc64e085";

View File

@ -2,18 +2,16 @@
use alloy_primitives::{Bytes, TxHash, B256};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::{
filter::TraceFilter,
parity::{LocalizedTransactionTrace, TraceResults, TraceType},
tracerequest::TraceCallRequest,
};
use futures::{Stream, StreamExt};
use jsonrpsee::core::client::Error as RpcError;
use reth_primitives::BlockId;
use reth_rpc_api::clients::TraceApiClient;
use reth_rpc_types::{
trace::{
filter::TraceFilter,
parity::{LocalizedTransactionTrace, TraceResults, TraceType},
tracerequest::TraceCallRequest,
},
Index,
};
use reth_rpc_types::Index;
use std::{
collections::HashSet,
pin::Pin,
@ -517,9 +515,9 @@ where
#[cfg(test)]
mod tests {
use super::*;
use alloy_rpc_types_trace::filter::TraceFilterMode;
use jsonrpsee::http_client::HttpClientBuilder;
use reth_primitives::BlockNumberOrTag;
use reth_rpc_types::trace::filter::TraceFilterMode;
const fn assert_is_stream<St: Stream>(_: &St) {}

View File

@ -1,15 +1,15 @@
//! Integration tests for the trace API.
use alloy_rpc_types_trace::{
filter::TraceFilter, parity::TraceType, tracerequest::TraceCallRequest,
};
use futures::StreamExt;
use jsonrpsee::http_client::HttpClientBuilder;
use jsonrpsee_http_client::HttpClient;
use reth_primitives::Receipt;
use reth_rpc_api_testing_util::{debug::DebugApiExt, trace::TraceApiExt, utils::parse_env_url};
use reth_rpc_eth_api::EthApiClient;
use reth_rpc_types::{
trace::{filter::TraceFilter, parity::TraceType, tracerequest::TraceCallRequest},
Block, Transaction,
};
use reth_rpc_types::{Block, Transaction};
use std::{collections::HashSet, time::Instant};
/// This is intended to be run locally against a running node.

View File

@ -18,7 +18,6 @@ alloy-primitives = { workspace = true, features = ["rand", "rlp", "serde"] }
alloy-rpc-types.workspace = true
alloy-rpc-types-admin.workspace = true
alloy-rpc-types-beacon = { workspace = true, optional = true }
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-debug.workspace = true
alloy-serde.workspace = true
alloy-rpc-types-engine = { workspace = true, features = ["std", "serde", "jsonrpsee-types"], optional = true }

View File

@ -25,11 +25,6 @@ pub use alloy_rpc_types::*;
// Ethereum specific serde types coming from alloy.
pub use alloy_serde::*;
pub mod trace {
//! RPC types for trace endpoints and inspectors.
pub use alloy_rpc_types_trace::*;
}
// re-export admin
pub use alloy_rpc_types_admin as admin;

View File

@ -43,6 +43,7 @@ alloy-network.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-mev.workspace = true
alloy-rpc-types-txpool.workspace = true
revm = { workspace = true, features = [

View File

@ -1,6 +1,10 @@
use alloy_primitives::{Address, Bytes, B256, U256};
use alloy_rlp::{Decodable, Encodable};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::geth::{
BlockTraceResult, FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerType,
GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, NoopFrame, TraceResult,
};
use async_trait::async_trait;
use jsonrpsee::core::RpcResult;
use reth_chainspec::{ChainSpec, EthereumHardforks};
@ -22,13 +26,8 @@ use reth_rpc_eth_api::{
use reth_rpc_eth_types::{EthApiError, StateCacheDb};
use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult};
use reth_rpc_types::{
debug::ExecutionWitness,
state::EvmOverrides,
trace::geth::{
BlockTraceResult, FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerType,
GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, NoopFrame, TraceResult,
},
Block as RpcBlock, BlockError, Bundle, StateContext,
debug::ExecutionWitness, state::EvmOverrides, Block as RpcBlock, BlockError, Bundle,
StateContext,
};
use reth_tasks::pool::BlockingTaskGuard;
use reth_trie::{HashedPostState, HashedStorage};

View File

@ -1,5 +1,12 @@
use alloy_network::{ReceiptResponse, TransactionResponse};
use alloy_primitives::{Address, Bytes, TxHash, B256, U256};
use alloy_rpc_types_trace::{
otterscan::{
BlockDetails, ContractCreator, InternalOperation, OperationType, OtsBlockTransactions,
OtsReceipt, OtsTransactionReceipt, TraceEntry, TransactionsWithReceipts,
},
parity::{Action, CreateAction, CreateOutput, TraceOutput},
};
use async_trait::async_trait;
use jsonrpsee::{core::RpcResult, types::ErrorObjectOwned};
use reth_primitives::{BlockId, BlockNumberOrTag};
@ -10,16 +17,7 @@ use reth_rpc_eth_api::{
};
use reth_rpc_eth_types::{utils::binary_search, EthApiError};
use reth_rpc_server_types::result::internal_rpc_err;
use reth_rpc_types::{
trace::{
otterscan::{
BlockDetails, ContractCreator, InternalOperation, OperationType, OtsBlockTransactions,
OtsReceipt, OtsTransactionReceipt, TraceEntry, TransactionsWithReceipts,
},
parity::{Action, CreateAction, CreateOutput, TraceOutput},
},
BlockTransactions, Header, TransactionReceipt,
};
use reth_rpc_types::{BlockTransactions, Header, TransactionReceipt};
use revm_inspectors::{
tracing::{types::CallTraceNode, TracingInspectorConfig},
transfer::{TransferInspector, TransferKind},

View File

@ -2,6 +2,12 @@ use std::{collections::HashSet, sync::Arc};
use alloy_primitives::{Bytes, B256, U256};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},
parity::*,
tracerequest::TraceCallRequest,
};
use async_trait::async_trait;
use jsonrpsee::core::RpcResult;
use reth_chainspec::{ChainSpec, EthereumHardforks};
@ -20,12 +26,6 @@ use reth_rpc_eth_api::{
use reth_rpc_eth_types::{error::EthApiError, utils::recover_raw_transaction};
use reth_rpc_types::{
state::{EvmOverrides, StateOverride},
trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},
parity::*,
tracerequest::TraceCallRequest,
},
BlockOverrides, Index,
};
use reth_tasks::pool::BlockingTaskGuard;