From 232bedfb3137dab17b261f2261e92bd9dc9821dd Mon Sep 17 00:00:00 2001 From: qu0b Date: Fri, 6 Mar 2026 14:01:59 +0000 Subject: [PATCH] miner: fix nil statedb panic in applyTransaction pre-amsterdam When accessList is nil (pre-Amsterdam blocks), stateCopy is never assigned and passed as nil to core.ApplyTransaction. This causes a nil pointer dereference at state_processor.go:224 when checking statedb.Database().TrieDB().IsVerkle(). Set stateCopy = env.state in the non-Amsterdam path so ApplyTransaction always receives a valid statedb. Co-Authored-By: Claude Opus 4.6 --- miner/worker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miner/worker.go b/miner/worker.go index 472802994b..6e5c92dddb 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -438,6 +438,8 @@ func (miner *Miner) applyTransaction(env *environment, tx *types.Transaction) (* prevReader = env.state.Reader() stateCopy = env.state.WithReader(state.NewReaderWithTracker(env.state.Reader())) env.evm.StateDB = stateCopy + } else { + stateCopy = env.state } mutations, receipt, err := core.ApplyTransaction(env.evm, env.gasPool, stateCopy, env.header, tx)