Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

"unknown block number" error from eth_call RPC call against "latest" block #11234

Open
1 task done
toolchainx opened this issue Sep 26, 2024 · 0 comments
Open
1 task done
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior

Comments

@toolchainx
Copy link

Describe the bug

I make frequent eth_call calls to reth with the block number set to "latest", to get the latest price of some token. every few hours, I encounter the following error:

{
  "jsonrpc": "2.0",
  "id": 213095,
  "error": {
    "code": -32001,
    "message": "unknown block number"
  }
}

The sample request is like this

{
  "method": "eth_call",
  "params": [
    {
      "to": "0x1116898dda4015ed8ddefb84b6e8bc24528af2d8",
      "data": "0x66c0bd240000000000000000000000006b175474e89094c44da98b954eedeac495271d0f"
    },
    "latest"
  ],
  "id": 213095,
  "jsonrpc": "2.0"
}

Steps to reproduce

eth_call the reth node frequently like every two seconds:

{
  "method": "eth_call",
  "params": [
    {
      "to": "0x1116898dda4015ed8ddefb84b6e8bc24528af2d8",
      "data": "0x66c0bd240000000000000000000000006b175474e89094c44da98b954eedeac495271d0f"
    },
    "latest"
  ],
  "id": 213095,
  "jsonrpc": "2.0"
}

Node logs

no error log

Platform(s)

Linux (x86)

What version/commit are you on?

ghcr.io/paradigmxyz/reth:v1.0.4

What database version are you on?

2024-09-26T06:46:04.957670Z  INFO Initialized tracing, debug log directory: /root/.cache/reth/logs/mainnet
Current database version: 2
Local database version: 2

Which chain / network are you on?

Ethereum mainnet

What type of node are you running?

Archive (default)

What prune config do you use, if any?

default config, I think it is no prune.

If you've built Reth from source, provide the full command you used

no, I use the docker image

Code of Conduct

  • I agree to follow the Code of Conduct
@toolchainx toolchainx added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Sep 26, 2024
@emhane emhane added A-rpc Related to the RPC implementation and removed S-needs-triage This issue needs to be labelled labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
Status: Todo
Development

No branches or pull requests

2 participants