core: fix remaining spec issues

This commit is contained in:
MariusVanDerWijden 2026-07-02 13:07:39 +02:00
parent ac7f10e1c1
commit 361c909667
No known key found for this signature in database

View file

@ -415,11 +415,6 @@ func makeCallVariantGasCallEIP7702(intrinsicFunc intrinsicGasFunc, coldCost uint
if !contract.chargeRegular(eip7702Cost, evm.Config.Tracer, tracing.GasChangeCallStorageColdAccess) {
return GasCosts{}, ErrOutOfGas
}
// The spec checks the delegation cost together with the memory
// expansion and transfer costs before reading the delegated account.
// Since intrinsicCost is only checked (not charged) above, re-check it
// against the remaining gas so the delegated address is not recorded
// in the block access list when the combined costs are unaffordable.
if contract.Gas.RegularGas < intrinsicCost {
return GasCosts{}, ErrOutOfGas
}