(feat): implement debug_traceCallMany#2257
Open
manav2401 wants to merge 10 commits into
Open
Claude / Claude Code Review
completed
Jun 4, 2026 in 13m 35s
Code review found 3 important issues
Found 5 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 3 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | eth/tracers/api.go:1296-1299 |
TraceCallMany silently discards StateOverride precompile moves (MovePrecompileTo) |
| 🔴 Important | eth/tracers/api.go:1244-1257 |
applyBlockOverride mutates shared header h across bundles, breaking blockhash fixup |
| 🔴 Important | eth/tracers/api.go:1184-1196 |
TraceCallMany: unbounded bundles/calls enable memory & CPU exhaustion DoS |
Annotations
Check failure on line 1299 in eth/tracers/api.go
claude / Claude Code Review
TraceCallMany silently discards StateOverride precompile moves (MovePrecompileTo)
TraceCallMany silently drops `StateOverride.MovePrecompileTo` (and any override targeting a precompile slot). `applyBlockOverride` clones the active precompile set and lets `config.StateOverrides.Apply` mutate it (adding the moved precompile, deleting the original), but the bundle loop at `eth/tracers/api.go:1297-1298` ignores that mutated map and calls `vm.ActivePrecompiledContracts(rules)` afresh, passing the un-mutated clone into `traceBundle → traceTx → evm.SetPrecompiles`. TraceCall (line 1
Check failure on line 1257 in eth/tracers/api.go
claude / Claude Code Review
applyBlockOverride mutates shared header h across bundles, breaking blockhash fixup
`applyBlockOverride` mutates the shared `h *types.Header` in place (`h.ParentHash = h.Hash(); h.Number.Add(...)`) on every call where `override.Number == h.Number+1`, and the same `h` pointer is reused across the initial `config.BlockOverrides` application and every bundle iteration. `core.NewEVMBlockContext` captures `h` by reference inside `GetHashFn` (which reads `ref.Number`/`ref.ParentHash` lazily), so cross-iteration mutations corrupt blockhash resolution. Fix by snapshotting the original
Check failure on line 1196 in eth/tracers/api.go
claude / Claude Code Review
TraceCallMany: unbounded bundles/calls enable memory & CPU exhaustion DoS
TraceCallMany accepts an unbounded number of bundles and unbounded transactions per bundle with no aggregate gas budget, no overall request timeout, and no ctx.Err() check between iterations. `validateBundles` only rejects the fully-empty case, so a request like `{bundles: [{transactions: [...]*M}]*N}` can pin the node for `5*N*M` seconds (defaultTraceTimeout is per-traceTx, not aggregate) while accumulating `N*M` tracer outputs in memory (the default struct logger emits one entry per opcode, of
Loading