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

eth_getFinalizedHeader returns "21 out of range [1,8]" error #2866

Closed
quick-pawiromitchel opened this issue Jan 26, 2025 · 4 comments
Closed
Assignees

Comments

@quick-pawiromitchel
Copy link

System information

Geth version: Geth/v1.4.15-ec318b9c/linux-amd64/go1.21.13

Expected behaviour

Correct response

Actual behaviour

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "21 out of range [1,8]"
  }
}

Steps to reproduce the behaviour

Run the payload { "jsonrpc": "2.0", "method": "eth_getFinalizedHeader", "params": [21], "id": 1 }

Backtrace

WARN [01-26|13:44:40.193] Served eth_getFinalizedHeader            conn=xxx.xxx.xxx.xxx:54747 reqid=1 t="43.173µs" err="21 out of range [1,8]" X-Forwarded-For=<nil>
WARN [01-26|13:44:40.193] Served eth_getFinalizedHeader            conn=xxx.xxx.xxx.xxx:54747 reqid=1 duration="42.271µs" err="21 out of range [1,8]"
@MatusKysel
Copy link
Contributor

Hey @quick-pawiromitchel where did you test it? it seems in your case there is only 8 validators for latest block

@quick-pawiromitchel
Copy link
Author

We're running our own BSC Testnet nodes

it seems in your case there is only 8 validators for latest block

Can you clarify this a bit more? Do we need more nodes for the call to work?

@MatusKysel
Copy link
Contributor

So you are calling it with param 21, but it seems you have only 8 validators. So call the same API with value 8 and it should work

@MatusKysel
Copy link
Contributor

@quick-pawiromitchel you can check number of validators e.g. here https://testnet.bscscan.com/validators Please let me know if it's working for you

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

No branches or pull requests

3 participants