Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

eth_feeHistory doesn't support block tags #23327

Closed
spacesailor24 opened this issue Aug 3, 2021 · 2 comments
Closed

eth_feeHistory doesn't support block tags #23327

spacesailor24 opened this issue Aug 3, 2021 · 2 comments
Labels

Comments

@spacesailor24
Copy link

System information

Geth version: v1.10.6

Expected behaviour

It is mentioned in the RPC spec that for eth_feeHistory block tags (e.g. earliest, latest, pending) are supported

Actual behaviour

An error is returned when attempting to use any block tag:

{
  "jsonrpc": "2.0",
  "id": 0,
  "error": {
    "code": -32602,
    "message": "invalid argument 0: json: cannot unmarshal string into Go value of type int"
  }
}

And the method implementation seems to be expecting an int

Steps to reproduce the behaviour

curl -X POST --data '{"jsonrpc": "2.0","method": "eth_feeHistory","params": ["0x4","latest",[]],"id": 0}'
@ligi
Copy link
Member

ligi commented Aug 3, 2021

the problem is not the block tag - the problem is that the first parameter must be a number in 1.10.6 - it is fixed on master and will be rolled out with 1.10.7 that you can use hex strings here.
Currently you need to do:
curl -X POST --data '{"jsonrpc": "2.0","method": "eth_feeHistory","params": [4,"latest",[]],"id": 0}'

@spacesailor24
Copy link
Author

invalid argument 0

Whoops, that makes sense. Guess I'll close this and await 1.10.7

Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants