Skip to content

internal/ethapi: eth_estimateGas should take block number #2586

Closed
@kumavis

Description

@kumavis

System information

Geth version: Geth/v1.4.3-stable/linux/go1.5.1
OS & Version: Linux

Summary

behaviour of eth_estimateGas changed

  1. can no longer estimate gas of a simple value transfer tx. while a simple value transfer has a fixed cost, i normally just dump tx params here for any kind of tx to get the estimated cost) - now i’ll need to fork the logic on the frontend based on whether or not the receiving address has code - unnecesary complexity, geth should handle this case just as it used to.
  2. eth_estimateGas params are, according to the wiki, supposed to match the eth_call params, and take a blockTag. I don’t use this feature other than setting it to “pending” but now it throws saying wrong arg count. I don't really care how this one is resolved, but this is a breaking change that broke metamask.

Steps to reproduce the behaviour

rejection of simple value transfer

curl -d '{"id": 1, "method":"eth_estimateGas","params": [{"to":"0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0","value":"0x1234"}]}' -X POST https://mainnet.infura.io

rejection of blockTag

curl -d '{"id": 1, "method":"eth_estimateGas","params": [{"to":"0x5fda30bb72b8dfe20e48a00dfc108d0915be9bb0","value":"0x1234"}, "latest"]}' -X POST https://mainnet.infura.io

confirm geth version

curl -d '{"id": 1, "method":"web3_clientVersion","params": []}' -X POST https://mainnet.infura.io

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions