perf: use special geth tracer config setups (#7062)

This commit is contained in:
Matthias Seitz
2024-03-09 01:45:25 +01:00
committed by GitHub
parent d4ff65bfad
commit 9cae775f9c
3 changed files with 6 additions and 14 deletions

2
Cargo.lock generated
View File

@@ -6859,7 +6859,7 @@ dependencies = [
[[package]]
name = "revm-inspectors"
version = "0.1.0"
source = "git+https://github.com/paradigmxyz/evm-inspectors?rev=aad9b3c#aad9b3cc9920997a29c9e5034b78b8866627f739"
source = "git+https://github.com/paradigmxyz/evm-inspectors?rev=846dec1#846dec1db14ac42067e7a4bb6a973091cd7eb808"
dependencies = [
"alloy-primitives",
"alloy-rpc-trace-types",

View File

@@ -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"] }

View File

@@ -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
@@ -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 =
@@ -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)?;
@@ -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)?;