Skip to content

(feat): implement debug_traceCallMany#2257

Open
manav2401 wants to merge 10 commits into
developfrom
manav/trace-call-many
Open

(feat): implement debug_traceCallMany#2257
manav2401 wants to merge 10 commits into
developfrom
manav/trace-call-many

eth/tracers: fix typo, fix failing test

268b649
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 4, 2026 in 22m 24s

Code review found 1 important issue

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important eth/tracers/api.go:1269-1281 head+1 BLOCKHASH fixup misses natural per-bundle advance
🟡 Nit eth/tracers/api.go:1173-1174 StateContext docstring still says 'at/after the last transaction'

Annotations

Check failure on line 1281 in eth/tracers/api.go

See this annotation in the file changed.

@claude claude / Claude Code Review

head+1 BLOCKHASH fixup misses natural per-bundle advance

🟡 The head+1 BLOCKHASH fixup at `eth/tracers/api.go:1269` only fires when a bundle (or top-level config) passes an explicit `BlockOverride.Number == h.Number+1`. When the effective block reaches `h.Number+1` via the natural per-bundle advance at line 1322 (no explicit override anywhere), the fixup never re-runs and `GetHash` stays bound to the original `h` (Number=head); `BLOCKHASH(head)` then resolves through `GetHashFn`'s `ref.Number <= n` guard (head<=head TRUE → `common.Hash{}`), which is ex

Check warning on line 1174 in eth/tracers/api.go

See this annotation in the file changed.

@claude claude / Claude Code Review

StateContext docstring still says 'at/after the last transaction'

The `StateContext` type docstring at `eth/tracers/api.go:1171-1174` claims that `TransactionIndex` pointing "at/after the last transaction" yields the full post-block state, but the guard at line 1245 only matches strictly past the end (`txIndex >= len(block.Transactions())`). When `TransactionIndex == len(txs)-1` ("at" the last tx), `StateAtTransaction(lastIndex)` is called and returns the **pre-last-tx** state, not post-block. The inline comment at lines 1242-1244 was already corrected to "pas