perf(rpc): log storage read breakdown for block traces - #215
Draft
will-2012 wants to merge 1 commit into
Draft
Conversation
Adds thread-local accounting of historical state reads so trace_block and debug_traceBlock* emit a single event splitting wall time into history index lookups, changeset reads, plain state and the EVM. This makes it possible to tell which storage backend dominates a slow block trace. Accounting is off unless storage::timings=debug is in the log filter, so uninstrumented callers such as the executor never read the clock. Co-authored-by: Cursor <cursoragent@cursor.com>
Pull Request ReviewThis PR adds opt-in, thread-local storage-read timing instrumentation for Reth’s historical state provider, breaking latency down across account, slot, bytecode, history-index, changeset, plain-state, and non-storage/EVM work. It integrates a single timing event into Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
will-2012
marked this pull request as draft
August 18, 2026 02:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds thread-local accounting of historical state reads so trace_block and debug_traceBlock* emit a single event splitting wall time into history index lookups, changeset reads, plain state and the EVM. This makes it possible to tell which storage backend dominates a slow block trace.
Accounting is off unless storage::timings=debug is in the log filter, so uninstrumented callers such as the executor never read the clock.
Description
add a description of your changes here...
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes:
Potential Impacts