Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Problem: web3 rpc api returns wrong block gas limit #777

Closed
yihuang opened this issue Nov 24, 2021 · 0 comments · Fixed by #782
Closed

Problem: web3 rpc api returns wrong block gas limit #777

yihuang opened this issue Nov 24, 2021 · 0 comments · Fixed by #782

Comments

@yihuang
Copy link
Contributor

yihuang commented Nov 24, 2021

System info: ethermint 0.7.2

Steps to reproduce:

Occasionally, the eth_getBlockByNumber API returns gas limit as 0xffffffff.

Expected behavior: Should return the value in genesis

Actual behavior: returns 0xffffffff

Additional info:

Probable cause:

  • ConsensusParams API is called with nil height, and it can reproduce locally that with nil height, the consensus RPC API can return a similar error:
$ curl -s https://rpc-cronos.crypto.org/consensus_params | jq
{
  "jsonrpc": "2.0",
  "id": -1,
  "error": {
    "code": -32603,
    "message": "Internal error",
    "data": "could not find consensus params for height #248932: value retrieved from db is empty"
  }
}

Solution:

  • We should pass the current block height.
@crypto-facs crypto-facs mentioned this issue Nov 25, 2021
11 tasks
yihuang added a commit to yihuang/ethermint that referenced this issue Nov 25, 2021
Closes: evmos#777

Solution:
- pass in specific block height to the query
fedekunze pushed a commit that referenced this issue Nov 25, 2021
* Problem: web3 rpc api returns wrong block gas limit

Closes: #777

Solution:
- pass in specific block height to the query

* Apply suggestions from code review

* changelog
leejw51crypto pushed a commit to leejw51crypto/ethermint that referenced this issue Nov 30, 2021
* Problem: web3 rpc api returns wrong block gas limit

Closes: evmos#777

Solution:
- pass in specific block height to the query

* Apply suggestions from code review

* changelog
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant