juno icon indicating copy to clipboard operation
juno copied to clipboard

Some methods return invalid JSON RPC 2.0 errors

Open tshakalekholoane opened this issue 3 years ago • 0 comments

The following error message is shown to the user sometimes which is is not valid according to the JSON RPC 2.0 specification.

{
  "jsonrpc": "2.0",
  "error": {},
  "id": 1
}
  • getBlockWithTxHashes and getBlockWithTxs.
    • When -1 is passed in as a parameter.
    • When a valid block is queried but one that is not yet synced.
  • getStorageAt.
    • When no arguments are passed in.
  • getTransactionByBlockAndIndex.
    • When the following parameters are passed in [-1, 0].
    • When the field elements are not padded with enough zeroes according to the following regular expression ^0x0[a-fA-F0-9]{1,63}$.
  • getBlockTransactionCount.
    • For the following arguments [-1] and a valid but block that does not exist e.g. [99999].

tshakalekholoane avatar Aug 12 '22 12:08 tshakalekholoane