update to newest spec

This commit is contained in:
Marius van der Wijden 2026-06-25 12:41:16 +02:00
parent 7d15fa0075
commit 4abb17b9af
2 changed files with 3 additions and 10 deletions

View file

@ -863,9 +863,9 @@ func (st *stateTransition) chargeCallRecipientEIP2780(value *uint256.Int) bool {
to = *st.msg.To to = *st.msg.To
) )
// EIP-8037: a value transfer to an empty recipient charges NEW_ACCOUNT // EIP-8037: a value transfer to an empty recipient charges NEW_ACCOUNT
// state gas — except for precompiles, which are protocol-inherent and not // state gas. As of EIP-2780 spec update #3048 this also applies to
// "created" by the transfer, so the charge is suppressed for them. // precompiles (a value transfer to a zero-balance precompile is charged).
if !value.IsZero() && st.state.Empty(to) && !st.evm.IsPrecompile(to) { if !value.IsZero() && st.state.Empty(to) {
cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte
} }
if _, ok := types.ParseDelegation(st.state.GetCode(to)); ok { if _, ok := types.ParseDelegation(st.state.GetCode(to)); ok {

View file

@ -46,13 +46,6 @@ func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) {
return p, ok return p, ok
} }
// IsPrecompile reports whether addr is an active precompile for the current
// fork ruleset.
func (evm *EVM) IsPrecompile(addr common.Address) bool {
_, ok := evm.precompiles[addr]
return ok
}
// BlockContext provides the EVM with auxiliary information. Once provided // BlockContext provides the EVM with auxiliary information. Once provided
// it shouldn't be modified. // it shouldn't be modified.
type BlockContext struct { type BlockContext struct {