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_getTransactionReceiptsByBlock with non-existing block causing panic #725

Closed
dkeysil opened this issue Feb 7, 2023 · 2 comments
Closed

Comments

@dkeysil
Copy link
Contributor

dkeysil commented Feb 7, 2023

System information

Bor client version: 0.3.5-beta

OS & Version: Linux

Environment: Polygon Mainnet

Type of node: Archive

Overview of the problem

eth_getTransactionReceiptsByBlock raises panic on non-existing block.

Reproduction Steps

  • Run node from the v0.3.5-beta tag
  • Call eth_getTransactionReceiptsByBlock with non-existing block
curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceiptsByBlock","params":["0x1cfe800"]}' -H "Content-Type: application/json" https://nd-xxx-xxx-xxx.p2pify.com/xxxxx-token 

Logs / Traces / Output / Error Messages

Log: https://gist.github.com/dkeysil/18c6d904ef6934123dadcbf89d4d2fc4

Additional Information

The problem happens because method BlockByNumberOrHash returning block=nil and error=nil
https://github.com/maticnetwork/bor/blob/67843e17ecbd7e9acea16cab7c5a234602b85587/internal/ethapi/api.go

@dkeysil
Copy link
Contributor Author

dkeysil commented Feb 7, 2023

Right now we fixed this problem by checking if block is nil, but the problem requires deeper investigation:
chainstack@ddcd356

@dkeysil
Copy link
Contributor Author

dkeysil commented Feb 9, 2023

PR: #736

@dkeysil dkeysil closed this as completed Feb 10, 2023
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

1 participant