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_call for future blocks should return an error #12850

Open
madumas opened this issue Nov 22, 2024 · 0 comments
Open

eth_call for future blocks should return an error #12850

madumas opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working imp2 Medium importance

Comments

@madumas
Copy link
Contributor

madumas commented Nov 22, 2024

System information

Erigon version: v2.60.10

Chain/Network: Ethereum

Expected behaviour

Requesting an eth_call by RPC should return an error.

Actual behaviour

Any eth_call to a future block returns 0x. This can be problematic during reorgs, rewinds, and when used behind a load balancer, as clients may expect the node to be synced to that future block.

Steps to reproduce the behaviour

On an Erigon Ethereum Mainnet node, run the curl command:

curl http://erigon/   -X POST   -H "Content-Type: application/json"   --data '{"method":"eth_call","params":[{"from": null,"to":"0x6b175474e89094c44
da98b954eedeac495271d0f","data":"0x06fdde03"}, "0x50000000"],"id":1,"jsonrpc":"2.0"}'
{"jsonrpc":"2.0","id":1,"result":"0x"}

Result on Besu:

curl http://besu/   -X POST   -H "Content-Type: application/json"   --data '{"method":"eth_call","params":[{"from": null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x06fdde03"}, "0x50000000"],"id":1,"jsonrpc":"2.0"}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Block not found"}}

Result on Geth:

curl http://geth/   -X POST   -H "Content-Type: application/json"   --data '{"method":"eth_call","params":[{"from": null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x06fdde03"}, "0x50000000"],"id":1,"jsonrpc":"2.0"}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"header not found"}}

Backtrace

n/a

@yperbasis yperbasis added bug Something isn't working imp2 Medium importance labels Nov 29, 2024
@yperbasis yperbasis self-assigned this Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working imp2 Medium importance
Projects
None yet
Development

No branches or pull requests

2 participants