node-real / bsc-erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
118 stars 44 forks source link

[RPC] eth_estimateGas returns too many arguments #414

Closed mateipopp closed 1 week ago

mateipopp commented 1 week ago

System information

Erigon version: erigon version 1.2.9-dev OS & Version: Linux

Commit hash: cc88640caee4b492c5ef8bb8ee5d805fd309acba

Erigon Command (with flags/config): /usr/local/bin/rpcdaemon --datadir /node/data --http.api=eth,erigon,web3,net,debug,trace,txpool \ --http.addr=0.0.0.0 --ws --http.vhosts= --http.corsdomain= \ --rpc.gascap=1125899906842624 --private.api.addr="127.0.0.1:9191" \ --rpc.batch.limit=10000 --rpc.returndata.limit=134216728

Chain/Network: bsc-mainnet

Expected behaviour:

on geth bsc node is working as expected: curl -X POST \ -H "Content-Type: application/json" \ --data '{ "jsonrpc": "2.0", "method": "eth_estimateGas", "id": 886848, "params": [{"data": "0x95d89b41","to": "0x2a03a891add2dc6d0f7b94419086630ba5cb65b6"},"latest"] }' \ localhost:8545 returns: {"jsonrpc":"2.0","id":886848,"result":"0x52ed"}

Actual behaviour

curl -X POST \ -H "Content-Type: application/json" \ --data '{ "jsonrpc": "2.0", "method": "eth_estimateGas", "id": 886848, "params": [{"data": "0x95d89b41","to": "0x2a03a891add2dc6d0f7b94419086630ba5cb65b6"},"latest"] }' \ localhost:8545 {"jsonrpc":"2.0","id":886848,"error":{"code":-32602,"message":"too many arguments, want at most 1"}}

blxdyx commented 1 week ago

Seems not a bug. Erigon remove it in this pr. https://github.com/ledgerwatch/erigon/pull/10495 It will not accept blockNumberOrhash, just same as geth.

mateipopp commented 3 days ago

It seems like this PR has been reverted. You can see it here: PR 10904.

blxdyx commented 3 days ago

Yes, update in latest main branch