Skip to content

Bug: issues with RPC Schema for getStorageAt  #33

@sambacha

Description

@sambacha

Check existing issues

Ox Version

Current Behavior

eth_getStorageAt has an optional param called 'requireCanonical'1

-32000 Error Types

eth_getStorageAt [ "0x

", { "blockHash": "0x", "requireCanonical": true } -> raise block-not-canonical error

-32001 Error Types

eth_getStorageAt [ "0x

", { "blockHash": "0x" } -> raise block-not-found error

eth_getStorageAt [ "0x

", { "blockHash": "0x", "requireCanonical": false } -> raise block-not-found error

eth_getStorageAt [ "0x

", { "blockHash": "0x", "requireCanonical": true } -> raise block-not-found error

  // eth_getStorageAt [ "0x<address>", { "blockHash": "0x<non-canonical-block-hash>", "requireCanonical": true } -> raise block-not-canonical error
  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md#:~:text=If%20the%20block%20is%20not%20found,found%20rather%20than%20block%2Dnot%2Dcanonical.
  '-32000': {
    'SERVER_ERROR': {
    standard: 'EIP-1474, EIP-1898',
    message: 'Server error: Invalid input, unable to locate canonical block',
    },
  },
  // eth_getStorageAt [ "0x<address>", { "blockHash": "0x<non-existent-block-hash>" } -> raise block-not-found error
  // eth_getStorageAt [ "0x<address>", { "blockHash": "0x<non-existent-block-hash>", "requireCanonical": false } -> raise block-not-found error
  // eth_getStorageAt [ "0x<address>", { "blockHash": "0x<non-existent-block-hash>", "requireCanonical": true } -> raise block-not-found error
  // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md#:~:text=If%20the%20block%20is%20not%20found,found%20rather%20than%20block%2Dnot%2Dcanonical.
  '-32001': {
    standard: 'EIP-1474, EIP-1898',
    message: 'Server error: Requested resource, block,  not found.',
  },

Expected Behavior

Conform to the standard

Steps To Reproduce

No response

Link to Minimal Reproducible Example

No response

Anything else?

There are some more issues I saw in the RPC related stuff, some missing RPC methods related to transactions, etc. Can open additional issues.

Footnotes

  1. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md#:~:text=If%20the%20block%20is%20not%20found,found%20rather%20than%20block%2Dnot%2Dcanonical

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions