core, blockstm, state: add BlockSTM v2 parallel transaction execution #2210
Claude / Claude Code Review
completed
May 5, 2026 in 48m 51s
Code review found 1 important issue
Found 5 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | core/blockstm/mvstore.go:1 |
V2 executor leaks worker goroutines on ctx cancellation |
| 🟡 Nit | core/blockchain.go:846-848 |
V2 jumpdest cache override discards shared prefetcher cache |
| 🟡 Nit | core/blockstm/mvhashmap.go:172-175 |
MVHashMap.SkipFlush exported field is dead code |
Annotations
Check failure on line 1 in core/blockstm/mvstore.go
claude / Claude Code Review
V2 executor leaks worker goroutines on ctx cancellation
🟡 V2 executor leaks worker goroutines on ctx cancellation when a tx is mid-vfail. **Root cause is in `core/blockstm/v2_executor.go` (outside this PR's diff window) — flagging here on the sibling new file `mvstore.go` in the same package.** `v2ExecCtx.execute` at v2_executor.go:355 and :359 has two un-guarded channel receives (`<-x.completionCh[taskIdx-1]`, `<-x.execDone[prev]`); compare with `waitForTx`/`waitForFinal` in the same file which wrap their receives in `select { case <-ch: case <-x.ct
Check warning on line 848 in core/blockchain.go
claude / Claude Code Review
V2 jumpdest cache override discards shared prefetcher cache
🟡 V2 workers discard the prefetcher-warmed shared jumpdest cache. `sharedCaches.applyTo(&v2VmCfg)` (core/blockchain.go:877) wires `SharedJumpDestCache` correctly, and `vm.NewEVM` honours it (evm.go:207-209), but `v2Env.Execute` (core/parallel_state_processor.go:650-651) immediately calls `evm.SetJumpDestCache(e.jumpDests)` with the per-v2Env cache allocated at line 889 — overriding the shared one. `Keccak256Cache` and `EcrecoverCache` are read directly from `vm.Config` and ARE shared as the comm
Check warning on line 175 in core/blockstm/mvhashmap.go
claude / Claude Code Review
MVHashMap.SkipFlush exported field is dead code
MVHashMap.SkipFlush at core/blockstm/mvhashmap.go:172 is declared as part of the 'Ablation flags for performance experiments' but has zero readers and zero writers anywhere in the repository. The three sibling fields are all wired up — SkipFinalise at core/parallel_state_processor.go:118, SkipSettle at :198, SkipMVRead at mvhashmap.go:391 — making this an asymmetric oversight. Since MVHashMap is part of core/blockstm public API, removing this exported field later becomes SemVer-impactful; cleane
Loading