diff --git a/core/state_transition.go b/core/state_transition.go index 0f480d52a30f..1a7b3cea4b51 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -269,8 +269,21 @@ func (st *StateTransition) buyGas() error { } func (st *StateTransition) preCheck() error { + // Only check transactions that are not fake + if !st.msg.IsFake() { + // Make sure the sender is an EOA + code := st.state.GetCode(st.msg.From()) + _, delegated := types.ParseDelegation(code) + if len(code) > 0 && !delegated { + // If the sender on L1 is a (delegated) EOA, then it must be a (delegated) EOA on L2, too. + // If the sender on L1 is a contract, then we apply address aliasing. + // The probability that the aliased address happens to be a smart contract on L2 is negligible. + return fmt.Errorf("%w: address %v, len(code): %d", ErrSenderNoEOA, st.msg.From().Hex(), len(code)) + } + } + if st.msg.IsL1MessageTx() { - // No fee fields to check, no nonce to check, and no need to check if EOA (L1 already verified it for us) + // No fee fields to check, no nonce to check // Gas is free, but no refunds! st.gas += st.msg.Gas() st.initialGas = st.msg.Gas() @@ -291,12 +304,6 @@ func (st *StateTransition) preCheck() error { return fmt.Errorf("%w: address %v, nonce: %d", ErrNonceMax, st.msg.From().Hex(), stNonce) } - // Make sure the sender is an EOA - code := st.state.GetCode(st.msg.From()) - _, delegated := types.ParseDelegation(code) - if len(code) > 0 && !delegated { - return fmt.Errorf("%w: address %v, len(code): %d", ErrSenderNoEOA, st.msg.From().Hex(), len(code)) - } } // Make sure that transaction gasFeeCap is greater than the baseFee (post london) // Note: Logically, this should be `IsCurie`, but we keep `IsLondon` to ensure backward compatibility. diff --git a/params/version.go b/params/version.go index d085d9e9b840..e90b16275426 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 25 // Patch version component of the current release + VersionPatch = 26 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )