Skip to content

miner: fix nil statedb panic in applyTransaction pre-amsterdam#33968

Merged
MariusVanDerWijden merged 1 commit intoethereum:bal-devnet-3from
qu0b:qu0b/fix/miner-nil-statedb
Mar 6, 2026
Merged

miner: fix nil statedb panic in applyTransaction pre-amsterdam#33968
MariusVanDerWijden merged 1 commit intoethereum:bal-devnet-3from
qu0b:qu0b/fix/miner-nil-statedb

Conversation

@qu0b
Copy link
Contributor

@qu0b qu0b commented Mar 6, 2026

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 3e27b31 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

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

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@MariusVanDerWijden MariusVanDerWijden merged commit 51018a5 into ethereum:bal-devnet-3 Mar 6, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants