onflow / flow-evm-gateway

FlowEVM Gateway implements an Ethereum-equivalent JSON-RPC API for EVM clients to use
https://developers.flow.com/evm/about
Apache License 2.0
11 stars 10 forks source link

Crasher on validation of args #525

Closed sideninja closed 2 months ago

sideninja commented 2 months ago

A crasher on args validation

{"level":"error","component":"API","time":"2024-09-05T23:10:55Z","time":"2024-09-05T23:10:55Z","message":"RPC method eth_estimateGas crashed: runtime error: invalid memory address or nil pointer dereference\ngoroutine 933302 [running]:\ngithub.com/onflow/go-ethereum/rpc.(*callback).call.func1()\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/service.go:199 +0x85\npanic({0x1aa0060?, 0x30671d0?})\n\t/usr/local/go/src/runtime/panic.go:770 +0x132\nmath/big.(*Int).Cmp(0xc000bcfe28?, 0xc001e10b70?)\n\t/usr/local/go/src/math/big/int.go:381 +0x18\ngithub.com/onflow/flow-evm-gateway/api.TransactionArgs.Validate({0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...})\n\t/app/api/models.go:66 +0x2a5\ngithub.com/onflow/flow-evm-gateway/api.(*BlockChainAPI).EstimateGas(0xc0008822d0, {0x21ed7f0, 0xc0017c0af0}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...)\n\t/app/api/api.go:735 +0x3b8\nreflect.Value.call({0xc000f00cb0?, 0xc000d8e948?, 0x80?}, {0x1d87f5c, 0x4}, {0xc000606b80, 0x5, 0xc000606b80?})\n\t/usr/local/go/src/reflect/value.go:596 +0xce5\nreflect.Value.Call({0xc000f00cb0?, 0xc000d8e948?, 0x1?}, {0xc000606b80?, 0x16?, 0x16?})\n\t/usr/local/go/src/reflect/value.go:380 +0xb9\ngithub.com/onflow/go-ethereum/rpc.(*callback).call(0xc000e19e60, {0x21ed7f0, 0xc0017c0af0}, {0xc000a9fec0, 0xf}, {0xc0017c0b90, 0x3, 0x49bc4f?})\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/service.go:205 +0x36d\ngithub.com/onflow/go-ethereum/rpc.(*handler).runMethod(0xc000a9fed0?, {0x21ed7f0?, 0xc0017c0af0?}, 0xc00184f570, 0x3?, {0xc0017c0b90?, 0xc000a38dc0?, 0x41d498?})\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:568 +0x3c\ngithub.com/onflow/go-ethereum/rpc.(*handler).handleCall(0xc000ea5180, 0xc001b1fda0, 0xc00184f570)\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:515 +0x22f\ngithub.com/onflow/go-ethereum/rpc.(*handler).handleCallMsg(0xc000ea5180, 0xc001b1fda0, 0xc00184f570)\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:473 +0x22d\ngithub.com/onflow/go-ethereum/rpc.(*handler).handleNonBatchCall(0xc000ea5180, 0xc001b1fda0, 0xc00184f570)\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:299 +0x18a\ngithub.com/onflow/go-ethereum/rpc.(*handler).handleMsg.func1.1(0x21ed7f0?)\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:272 +0x25\ngithub.com/onflow/go-ethereum/rpc.(*handler).startCallProc.func1()\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:390 +0xbe\ncreated by github.com/onflow/go-ethereum/rpc.(*handler).startCallProc in goroutine 907324\n\t/go/pkg/mod/github.com/onflow/go-ethereum@v1.14.7/rpc/handler.go:386 +0x79\n"}