go-ethereum/miner
Stefan 51018a536f
miner: fix nil statedb panic in applyTransaction pre-amsterdam (#33968)
## Summary

- When `accessList` is nil (pre-Amsterdam blocks), `stateCopy` is never
assigned and passed as nil to `core.ApplyTransaction`, causing a nil
pointer dereference at `state_processor.go:224`
(`statedb.Database().TrieDB().IsVerkle()`)
- This is a follow-up to 3e27b31d4 which fixed the `StateReaderTracker`
type assertion panic but missed this second crash path in the same
function
- Fix: set `stateCopy = env.state` in the non-Amsterdam path so
`ApplyTransaction` always receives a valid statedb

## Test plan

- [x] Verified fix with 8-client Kurtosis network (`gloas_fork_epoch:
256`, pre-Amsterdam): 36+ slots, zero missed blocks, zero geth errors
- [x] Both geth nodes (lighthouse + lodestar CLs) proposing blocks
successfully with spamoor tx load

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 15:08:07 +01:00
..
stress core: implement eip-7778: block gas accounting without refunds (#33593) 2026-03-04 18:18:18 +08:00
miner.go cmd/utils: fix dumpconfig (#33302) 2025-11-28 10:13:01 +01:00
miner_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
ordering.go core/txpool, eth, miner: retrieve plain and blob txs separately (#29026) 2024-02-20 11:37:23 +02:00
ordering_test.go core/txpool, miner: speed up blob pool pending retrievals (#29008) 2024-02-19 15:59:40 +02:00
payload_building.go miner: avoid unnecessary work after payload resolution (#33943) 2026-03-04 11:58:51 +08:00
payload_building_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
pending.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
worker.go miner: fix nil statedb panic in applyTransaction pre-amsterdam (#33968) 2026-03-06 15:08:07 +01:00