Skip to content

perf(rpc): log storage read breakdown for block traces - #215

Draft
will-2012 wants to merge 1 commit into
mainfrom
perf-traceblock
Draft

perf(rpc): log storage read breakdown for block traces#215
will-2012 wants to merge 1 commit into
mainfrom
perf-traceblock

Conversation

@will-2012

Copy link
Copy Markdown
Contributor

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:

  • add each change in a bullet point here
  • ...

Potential Impacts

  • add potential impacts for other components here
  • ...

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>
@will-2012
will-2012 requested a review from joey0612 as a code owner August 18, 2026 02:05
@hashdit-bot

hashdit-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

Pull Request Review

This 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 trace_block and debug_traceBlock*, enables the storage API’s std feature for affected RPC crates, and adds unit tests for scope and bucket accounting behavior.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

@will-2012
will-2012 marked this pull request as draft August 18, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant