Skip to content

Commit

Permalink
perf: use special geth tracer config setups (#7062)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Mar 9, 2024
1 parent d4ff65b commit 9cae775
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ reth-trie-parallel = { path = "crates/trie-parallel" }
# revm
revm = { version = "7.1.0", features = ["std", "secp256k1"], default-features = false }
revm-primitives = { version = "3.0.0", features = ["std"], default-features = false }
revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "aad9b3c" }
revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "846dec1" }

# eth
alloy-chains = { version = "0.1", feature = ["serde", "rlp", "arbitrary"] }
Expand Down
16 changes: 4 additions & 12 deletions crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ where
.map_err(|_| EthApiError::InvalidTracerConfig)?;

let mut inspector = TracingInspector::new(
TracingInspectorConfig::from_geth_config(&config)
.set_record_logs(call_config.with_log.unwrap_or_default()),
TracingInspectorConfig::from_geth_call_config(&call_config),
);

let frame = self
Expand All @@ -318,10 +317,7 @@ where
.into_pre_state_config()
.map_err(|_| EthApiError::InvalidTracerConfig)?;
let mut inspector = TracingInspector::new(
TracingInspectorConfig::from_geth_config(&config)
// if in default mode, we need to return all touched storages, for
// which we need to record steps and statediff
.set_steps_and_state_diffs(prestate_config.is_default_mode()),
TracingInspectorConfig::from_geth_prestate_config(&prestate_config),
);

let frame =
Expand Down Expand Up @@ -540,8 +536,7 @@ where
.map_err(|_| EthApiError::InvalidTracerConfig)?;

let mut inspector = TracingInspector::new(
TracingInspectorConfig::from_geth_config(&config)
.set_record_logs(call_config.with_log.unwrap_or_default()),
TracingInspectorConfig::from_geth_call_config(&call_config),
);

let (res, _) = inspect(db, env, &mut inspector)?;
Expand All @@ -558,10 +553,7 @@ where
.map_err(|_| EthApiError::InvalidTracerConfig)?;

let mut inspector = TracingInspector::new(
TracingInspectorConfig::from_geth_config(&config)
// if in default mode, we need to return all touched storages, for
// which we need to record steps and statediff
.set_steps_and_state_diffs(prestate_config.is_default_mode()),
TracingInspectorConfig::from_geth_prestate_config(&prestate_config),
);
let (res, _, db) = inspect_and_return_db(db, env, &mut inspector)?;

Expand Down

0 comments on commit 9cae775

Please sign in to comment.