Conversation
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Avoid store tracing for ordinary debug traces, cache repeated traced EVM state reads, and parallelize native block trace execution. Made-with: Cursor
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3058 +/- ##
==========================================
- Coverage 58.61% 58.18% -0.43%
==========================================
Files 2090 2074 -16
Lines 172771 171777 -994
==========================================
- Hits 101262 99946 -1316
- Misses 62532 62878 +346
+ Partials 8977 8953 -24
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Made-with: Cursor
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
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
Cover profiled default block tracing regressions by asserting failed txs do not abort the whole request and block traces match transaction replay. Made-with: Cursor
…ncement The parallel state-advancement path was skipping PrepareTx (which runs the tracer ante handler: address association, sig verification, context setup) before ApplyMessage. This meant snapshots given to worker N+1 could be missing ante-handler side effects from tx N. Add PrepareTx to advanceState so the main thread's state matches what profiledTraceTx produces on each worker. The TracerAnteHandler is lightweight (no fee charging) so the overhead is minimal and parallelism is preserved. Also change failure handling: instead of aborting the entire RPC with a top-level error on the first state-advancement failure, return partial per-tx results with error entries for unreached txs, matching the sequential path's semantics. Made-with: Cursor
The DoesNotAbortOnFailedTx test asserted that both txs have non-empty "result" fields. With PrepareTx in the parallel state advancement, a failed tx's worker may receive a nonce error from the shared store flush, producing an "error" entry instead of a "result" entry. The second tx (not dispatched due to the break) gets an error fill entry. Relax the assertion: verify that both txs have per-tx entries (either result or error) and that no top-level abort occurred, which is the test's actual intent. Made-with: Cursor
codchen
left a comment
There was a problem hiding this comment.
correctness-wise I don't see issues when eyeballing the change, but we should run blockaudit against 10k blocks within each historical version if not done already, given the abundance of edge cases in those older upgrades.
performance-wise, if I'm understanding correctly, the parallel path would execute each transaction twice: once to build prestate (which is sequential, without logger), and once to generate traces (which is parallel and with logger). This makes sense if state access is no longer the bottleneck and the logger now contributes the most to latency, but if this condition changes in the future (e.g. maybe with longer history, state access slows down again) then we might need to revisit.
Describe your changes and provide context
Testing performed to validate your change