Skip to content

Commit b033fd6

Browse files
authored
fix: track coinbase with no changes for zero rewards (#20)
1 parent c53b609 commit b033fd6

File tree

1 file changed

+6
-0
lines changed
  • src/ethereum/forks/amsterdam

1 file changed

+6
-0
lines changed

src/ethereum/forks/amsterdam/fork.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
finalize_transaction_changes,
3737
handle_in_transaction_selfdestruct,
3838
set_block_access_index,
39+
track_address_access,
3940
track_balance_change,
4041
)
4142
from .blocks import Block, Header, Log, Receipt, Withdrawal, encode_receipt
@@ -988,6 +989,11 @@ def process_transaction(
988989
coinbase_balance_after_mining_fee = get_account(
989990
block_env.state, block_env.coinbase
990991
).balance + U256(transaction_fee)
992+
993+
# EIP-7928: Track coinbase in BAL even when transaction_fee is 0
994+
# The coinbase is accessed during fee calculation, so must appear in BAL
995+
track_address_access(block_env.state.change_tracker, block_env.coinbase)
996+
991997
if coinbase_balance_after_mining_fee != 0:
992998
set_account_balance(
993999
block_env.state,

0 commit comments

Comments
 (0)