Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reth-eth-types: Do not import JsInspectorError by default #10202

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ reth-rpc-api-testing-util = { path = "crates/rpc/rpc-testing-util" }
reth-rpc-builder = { path = "crates/rpc/rpc-builder" }
reth-rpc-engine-api = { path = "crates/rpc/rpc-engine-api" }
reth-rpc-eth-api = { path = "crates/rpc/rpc-eth-api" }
reth-rpc-eth-types = { path = "crates/rpc/rpc-eth-types" }
reth-rpc-eth-types = { path = "crates/rpc/rpc-eth-types", default-features = false }
reth-rpc-layer = { path = "crates/rpc/rpc-layer" }
reth-rpc-server-types = { path = "crates/rpc/rpc-server-types" }
reth-rpc-types = { path = "crates/rpc/rpc-types" }
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc-eth-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ reth-tasks = { workspace = true, features = ["rayon"] }
reth-transaction-pool.workspace = true
reth-chainspec.workspace = true
reth-execution-types.workspace = true
reth-rpc-eth-types.workspace = true
reth-rpc-eth-types = { workspace = true, features = ["js-tracer"] }
reth-rpc-server-types.workspace = true
reth-network-api.workspace = true

Expand Down Expand Up @@ -55,4 +55,4 @@ optimism = [
"reth-primitives/optimism",
"revm/optimism",
"reth-provider/optimism",
]
]
7 changes: 6 additions & 1 deletion crates/rpc/rpc-eth-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ reth-trie.workspace = true
# ethereum
alloy-sol-types.workspace = true
revm.workspace = true
revm-inspectors = { workspace = true, features = ["js-tracer"] }
revm-inspectors.workspace = true
revm-primitives = { workspace = true, features = ["dev"] }

# rpc
Expand All @@ -56,3 +56,8 @@ tracing.workspace = true

[dev-dependencies]
serde_json.workspace = true


[features]
default = ["js-tracer"]
js-tracer = ["revm-inspectors/js-tracer"]
5 changes: 4 additions & 1 deletion crates/rpc/rpc-eth-types/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ use reth_transaction_pool::error::{
PoolTransactionError,
};
use revm::primitives::{EVMError, ExecutionResult, HaltReason, OutOfGasError};
use revm_inspectors::tracing::{js::JsInspectorError, MuxError};
#[cfg(feature = "js-tracer")]
use revm_inspectors::tracing::js::JsInspectorError;
use revm_inspectors::tracing::MuxError;
use tracing::error;

/// Result alias
Expand Down Expand Up @@ -191,6 +193,7 @@ impl From<EthApiError> for jsonrpsee_types::error::ErrorObject<'static> {
}
}

#[cfg(feature = "js-tracer")]
impl From<JsInspectorError> for EthApiError {
fn from(error: JsInspectorError) -> Self {
match error {
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ reth-rpc-types-compat.workspace = true
revm-inspectors = { workspace = true, features = ["js-tracer"] }
reth-network-peers = { workspace = true, features = ["secp256k1"] }
reth-evm.workspace = true
reth-rpc-eth-types.workspace = true
reth-rpc-eth-types = { workspace = true, features = ["js-tracer"] }
reth-rpc-server-types.workspace = true
reth-node-api.workspace = true
reth-network-types.workspace = true
Expand Down
Loading