Skip to content

Commit 1de66c6

Browse files
committed
fix(spec): track collision-burned gas in regular_gas_used
On CREATE/CREATE2 address collision the 63/64 gas allocation is burned but was not added to regular_gas_used, leaving it invisible to 2D block gas accounting. Per EIP-684 collision behaves as an immediate exceptional halt, so the burned gas belongs in the regular dimension.
1 parent 0c7d32c commit 1de66c6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • src/ethereum/forks/amsterdam/vm/instructions

src/ethereum/forks/amsterdam/vm/instructions/system.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def generic_create(
127127
tx_state, contract_address
128128
) or account_has_storage(tx_state, contract_address):
129129
increment_nonce(tx_state, evm.message.current_target)
130+
evm.regular_gas_used += create_message_gas
130131
evm.state_gas_left += create_message_state_gas_reservoir
131132
push(evm.stack, U256(0))
132133
return

0 commit comments

Comments
 (0)