diff --git a/core/vm/eips.go b/core/vm/eips.go index c4129a8b7b..59c405eb75 100644 --- a/core/vm/eips.go +++ b/core/vm/eips.go @@ -736,7 +736,7 @@ func enableEOF(jt *JumpTable) { constantGas: params.WarmStorageReadCostEIP2929, minStack: minStack(3, 1), maxStack: maxStack(3, 1), - memorySize: memoryExtDelegateCall, + memorySize: memoryExtCall, } jt[EXTSTATICCALL] = &operation{ execute: opExtStaticCall, @@ -744,7 +744,7 @@ func enableEOF(jt *JumpTable) { dynamicGas: makeCallVariantGasCallEIP2929(gasExtStaticCall, 0), minStack: minStack(3, 1), maxStack: maxStack(3, 1), - memorySize: memoryExtStaticCall, + memorySize: memoryExtCall, } } @@ -1119,7 +1119,7 @@ func opExtCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([] // Use all available gas gas := interpreter.evm.callGasTemp // Pop other call parameters. - addr, value, inOffset, inSize := stack.pop(), stack.pop(), stack.pop(), stack.pop() + addr, inOffset, inSize, value := stack.pop(), stack.pop(), stack.pop(), stack.pop() toAddr := common.Address(addr.Bytes20()) if addr.ByteLen() > 20 { return nil, errors.New("address space extension") @@ -1146,7 +1146,6 @@ func opExtCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([] temp.Clear() } stack.push(&temp) - fmt.Println(returnGas) scope.Contract.RefundGas(returnGas, interpreter.evm.Config.Tracer, tracing.GasChangeCallLeftOverRefunded) interpreter.returnData = ret diff --git a/core/vm/memory_table.go b/core/vm/memory_table.go index 0bbed316e2..0f6fb847a1 100644 --- a/core/vm/memory_table.go +++ b/core/vm/memory_table.go @@ -122,22 +122,6 @@ func memoryStaticCall(stack *Stack) (uint64, bool) { } func memoryExtCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - return x, false -} - -func memoryExtDelegateCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(1), stack.Back(2)) - if overflow { - return 0, true - } - return x, false -} - -func memoryExtStaticCall(stack *Stack) (uint64, bool) { x, overflow := calcMemSize64(stack.Back(1), stack.Back(2)) if overflow { return 0, true diff --git a/core/vm/validate_linear.go b/core/vm/validate_linear.go index bfd4b4e2e0..2c2c4bc76d 100644 --- a/core/vm/validate_linear.go +++ b/core/vm/validate_linear.go @@ -173,7 +173,6 @@ func validateControlFlow2(code []byte, section int, metadata []*FunctionMetadata } change := int(params.StackLimit) - jt[nextOP].maxStack + jt[nextOP].minStack if have, want := nextBounds.max+change, currentBounds.max; have != want { - fmt.Println(nextPC, have, want, change) return 0, fmt.Errorf("%w want %d as max got %d at pos %d,", ErrInvalidBackwardJump, want, have, pos) } if have, want := nextBounds.min+change, currentBounds.min; have != want {