consensus/bor: don't leak the live tracer into non-import system transactions - #2353
Open
nebojsa94 wants to merge 3 commits into
Open
consensus/bor: don't leak the live tracer into non-import system transactions#2353nebojsa94 wants to merge 3 commits into
nebojsa94 wants to merge 3 commits into
Claude / Claude Code Review
completed
Aug 18, 2026 in 19m 14s
Code review found 2 potential issues
Found 3 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | core/parallel_state_processor.go:407-428 |
[quality] State-sync OnTxStart/OnTxEnd trace-scope wiring duplicated between serial and parallel processors |
| 🟡 Nit | core/parallel_state_processor.go:404-424 |
Parallel processor's state-sync OnTxStart uses unwrapped StateDB, not the hooked tracingStateDB |
Annotations
Check warning on line 428 in core/parallel_state_processor.go
claude / Claude Code Review
[quality] State-sync OnTxStart/OnTxEnd trace-scope wiring duplicated between serial and parallel processors
core/parallel_state_processor.go:407-428 duplicates the tracingStateDB construction and the hasStateSyncTx/OnTxStart+deferred-OnTxEnd trace-scope wiring that core/state_processor.go:92-171 already implements near-verbatim (added earlier on this same PR branch). This is a real maintenance hazard — see bug_001's vmenv/tracingStateDB divergence, which is exactly the kind of drift this duplication invites — and would be fixed by extracting a small shared helper (e.g. openStateSyncTxTraceScope(cfg, t
Check warning on line 424 in core/parallel_state_processor.go
claude / Claude Code Review
Parallel processor's state-sync OnTxStart uses unwrapped StateDB, not the hooked tracingStateDB
In `ParallelStateProcessor.Process`, the state-sync `OnTxStart` hook is called with `vmenv.GetVMContext()`, but `vmenv` was built earlier from the plain `statedb`, not the `tracingStateDB` wrapper constructed just above this call (and passed to `Finalize`). This means `VMContext.StateDB` for this hook differs from the state instance the rest of the block is traced through and that `Finalize` mutates, diverging from the serial `core/state_processor.go` path this PR is meant to mirror. Fix by buil
Loading