Closed mattsse closed 2 weeks ago
currently, trace_block is a loop over transactions and that invoke trace_transaction:
https://github.com/paradigmxyz/reth/blob/08bdec9efa26c6a97a2c0467469727b61c9b5dfc/crates/rpc/rpc/src/debug.rs#L107-L118
note how this clones the opts:
https://github.com/paradigmxyz/reth/blob/08bdec9efa26c6a97a2c0467469727b61c9b5dfc/crates/rpc/rpc/src/debug.rs#L119-L119
this results in some overhead:
fusing
https://docs.rs/revm-inspectors/latest/revm_inspectors/tracing/struct.TracingInspector.html#method.geth_builder
this could perhaps be done with a helper type for block tracing that keeps the TracingInspector or similar
No response
I can take this
Ready for review
Describe the feature
currently, trace_block is a loop over transactions and that invoke trace_transaction:
https://github.com/paradigmxyz/reth/blob/08bdec9efa26c6a97a2c0467469727b61c9b5dfc/crates/rpc/rpc/src/debug.rs#L107-L118
note how this clones the opts:
https://github.com/paradigmxyz/reth/blob/08bdec9efa26c6a97a2c0467469727b61c9b5dfc/crates/rpc/rpc/src/debug.rs#L119-L119
this results in some overhead:
fusing
it https://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 TracingInspectorhttps://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