Canto-Network / Canto

Layer-1 blockchain powered by Free Public Infrastructure
GNU Lesser General Public License v3.0
82 stars 80 forks source link

eth_gasPrice method is not working #137

Closed susuper closed 1 month ago

susuper commented 1 month ago

Canto v8.1.1

curl http://127.0.0.1:8545 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_gasPrice","params":[],"id":1,"jsonrpc":"2.0"}'

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"method handler crashed"}}
{"level":"error","module":"server","module":"geth","time":"2024-08-15T18:06:07Z","message":"RPC method eth_gasPrice crashed: bloom bytes too big 256 270\ngoroutine 1314190 [running]:\ngithub.com
/ethereum/go-ethereum/rpc.(*callback).call.func1()\n\tgithub.com/ethereum/go-ethereum@v1.10.26/rpc/service.go:200 +0x85\npanic({0x4c698c0?, 0xc00f415d50?})\n\truntime/panic.go:770 +0x132\ngithub
.com/ethereum/go-ethereum/core/types.(*Bloom).SetBytes(0x18?, {0xc00c17c7e0?, 0x73a6259d9398?, 0x2b9ef00?})\n\tgithub.com/ethereum/go-ethereum@v1.10.26/core/types/bloom9.go:55 +0xda\ngithub.com/
ethereum/go-ethereum/core/types.BytesToBloom(...)\n\tgithub.com/ethereum/go-ethereum@v1.10.26/core/types/bloom9.go:47\ngithub.com/evmos/ethermint/rpc/backend.(*Backend).BlockBloom(_, _)\n\tgithu
b.com/evmos/ethermint@v0.22.0/rpc/backend/blocks.go:369 +0x24e\ngithub.com/evmos/ethermint/rpc/backend.(*Backend).HeaderByNumber(0xc0013fb908, 0xffffffffffffffff)\n\tgithub.com/evmos/ethermint@v
0.22.0/rpc/backend/blocks.go:315 +0x89\ngithub.com/evmos/ethermint/rpc/backend.(*Backend).CurrentHeader(...)\n\tgithub.com/evmos/ethermint@v0.22.0/rpc/backend/chain_info.go:110\ngithub.com/evmos
/ethermint/rpc/backend.(*Backend).GasPrice(0xc0013fb908)\n\tgithub.com/evmos/ethermint@v0.22.0/rpc/backend/call_tx.go:404 +0x2e\ngithub.com/evmos/ethermint/rpc/namespaces/ethereum/eth.(*PublicAP
I).GasPrice(0xc001bfcae0)\n\tgithub.com/evmos/ethermint@v0.22.0/rpc/namespaces/ethereum/eth/api.go:339 +0x4d\nreflect.Value.call({0xc001498a00?, 0xc0014183c8?, 0x30?}, {0x5426f3b, 0x4}, {0xc0196
b7c20, 0x1, 0xc0196b7c20?})\n\treflect/value.go:596 +0xca6\nreflect.Value.Call({0xc001498a00?, 0xc0014183c8?, 0x1bf8ace?}, {0xc0196b7c20?, 0x1cad7dc?, 0xc00ebc9e00?})\n\treflect/value.go:380 +0x
b9\ngithub.com/ethereum/go-ethereum/rpc.(*callback).call(0xc000dbe900, {0x5fcddb0, 0xc00fc82af0}, {0xc016b81310, 0xc}, {0x0, 0x0, 0x1c5e88f?})\n\tgithub.com/ethereum/go-ethereum@v1.10.26/rpc/ser
vice.go:206 +0x36d\ngithub.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0x0?, {0x5fcddb0?, 0xc00fc82af0?}, 0xc00bff5b20, 0x0?, {0x0?, 0xc017dcdf80?, 0x10?})\n\tgithub.com/ethereum/go-ethere
um@v1.10.26/rpc/handler.go:389 +0x3c\ngithub.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc00ee2fcb0, 0xc0196b7b60, 0xc00bff5b20)\n\tgithub.com/ethereum/go-ethereum@v1.10.26/rpc/handler.
go:337 +0x22f\ngithub.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc00ee2fcb0, 0xc0196b7b60, 0xc00bff5b20)\n\tgithub.com/ethereum/go-ethereum@v1.10.26/rpc/handler.go:298 +0xbd\ngithub
.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1(0xc0196b7b60)\n\tgithub.com/ethereum/go-ethereum@v1.10.26/rpc/handler.go:139 +0x2f\ngithub.com/ethereum/go-ethereum/rpc.(*handler).startC
allProc.func1()\n\tgithub.com/ethereum/go-ethereum@v1.10.26/rpc/handler.go:226 +0xbe\ncreated by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc in goroutine 1093583\n\tgithub.com/e
thereum/go-ethereum@v1.10.26/rpc/handler.go:222 +0x79\n"}
susuper commented 1 month ago

Forgot to enable API.