Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/vm/operations_acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ func makeSelfdestructGasFn(refundsEnabled bool) gasFunc {
// If the caller cannot afford the cost, this change will be rolled back
evm.StateDB.AddAddressToAccessList(address)
gas = params.ColdAccountAccessCostEIP2929

if contract.Gas < gas {
Copy link
Member

@rjl493456442 rjl493456442 Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the EIP https://eips.ethereum.org/EIPS/eip-7928

BALs must include the Addresses accessed without state changes, including: Beneficiary addresses for SELFDESTRUCT

It means the beneficiary address should be tracked in the BALs regardless of the gas is sufficient should this opcode.
If we short circuit here and without executing if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 {
how should we explicitly track it?

return gas, nil
}
}
// if empty and transfers value
if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 {
Expand Down
Loading