Improve debug_traceBlock
performance
#11066
Labels
C-enhancement
New feature or request
C-perf
A change motivated by improving speed, memory usage or disk footprint
D-complex
Quite challenging from either a design or technical perspective Ask for help!
D-good-first-issue
Nice and easy! A great choice to get started
Describe the feature
currently, trace_block is a loop over transactions and that invoke trace_transaction:
reth/crates/rpc/rpc/src/debug.rs
Lines 107 to 118 in 08bdec9
note how this clones the opts:
reth/crates/rpc/rpc/src/debug.rs
Line 119 in 08bdec9
this results in some overhead:
reth/crates/rpc/rpc/src/debug.rs
Lines 708 to 710 in 08bdec9
fusing
ithttps://docs.rs/revm-inspectors/latest/revm_inspectors/tracing/struct.TracingInspector.html#method.fuse
and because most geth trace results don't consume the traces, we can keep the allocated memory in TracingInspector
https://docs.rs/revm-inspectors/latest/revm_inspectors/tracing/struct.TracingInspector.html#method.geth_builder
TODO
this could perhaps be done with a helper type for block tracing that keeps the TracingInspector or similar
Additional context
No response
The text was updated successfully, but these errors were encountered: