Skip to content

eth_getTransactionReceiptsByBlock with non-existing block causing panic #725

@dkeysil

Description

@dkeysil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions