Skip to content

execution: fix BAL recording when coinbase == transaction target#20501

Merged
yperbasis merged 3 commits intomainfrom
yperbasis/minus_575192
Apr 13, 2026
Merged

execution: fix BAL recording when coinbase == transaction target#20501
yperbasis merged 3 commits intomainfrom
yperbasis/minus_575192

Conversation

@yperbasis
Copy link
Copy Markdown
Member

Summary

  • Fix BAL (Block Access List) recording bug where coinbase == transaction target caused storage/code/nonce reads to be dropped from the BAL
  • finalizeTx used delete(result.TxIn, result.Coinbase) which removed the entire address from the shared read-set map, destroying execution reads needed by AsBlockAccessList
  • Replace with result.TxIn.Delete(addr, AccountKey{Path: BalancePath}) to surgically remove only the stale balance read, preserving all other reads

Test plan

  • Unskipped stBugs/random_statetest_default_minus_tue_07_58_41_minus_15153_minus_575192 in TestExecutionSpecBlockchainDevnet
  • Both amsterdam variants pass (base + london)
  • make lint clean
  • make erigon integration builds
  • Full TestExecutionSpecBlockchainDevnet suite on Linux CI

🤖 Generated with Claude Code

finalizeTx deleted the entire coinbase address from result.TxIn to
force a balance re-read from the version map. Because TxIn is a
shared map reference (also stored in blockIO), this also destroyed
storage/code/nonce reads recorded during EVM execution. When the
coinbase was also the transaction target, those execution reads
were needed by AsBlockAccessList to produce the correct BAL hash.

Replace the blanket delete with ReadSet.Delete targeting only the
BalancePath key, which is the only entry that needs re-reading.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yperbasis yperbasis added the Glamsterdam https://eips.ethereum.org/EIPS/eip-7773 label Apr 12, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yperbasis yperbasis marked this pull request as ready for review April 12, 2026 15:03
@yperbasis yperbasis requested a review from mh0lt as a code owner April 12, 2026 15:03
@yperbasis yperbasis requested a review from taratorio April 12, 2026 15:04
@yperbasis yperbasis changed the title stagedsync: fix BAL recording when coinbase == transaction target execution: fix BAL recording when coinbase == transaction target Apr 12, 2026
@yperbasis yperbasis enabled auto-merge April 12, 2026 15:06
@yperbasis yperbasis added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit 435daf7 Apr 13, 2026
35 checks passed
@yperbasis yperbasis deleted the yperbasis/minus_575192 branch April 13, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Glamsterdam https://eips.ethereum.org/EIPS/eip-7773

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants