Skip to content

Debug Trace Speedup#3058

Open
Kbhat1 wants to merge 14 commits intomainfrom
kartik/debug-trace-speedups
Open

Debug Trace Speedup#3058
Kbhat1 wants to merge 14 commits intomainfrom
kartik/debug-trace-speedups

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Mar 12, 2026

Describe your changes and provide context

  • Avoid store-tracer overhead on ordinary debug_trace* calls; use debug_traceStateAccess when Cosmos/store-level access tracing is needed
  • Add a tracing-only DBImpl read cache for repeated code, nonce, balance, and storage lookups
  • Parallelize native/default block trace execution across per-tx prestate snapshots while preserving ordered state advancement (largest improvement)

Testing performed to validate your change

  • Tested on node

Kbhat1 added 4 commits March 12, 2026 10:04
Avoid store tracing for ordinary debug traces, cache repeated traced EVM state reads, and parallelize native block trace execution.

Made-with: Cursor
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 18, 2026, 2:41 AM

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 15.68627% with 258 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.12%. Comparing base (42245eb) to head (1fc87eb).

Files with missing lines Patch % Lines
evmrpc/block_trace_profiled.go 10.52% 225 Missing and 13 partials ⚠️
evmrpc/tracers.go 59.09% 3 Missing and 6 partials ⚠️
x/evm/state/balance.go 25.00% 2 Missing and 4 partials ⚠️
sei-cosmos/types/context.go 42.85% 2 Missing and 2 partials ⚠️
x/evm/state/code.go 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (15.68%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3058      +/-   ##
==========================================
- Coverage   58.73%   58.12%   -0.61%     
==========================================
  Files        2090     2074      -16     
  Lines      172323   171754     -569     
==========================================
- Hits       101209    99836    -1373     
- Misses      62128    62980     +852     
+ Partials     8986     8938      -48     
Flag Coverage Δ
sei-chain-pr 67.31% <15.68%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/app.go 61.13% <100.00%> (-6.09%) ⬇️
x/evm/state/code.go 82.35% <0.00%> (ø)
sei-cosmos/types/context.go 92.30% <42.85%> (-1.37%) ⬇️
x/evm/state/balance.go 60.20% <25.00%> (-1.76%) ⬇️
evmrpc/tracers.go 63.87% <59.09%> (-1.69%) ⬇️
evmrpc/block_trace_profiled.go 10.52% <10.52%> (ø)

... and 103 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Kbhat1 Kbhat1 requested a review from yzang2019 March 13, 2026 14:47
Kbhat1 added 3 commits March 16, 2026 13:42
Drop the tracing-only DBImpl read cache so this branch keeps only the two debug trace speedups that materially simplify and improve the hot path: avoiding ordinary store tracing and parallelizing block traces.

Made-with: Cursor
@Kbhat1 Kbhat1 requested a review from codchen March 17, 2026 16:28
@Kbhat1 Kbhat1 enabled auto-merge March 17, 2026 21:13
@Kbhat1 Kbhat1 disabled auto-merge March 17, 2026 22:04
Kbhat1 added 2 commits March 17, 2026 22:27
Keep the profiled block trace path on the default tracer only so explicit tracers like flatCallTracer continue using the legacy implementation and preserve per-transaction failure semantics.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants