You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At code/l2geth/core/vm/evm.go , function func (evm *EVM) create() does not limit account
nonce according to EIP-2681. So if an account nonce is upper than unit64 can hold, it will overflow.
// create creates a new contract using code as deployment code.
func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address) ([]byte, common.Address, uint64, error) {
// Depth check execution. Fail if we're trying to execute above the
// limit.
if evm.depth > int(params.CallCreateDepth) {
return nil, common.Address{}, gas, ErrDepth
}
if !evm.CanTransfer(evm.StateDB, caller.Address(), value) {
return nil, common.Address{}, gas, ErrInsufficientBalance
}
nonce := evm.StateDB.GetNonce(caller.Address())
evm.StateDB.SetNonce(caller.Address(), nonce+1)
...
Describe the bug
At code/l2geth/core/vm/evm.go , function func (evm *EVM) create() does not limit account
nonce according to EIP-2681. So if an account nonce is upper than unit64 can hold, it will overflow.
Expected behavior
The text was updated successfully, but these errors were encountered: